Skip to content

Commit 4a7b77e

Browse files
committed
Fixed formatting from code added in DUWSR-66
1 parent 539627b commit 4a7b77e

File tree

4 files changed

+40
-29
lines changed

4 files changed

+40
-29
lines changed

source/INIT.sqf

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -169,25 +169,34 @@ if (isMultiplayer) then {
169169
// Get the variables from the parameters lobby
170170
_revive_activated = paramsArray select 0; // Revives, true or false
171171
DUWSMP_CP_death_cost = paramsArray select 1;
172-
173-
if (support_armory_available) then {
174-
hq_blu1 addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
175-
hq_blu1 addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"];
176-
{ _x addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
177-
_x addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; } forEach (Array_of_FOBS);
178-
};
172+
if (support_armory_available) then {
173+
hq_blu1 addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
174+
hq_blu1 addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"];
175+
{
176+
_x addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
177+
_x addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"];
178+
} forEach (Array_of_FOBS);
179+
};
179180

180181
if (_revive_activated == 1) then {execVM "duws_revive\reviveInit.sqf"};
181-
PlayerKilledEH = player addEventHandler ["killed", {commandpointsblu1 = commandpointsblu1 - DUWSMP_CP_death_cost; publicVariable "commandpointsblu1"}];
182+
PlayerKilledEH = player addEventHandler ["killed", {
183+
commandpointsblu1 = commandpointsblu1 - DUWSMP_CP_death_cost;
184+
publicVariable "commandpointsblu1";
185+
}];
182186
"support_specialized_training_available" addPublicVariableEventHandler {lbSetColor [2103, 11, [0, 1, 0, 1]];};
183-
"support_armory_available" addPublicVariableEventHandler {
187+
"support_armory_available" addPublicVariableEventHandler {
184188
hq_blu1 addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
185189
hq_blu1 addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"];
186-
{ _x addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
187-
_x addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; } forEach (Array_of_FOBS);
188-
lbSetColor [2103, 5, [0, 1, 0, 1]];};
189-
"commandpointsblu1" addPublicVariableEventHandler {ctrlSetText [1000, format["%1",commandpointsblu1]];}; // change the shown CP for request dialog
190-
190+
{
191+
_x addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
192+
_x addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"];
193+
} forEach (Array_of_FOBS);
194+
lbSetColor [2103, 5, [0, 1, 0, 1]];
195+
};
196+
197+
// change the shown CP for request dialog
198+
"commandpointsblu1" addPublicVariableEventHandler {ctrlSetText [1000, format["%1",commandpointsblu1]]; };
199+
191200
// each time there is a new FOB
192201
"Array_of_FOBS" addPublicVariableEventHandler {
193202
if (!fobSwitch) then {

source/dialog/request_support.sqf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ switch (_index2) do {
9090
support_armory_available = true;
9191
hq_blu1 addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
9292
hq_blu1 addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"];
93-
{ _x addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
94-
_x addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; } forEach (Array_of_FOBS);
93+
{
94+
_x addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
95+
_x addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"];
96+
} forEach (Array_of_FOBS);
9597

9698
playSound "loadgun";
9799
publicVariable "support_armory_available";

source/support/FOBactions.sqf

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
_fob = _this select 0;
22

3-
43
_fob addaction ["<t color='#ff00ff'>Player stats</t>","dialog\info\info.sqf", "", 0, true, true, "", "_this == player"];
54
_fob addaction ["<t color='#15ff00'>Request ammobox drop(2CP)</t>","support\fob_ammobox.sqf", "", 0, true, true, "", "_this == player"];
5+
66
if (support_armory_available) then {
7-
_fob addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
8-
_fob addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"];
7+
_fob addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
8+
_fob addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"];
99
};
10+
1011
_fob addaction ["<t color='#ffb700'>Squad manager</t>","dialog\squad\squadmng.sqf", "", 0, true, true, "", "_this == player"];
1112
_fob addaction ["<t color='#ffb700'>FOB manager</t>","dialog\fob\FOBmanageropen.sqf", "", 0, true, true, "", "_this == player"];
13+
1214
if (isServer) then {
13-
_fob addaction ["<t color='#00b7ff'>Rest (wait/save)</t>","savegame.sqf", "", 0, true, true, "", "_this == player"];
14-
};
15-
if (!isServer) then {
16-
_fob addaction ["<t color='#00b7ff'>Rest</t>","savegameClient.sqf", "", 0, true, true, "", "_this == player"];
15+
_fob addaction ["<t color='#00b7ff'>Rest (wait/save)</t>","savegame.sqf", "", 0, true, true, "", "_this == player"];
16+
} else {
17+
_fob addaction ["<t color='#00b7ff'>Rest</t>","savegameClient.sqf", "", 0, true, true, "", "_this == player"];
1718
};

source/support/fob.sqf

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,11 @@ DUWS_fnc_fob = {
6464
_this addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
6565
_this addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"];
6666
};
67-
if (isServer) then {
68-
_this addaction ["<t color='#00b7ff'>Rest (wait/save)</t>","savegame.sqf", "", 0, true, true, "", "_this == player"];
69-
};
70-
if (!isServer) then {
71-
_this addaction ["<t color='#00b7ff'>Rest</t>","savegameClient.sqf", "", 0, true, true, "", "_this == player"];
72-
};
67+
if (isServer) then {
68+
_this addaction ["<t color='#00b7ff'>Rest (wait/save)</t>","savegame.sqf", "", 0, true, true, "", "_this == player"];
69+
} else {
70+
_this addaction ["<t color='#00b7ff'>Rest</t>","savegameClient.sqf", "", 0, true, true, "", "_this == player"];
71+
};
7372
};
7473
[_fob,"DUWS_fnc_fob",true,true] spawn BIS_fnc_MP; // [_fob,"DUWS_fnc_fob",nil,true] spawn BIS_fnc_MP;
7574

0 commit comments

Comments
 (0)