2015-01-11 16:42:31 +00:00
|
|
|
// by commy2
|
2015-01-13 19:56:02 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-12 04:02:33 +00:00
|
|
|
if ((_this select 0) in (missionNamespace getVariable ["ACE_Debug", []])) then {
|
2015-05-14 18:06:06 +00:00
|
|
|
_this resize 4;
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
PARAMS_4(_type,_argument,_function,_showInGame);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
if (isNil "_function") then {
|
|
|
|
_function = {_this};
|
|
|
|
};
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
if (isNil "_showInGame") then {
|
|
|
|
_showInGame = true;
|
|
|
|
};
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
private "_result";
|
|
|
|
_result = _argument call _function;
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
if (_showInGame) then {
|
|
|
|
systemChat format ["%1", _result];
|
|
|
|
};
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
diag_log text format ["[ACE] Debug: %1 : %2 - %3 : %4", _type, diag_frameno, _fnc_scriptNameParent, _result];
|
2015-01-11 16:42:31 +00:00
|
|
|
};
|