mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Move medical logs clearing to treatment
This commit is contained in:
@ -63,15 +63,8 @@ _unit setVariable [QEGVAR(medical,bodyPartStatus), [0,0,0,0,0,0], true];
|
||||
// medication
|
||||
_unit setVariable [VAR_MEDICATIONS, [], true];
|
||||
|
||||
// TODO move to treatment
|
||||
private _logs = _unit getVariable [QEGVAR(medical,allLogs), []];
|
||||
{
|
||||
_unit setVariable [_x, nil];
|
||||
} forEach _logs;
|
||||
_unit setVariable [QEGVAR(medical,allLogs), [], true];
|
||||
|
||||
[{
|
||||
params ["_unit"];
|
||||
TRACE_2("Unit Init",_unit,local _unit);
|
||||
[QGVAR(initialized), [_unit]] call CBA_fnc_localEvent;
|
||||
}, [_unit], 0.5] call CBA_fnc_waitAndExecute;
|
||||
[QGVAR(initialized), _unit] call CBA_fnc_localEvent;
|
||||
}, _unit, 0.5] call CBA_fnc_waitAndExecute;
|
||||
|
@ -1,6 +1,18 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
[QEGVAR(medical_status,initialized), FUNC(checkItems)] call CBA_fnc_addEventHandler;
|
||||
[QEGVAR(medical_status,initialized), {
|
||||
params ["_unit"];
|
||||
|
||||
// Clear all saved medical logs
|
||||
{
|
||||
_unit setVariable [_x, nil, true];
|
||||
} forEach (_unit getVariable [QEGVAR(medical,allLogs), []]);
|
||||
|
||||
_unit setVariable [QEGVAR(medical,allLogs), [], true];
|
||||
|
||||
[_unit] call FUNC(checkItems);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["loadout", FUNC(checkItems)] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// Handle bodybags and litter on server
|
||||
|
Reference in New Issue
Block a user