ACE3/addons/medical_ai/XEH_postInit.sqf
PabstMirror 25b8fd6d54
Medical AI - Add setting to require items for treatment (#9362)
* Medical AI - Add setting to require items for treatment

* all ivs

* invert setting

* Update addons/medical_ai/stringtable.xml

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* move item hash to preStart

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2023-09-06 12:37:26 -04:00

25 lines
814 B
Plaintext

#include "script_component.hpp"
["CBA_settingsInitialized", {
TRACE_1("settingsInitialized", GVAR(enabledFor));
if (GVAR(enabledFor) == 0) exitWith {}; // 0: disabled
if ((GVAR(enabledFor) == 1) && {!isServer} && {hasInterface}) exitWith {}; // 1: Don't Run on non-hc Clients
["ace_firedNonPlayer", {
_unit setVariable [QGVAR(lastFired), CBA_missionTime];
}] call CBA_fnc_addEventHandler;
["CAManBase", "Hit", {
params ["_unit"];
_unit setVariable [QGVAR(lastHit), CBA_missionTime];
}] call CBA_fnc_addClassEventHandler;
["CAManBase", "Suppressed", {
params ["_unit"];
_unit setVariable [QGVAR(lastSuppressed), CBA_missionTime];
}] call CBA_fnc_addClassEventHandler;
#include "stateMachine.sqf"
}] call CBA_fnc_addEventHandler;