Skip to content

Commit 539627b

Browse files
committed
Merge pull request #66 from rlex/virtual_arsenal_support
add virtual arsenal support
2 parents b2ba26b + 1dd4553 commit 539627b

File tree

5 files changed

+34
-13
lines changed

5 files changed

+34
-13
lines changed

source/INIT.sqf

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,22 @@ if (isMultiplayer) then {
170170
_revive_activated = paramsArray select 0; // Revives, true or false
171171
DUWSMP_CP_death_cost = paramsArray select 1;
172172

173-
if (support_armory_available) then {
174-
hq_blu1 addaction ["<t color='#ff1111'>Armory</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
175-
};
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+
};
176179

177180
if (_revive_activated == 1) then {execVM "duws_revive\reviveInit.sqf"};
178181
PlayerKilledEH = player addEventHandler ["killed", {commandpointsblu1 = commandpointsblu1 - DUWSMP_CP_death_cost; publicVariable "commandpointsblu1"}];
179182
"support_specialized_training_available" addPublicVariableEventHandler {lbSetColor [2103, 11, [0, 1, 0, 1]];};
180-
"support_armory_available" addPublicVariableEventHandler {hq_blu1 addaction ["<t color='#ff1111'>Armory</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];lbSetColor [2103, 5, [0, 1, 0, 1]];};
183+
"support_armory_available" addPublicVariableEventHandler {
184+
hq_blu1 addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
185+
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]];};
181189
"commandpointsblu1" addPublicVariableEventHandler {ctrlSetText [1000, format["%1",commandpointsblu1]];}; // change the shown CP for request dialog
182190

183191
// each time there is a new FOB
@@ -333,7 +341,7 @@ if (isMultiplayer) then {
333341

334342
// WAIT UNTIL ALL ZONES ARE CAPTURED
335343
waitUntil {sleep 1; amount_zones_created > 0};
336-
waitUntil {sleep 3; (zoneundercontrolblu >= amount_zones_created);}; // Toutes les zones sont capturées
344+
waitUntil {sleep 3; (zoneundercontrolblu >= amount_zones_created);}; // Toutes les zones sont capturées
337345
persistent_stat_script_win = [] execVM "persistent\persistent_stats_win.sqf";
338346
["TaskSucceeded",["","Island captured!"]] call bis_fnc_showNotification;
339347
capture_island_obj setTaskState "Succeeded";
@@ -388,4 +396,4 @@ if(isServer) then
388396
389397
execVM "persistent\missionSpecific\loadAccount.sqf";
390398
};
391-
*/
399+
*/

source/bisArsenal.sqf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
["Open",true] call BIS_fnc_arsenal;

source/dialog/request_support.sqf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,13 @@ switch (_index2) do {
8686
if (!support_armory_available) then {
8787
commandpointsblu1 = commandpointsblu1 - 8;
8888
ctrlSetText [1000, format["%1",commandpointsblu1]];
89-
hq_blu1 addaction ["<t color='#ff1111'>Armory</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
90-
lbSetColor [2103, 5, [0, 1, 0, 1]];
89+
lbSetColor [2103, 6, [0, 1, 0, 1]];
9190
support_armory_available = true;
91+
hq_blu1 addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
92+
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);
95+
9296
playSound "loadgun";
9397
publicVariable "support_armory_available";
9498
["armory",["Armory Unlocked","Access the armory at the HQ and at the dropped supply crates"]] call bis_fnc_showNotification;
@@ -217,4 +221,4 @@ switch (_index2) do {
217221
};
218222
};
219223
//hint format["index: %1",_index2];
220-
publicVariable "commandpointsblu1";
224+
publicVariable "commandpointsblu1";

source/support/FOBactions.sqf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ _fob = _this select 0;
33

44
_fob addaction ["<t color='#ff00ff'>Player stats</t>","dialog\info\info.sqf", "", 0, true, true, "", "_this == player"];
55
_fob addaction ["<t color='#15ff00'>Request ammobox drop(2CP)</t>","support\fob_ammobox.sqf", "", 0, true, true, "", "_this == player"];
6+
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"];
9+
};
610
_fob addaction ["<t color='#ffb700'>Squad manager</t>","dialog\squad\squadmng.sqf", "", 0, true, true, "", "_this == player"];
711
_fob addaction ["<t color='#ffb700'>FOB manager</t>","dialog\fob\FOBmanageropen.sqf", "", 0, true, true, "", "_this == player"];
812
if (isServer) then {

source/support/fob.sqf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ _markerstr setMarkerShape "ICON";
4646
str(_markername) setMarkerType "loc_Bunker";
4747
str(_markername) setMarkerColor "ColorBLUFOR";
4848
str(_markername) setMarkerText format["FOB %1",_fobname];
49-
str(_markername) setMarkerSize [2.5, 2.5];
49+
str(_markername) setMarkerSize [2.5, 2.5];
5050

5151

5252

@@ -59,13 +59,17 @@ DUWS_fnc_fob = {
5959
_this addaction ["<t color='#ff00ff'>Player stats</t>","dialog\info\info.sqf", "", 0, true, true, "", "_this == player"];
6060
_this addaction ["<t color='#15ff00'>Request ammobox drop(2CP)</t>","support\fob_ammobox.sqf", "", 0, true, true, "", "_this == player"];
6161
_this addaction ["<t color='#ffb700'>Squad manager</t>","dialog\squad\squadmng.sqf", "", 0, true, true, "", "_this == player"];
62-
_this addaction ["<t color='#ffb700'>FOB manager</t>","dialog\fob\FOBmanageropen.sqf", "", 0, true, true, "", "_this == player"];
62+
_this addaction ["<t color='#ffb700'>FOB manager</t>","dialog\fob\FOBmanageropen.sqf", "", 0, true, true, "", "_this == player"];
63+
if (support_armory_available) then {
64+
_this addaction ["<t color='#ff0066'>Armory 1 (VAS)</t>","VAS\open.sqf", "", 0, true, true, "", "_this == player"];
65+
_this addaction ["<t color='#ff0066'>Armory 2 (VA)</t>","bisArsenal.sqf", "", 0, true, true, "", "_this == player"];
66+
};
6367
if (isServer) then {
6468
_this addaction ["<t color='#00b7ff'>Rest (wait/save)</t>","savegame.sqf", "", 0, true, true, "", "_this == player"];
6569
};
6670
if (!isServer) then {
6771
_this addaction ["<t color='#00b7ff'>Rest</t>","savegameClient.sqf", "", 0, true, true, "", "_this == player"];
68-
};
72+
};
6973
};
7074
[_fob,"DUWS_fnc_fob",true,true] spawn BIS_fnc_MP; // [_fob,"DUWS_fnc_fob",nil,true] spawn BIS_fnc_MP;
7175

@@ -114,4 +118,4 @@ sleep 1;
114118
sleep 600;
115119
_art = [player1,"fob_support"] call BIS_fnc_addCommMenuItem;
116120

117-
// Land_Cargo_HQ_V1_F
121+
// Land_Cargo_HQ_V1_F

0 commit comments

Comments
 (0)