Merge branch 'main' into inv_expan
This commit is contained in:
@@ -5,35 +5,42 @@ if ( !hasInterface ) exitWith {};
|
||||
"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", [[1,2,3], [["Ammo"],["Weapons"],["Medical"]],0] ]
|
||||
["COMBO", "Box Type", [_keysSorted, _comboOptions, 0]]
|
||||
],
|
||||
{
|
||||
|
||||
params ["_dialog", "_args"];
|
||||
|
||||
_dialog params ["_type"];
|
||||
_args params ["_pos", "_target"];
|
||||
|
||||
switch (_type) do {
|
||||
case 1: {
|
||||
[_target, _pos] call milsim_fnc_createAmmoBox;
|
||||
};
|
||||
case 2: {
|
||||
[_target, _pos] call milsim_fnc_createWeaponsBox;
|
||||
};
|
||||
case 3: {
|
||||
[_target, _pos] call milsim_fnc_createMedicalBox;
|
||||
};
|
||||
_dialog params ["_typeOptionSelected"];
|
||||
_args params ["_pos", "_target", "_keysSorted"];
|
||||
|
||||
|
||||
private _box = [_target, _typeOptionSelected, _pos] call milsim_fnc_createBox;
|
||||
if (isNull _box) exitWith {
|
||||
["Resupply Box", "WARNING: Failed to locate or create box!"] call BIS_fnc_curatorHint;
|
||||
};
|
||||
["Resupply Box", format["Created a %1 box", _typeOptionSelected]] call BIS_fnc_curatorHint;
|
||||
},
|
||||
{},
|
||||
[_pos, _target]
|
||||
[_pos, _target, _options]
|
||||
] call zen_dialog_fnc_create;
|
||||
|
||||
}
|
||||
] call zen_custom_modules_fnc_register;
|
||||
|
||||
|
||||
@@ -3,9 +3,12 @@ if ( !hasInterface ) exitWith {};
|
||||
player addEventHandler["Respawn",
|
||||
{
|
||||
params ["_unit", "_corpse"];
|
||||
_killer = _corpse getVariable ["ace_medical_causeOfDeath", "#scripted"];
|
||||
private _killer = _corpse getVariable ["ace_medical_causeOfDeath", "#scripted"];
|
||||
if (_killer == "respawn_button") then {
|
||||
format["[MILSIM] (client) %1 was unconscious then clicked the respawn button", name _unit] remoteExec["diag_log", 0];
|
||||
format[
|
||||
"[MILSIM] (client) RESPAWNED WHILE UNCONSCIOUS %1",
|
||||
[_unit] call milsim_fnc_getPlayerLogString
|
||||
] remoteExec["diag_log", 0];
|
||||
// format["%1 was unconscious then clicked the respawn button", name _unit] remoteExec["systemChat", 0];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user