82 lines
2.0 KiB
Plaintext
82 lines
2.0 KiB
Plaintext
if ( !hasInterface ) exitWith {};
|
|
|
|
[
|
|
"17th Battalion",
|
|
"Create Resupply Box",
|
|
{
|
|
params [["_pos", [0,0,0], [[]], 3], ["_target", objNull, [objNull]]];
|
|
_keysSorted = keys milsim_resupply_crateDefinitions;
|
|
_keysSorted sort true;
|
|
_comboOptions = [];
|
|
_comboOptions resize (count _keysSorted);
|
|
for "_i" from 0 to (count _keysSorted) - 1 do {
|
|
private _definition = milsim_resupply_crateDefinitions get (_keysSorted select _i);
|
|
_comboOptions set [_i, [
|
|
_definition getOrDefault ["displayName", "ERROR"], // display name
|
|
_definition getOrDefault ["description", "No description"], // tooltip
|
|
_definition getOrDefault ["icon", "No icon"] // icon
|
|
]];
|
|
};
|
|
|
|
[
|
|
"Resupply Box Options",
|
|
[
|
|
// [ "COMBO", "Box Type", [[1,2,3], [["Ammo"],["Weapons"],["Medical"]],0] ]
|
|
["COMBO", "Box Type", [_keysSorted, _comboOptions, 0]]
|
|
],
|
|
{
|
|
|
|
params ["_dialog", "_args"];
|
|
|
|
_dialog params ["_typeOptionSelected"];
|
|
_args params ["_pos", "_target", "_keysSorted"];
|
|
|
|
|
|
if ([_target, _typeOptionSelected, _pos] call milsim_fnc_createBox) then {
|
|
["Resupply Box", format["Created a %1 box", _typeOptionSelected]] call BIS_fnc_curatorHint;
|
|
};
|
|
},
|
|
{},
|
|
[_pos, _target, _options]
|
|
] call zen_dialog_fnc_create;
|
|
}
|
|
] call zen_custom_modules_fnc_register;
|
|
|
|
|
|
[
|
|
"17th Battalion",
|
|
"Grounds Cleanup",
|
|
{
|
|
params [["_pos", [0,0,0], [[]], 3], ["_target", objNull, [objNull]]];
|
|
|
|
_pos = [_pos#0, _pos#1, 0];
|
|
|
|
[
|
|
"Cleanup Area",
|
|
[
|
|
[ "SLIDER:RADIUS", "Radius (meters)", [50, 500, 100, 0, _pos, [0.8, 0.2, 0.2, 1.0]], true ]
|
|
],
|
|
{
|
|
|
|
params ["_dialog", "_args"];
|
|
|
|
_dialog params ["_radius"];
|
|
_args params ["_pos", "_target"];
|
|
|
|
_objects = _pos nearObjects ["GroundWeaponHolder", _radius];
|
|
{
|
|
deleteVehicle _x;
|
|
} forEach _objects
|
|
|
|
},
|
|
{},
|
|
[_pos, _target]
|
|
] call zen_dialog_fnc_create;
|
|
|
|
}
|
|
] call zen_custom_modules_fnc_register;
|
|
|
|
|
|
diag_log text "[MILSIM] (client) zeus modules added";
|
|
|
|
nil; |