mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added storage for all logs
This commit is contained in:
parent
05d2d9de6b
commit
6d01a00901
@ -48,3 +48,9 @@ _log pushback [_message,_moment,_type, _arguments];
|
|||||||
|
|
||||||
_unit setvariable [_logVarName, _log, true];
|
_unit setvariable [_logVarName, _log, true];
|
||||||
["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call ace_common_fnc_localEvent;
|
["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call ace_common_fnc_localEvent;
|
||||||
|
|
||||||
|
_logs = _unit getvariable [QGVAR(allLogs), []];
|
||||||
|
if !(_logVarName in _logs) then {
|
||||||
|
_logs pushback _logVarName;
|
||||||
|
_unit setvariable [QGVAR(allLogs), _logs, true];
|
||||||
|
};
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit"];
|
private ["_unit", "_allUsedMedication", "_logs"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
|
|
||||||
@ -67,3 +67,9 @@ _allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []];
|
|||||||
{
|
{
|
||||||
_unit setvariable [_x select 0, nil];
|
_unit setvariable [_x select 0, nil];
|
||||||
}foreach _allUsedMedication;
|
}foreach _allUsedMedication;
|
||||||
|
|
||||||
|
_logs = _unit getvariable [QGVAR(allLogs), []];
|
||||||
|
{
|
||||||
|
_unit setvariable [_x, nil, true];
|
||||||
|
}foreach _logs;
|
||||||
|
_unit setvariable [QGVAR(allLogs), [], true];
|
||||||
|
Loading…
Reference in New Issue
Block a user