Added startCallback config entry

This commit is contained in:
Zakant 2017-03-23 13:03:19 +01:00
parent 5c89232306
commit 0d329e0f63
2 changed files with 14 additions and 0 deletions

View File

@ -252,6 +252,7 @@ class GVAR(Actions) {
callbackSuccess = QFUNC(treatmentCPR);
callbackFailure = "";
callbackProgress = QUOTE(!([(_this select 0) select 1] call EFUNC(common,isAwake)));
callbackStart = "";
animationPatient = "";
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationCaller = "AinvPknlMstpSlayW[wpn]Dnon_medic";

View File

@ -179,6 +179,19 @@ if (isArray (_config >> "sounds")) then {
];
};
private _startCallback = getText (_config >> "callbackStart");
if (isNil _startCallback) then {
_startCallback = compile _startCallback;
} else {
_startCallback = missionNamespace getVariable _startCallback;
};
if !(_startCallback isEqualType {}) then {
_startCallback = {TRACE_1("startCallback was NOT code",_startCallback)};
};
[_caller, _target, _bodyPart, _className, _items, _usersOfItems] call _startCallback;
// start treatment
[
_treatmentTime,