Skip to content

Commit a4f6eee

Browse files
committed
fix DAL menu
1 parent 12f9003 commit a4f6eee

9 files changed

Lines changed: 24 additions & 66 deletions

File tree

core.liberation/GREUH/Scripts/GREUH_version.sqf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,14 @@ player createDiaryRecord ["MapInfo", ["MapInfo", format ["This Map: %1<br/>was p
197197
player createDiaryRecord ["MapInfo", ["MapInfo", format ["The East faction <font color='#f80000'>%1</font><br/>was made by: <font color='%3'>%2</font>.", GRLIB_mod_east, GRLIB_east_modder, call _getRandomColor]]];
198198
player createDiaryRecord ["MapInfo", ["MapInfo", format ["The West faction <font color='#0000f8'>%1</font><br/>was made by: <font color='%3'>%2</font>.", GRLIB_mod_west, GRLIB_west_modder, call _getRandomColor]]];
199199
player createDiaryRecord ["MapInfo", ["MapInfo", format ["-= Map Information =-"]]];
200+
201+
private _briefing = [
202+
localize "STR_RPL_DALE_INTRO_1",
203+
localize "STR_RPL_DALE_INTRO_2",
204+
localize "STR_RPL_DALE_INTRO_3",
205+
localize "STR_RPL_DALE_INTRO_4",
206+
localize "STR_RPL_DALE_INTRO_5",
207+
"<br />"
208+
];
209+
player createDiarySubject ["DALE", "DALE"];
210+
player createDiaryRecord ["DALE", ["DALE", _briefing joinString "<br />"]];

core.liberation/addons/SDB_DALE/CfgFunctions.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
class Dale {
22
class Init {
33
file = "addons\SDB_DALE\functions";
4-
class actLoadout {};
54
class addPylonLoadout {};
65
class clearPylonLoadout {};
76
class getPylonTurret {};
87
class getTurretPylons {};
9-
class initBriefing {postInit = 1;};
10-
class initDALE {postInit = 1;};
118
class pylonRearm {};
129
class pylonRearmRemote {};
1310
class setPylonLoadout {};

core.liberation/addons/SDB_DALE/functions/fn_actLoadout.sqf

Lines changed: 0 additions & 19 deletions
This file was deleted.

core.liberation/addons/SDB_DALE/functions/fn_initBriefing.sqf

Lines changed: 0 additions & 19 deletions
This file was deleted.

core.liberation/addons/SDB_DALE/functions/fn_initDALE.sqf

Lines changed: 0 additions & 24 deletions
This file was deleted.

core.liberation/scripts/client/actions/action_manager_player.sqf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ while {true} do {
1919
GRLIB_player_near_fuelbarrel = ([player, "REFUEL_DISP", GRLIB_ActionDist_10, false] call F_check_near);
2020
GRLIB_player_near_repair = ([player, "REPAIR", GRLIB_ActionDist_10, false] call F_check_near);
2121
GRLIB_player_near_repairbox = ([player, "REPAIR_BOX", GRLIB_ActionDist_5, false] call F_check_near);
22+
GRLIB_player_near_reammo = ([player, "REAMMO", 30] call F_check_near);
2223
GRLIB_player_near_repaint = ([player, "REPAINT", 30] call F_check_near);
2324
};
2425

core.liberation/scripts/client/actions/action_manager_veh.sqf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ while {true} do {
6262
_vehicle addAction ["<t color='#009000'>" + localize "STR_HALO_VEH" + "</t> <img size='1' image='res\ui_redeploy.paa'/>", "scripts\client\spawn\do_halo.sqf","",-507,false,true,"","[_target, _this] call GRLIB_checkAction_Halo", GRLIB_ActionDist_10];
6363
};
6464

65+
if (_vehicle isKindOf "Air") then {
66+
private _cfgComponent = configOf _vehicle >> "Components" >> "TransportPylonsComponent";
67+
if (!isClass _cfgComponent) exitWith {};
68+
private _actionID = _vehicle addAction ["", DALE_fnc_dlgLoadoutOpen, nil, 20, false, true, "", "[_target, _this] call GRLIB_DALE_actionCond"];
69+
_vehicle setUserActionText [_actionID, "<t color='#009000'>" + localize "STR_DALE_Actions_Loadout" + "</t> <img size='1' image='a3\ui_f\data\IGUI\Cfg\Actions\reammo_ca.paa'/>"];
70+
};
71+
6572
if (_class == FOB_truck_typename) then {
6673
_vehicle addAction ["<t color='#FF6F00'>" + localize "STR_FOB_ACTION" + "</t> <img size='1' image='res\ui_deployfob.paa'/>","scripts\client\actions\do_build_fob.sqf","",-981,false,true,"","[_target, _this] call GRLIB_checkBuildFOB", GRLIB_ActionDist_5];
6774
};

core.liberation/scripts/client/actions/action_manager_veh_check.sqf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
GRLIB_DALE_actionCond = {
2+
params ["_target", "_unit"];
3+
((round (getPos _target select 2) <= 0) && (_unit == driver _target) && (speed vehicle _target < 1) && GRLIB_player_near_reammo)
4+
};
5+
16
GRLIB_checkAction_Lock = {
27
params ["_target", "_unit"];
38
(GRLIB_player_is_menuok && alive _target && count (crew _target) == 0 && (GRLIB_permission_vehicles && [_unit, _target] call is_owner) && locked _target < 2 && GRLIB_vehicle_lock)

core.liberation/scripts/shared/functions/F_check_near.sqf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ if (_list == "LHD") exitWith { (_vehpos distance2D lhd <= _dist) };
5252
// Supply Always ON
5353
private _ignore_disabled = (_list in ["MEDIC","ARSENAL","REFUEL""REAMMO","REAMMO_AI","REPAIR","REPAIR_BOX"]);
5454

55-
diag_log format ["%1 %2", _list, "search"];
5655
// Search
5756
private _near = 0;
5857
if (typeName (_classlist select 0) == "STRING") then {

0 commit comments

Comments
 (0)