Added storage for all logs

This commit is contained in:
Glowbal 2015-02-28 11:47:35 +01:00
parent 05d2d9de6b
commit 6d01a00901
2 changed files with 13 additions and 1 deletions

View File

@ -48,3 +48,9 @@ _log pushback [_message,_moment,_type, _arguments];
_unit setvariable [_logVarName, _log, true];
["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];
};

View File

@ -13,7 +13,7 @@
#include "script_component.hpp"
private ["_unit"];
private ["_unit", "_allUsedMedication", "_logs"];
_unit = _this select 0;
@ -67,3 +67,9 @@ _allUsedMedication = _target getVariable [QGVAR(allUsedMedication), []];
{
_unit setvariable [_x select 0, nil];
}foreach _allUsedMedication;
_logs = _unit getvariable [QGVAR(allLogs), []];
{
_unit setvariable [_x, nil, true];
}foreach _logs;
_unit setvariable [QGVAR(allLogs), [], true];