-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] - Added ZEN module for creating loadout lockers mid-mission. (
#155) * Added ZEN module for creating loadout lockers mid-mission. Changed calculations for loadout locker add-on prop to allow for different objects. * Forgot about ZEN Module ASL pos. * Ok any object can be lockernatored mid mission now
- Loading branch information
Showing
4 changed files
with
79 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#include "../macros.hpp" | ||
|
||
CLIENT_ONLY; | ||
|
||
params ["_position", "_unit"]; | ||
|
||
if ((!isNull _unit) and {_unit getVariable ["f_var_isLoadoutLocker", false]}) exitWith | ||
{ | ||
["This object is already a loadout locker and cannot be reassigned."] call zen_common_fnc_showMessage; | ||
}; | ||
|
||
|
||
private _createLocker = | ||
{ | ||
params ["_dialogValues", "_args"]; | ||
_dialogValues params ["_chosenFaction"]; | ||
_args params ["_position", "_locker"]; | ||
|
||
if (isNull _locker) then | ||
{ | ||
private _lockerModel = ["Metal_Locker_F", "Land_OfficeCabinet_02_F"] select (isNull (configFile >> "CfgVehicles" >> "Metal_Locker_F")); | ||
_locker = _lockerModel createVehicle [0,0,0]; | ||
_locker setPosASL _position; | ||
}; | ||
|
||
// In case picked object becomes a locker while zeus is in the side selection menu. | ||
if (_locker getVariable ["f_var_isLoadoutLocker", false]) exitWith | ||
{ | ||
["This object is already a loadout locker and cannot be reassigned."] call zen_common_fnc_showMessage; | ||
}; | ||
|
||
[_locker, _chosenFaction] remoteExec ["f_fnc_createLoadoutLocker", 0, _locker]; | ||
}; | ||
|
||
private _potentialSides = | ||
[ | ||
["BLUFOR", "blu_f"], | ||
["OPFOR", "opf_f"], | ||
["INDFOR", "ind_f"], | ||
["Civilian", "civ_f"], | ||
["Guerrilla", "blu_g_f"] | ||
]; | ||
|
||
private _sidesInUse = _potentialSides select { CRATE_REGISTRY_DYNAMIC(toLower (_x # 0)) isNotEqualTo [] }; | ||
|
||
[ | ||
"Choose Gearscript Side", | ||
[ | ||
["LIST", "Choose gearscript side", [_sidesInUse apply {_x#1}, _sidesInUse apply {_x#0}, 0, (count _sidesInUse)]] | ||
], | ||
_createLocker, | ||
{}, | ||
_this | ||
|
||
] call zen_dialog_fnc_create; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
call | ||
{ | ||
private _category = "[CAFE3] Logistics"; | ||
|
||
[ | ||
"[CAFE3] Logistics", | ||
_category, | ||
"Create / refill supply crate", | ||
f_fnc_zen_createSupplyCrate | ||
|
||
] call zen_custom_modules_fnc_register; | ||
|
||
[ | ||
_category, | ||
"Create Loadout Locker", | ||
f_fnc_zen_createLoadoutLocker | ||
|
||
] call zen_custom_modules_fnc_register; | ||
}; |