Medical - Add treatment status events (#8385)

* Medical: Add item params to ace_treatmentSucceded

* Medical: Add treatment[Started,Failed] events
This commit is contained in:
∂ω∂ 2021-09-03 19:37:48 +00:00 committed by GitHub
parent ce91d19f28
commit f7126383fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 3 deletions

View File

@ -147,6 +147,8 @@ if (_callbackProgress isEqualTo {}) then {
[_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem] call _callbackStart;
["ace_treatmentStarted", [_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem]] call CBA_fnc_localEvent;
[
_treatmentTime,
[_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem],

View File

@ -48,3 +48,5 @@ if (!isNil QEGVAR(advanced_fatigue,setAnimExclusions)) then {
GET_FUNCTION(_callbackFailure,configFile >> QGVAR(actions) >> _classname >> "callbackFailure");
_args call _callbackFailure;
["ace_treatmentFailed", [_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem]] call CBA_fnc_localEvent;

View File

@ -19,7 +19,7 @@
*/
params ["_args"];
_args params ["_medic", "_patient", "_bodyPart", "_classname"];
_args params ["_medic", "_patient", "_bodyPart", "_classname", "_itemUser", "_usedItem"];
// Switch medic to end animation immediately
private _endInAnim = _medic getVariable QGVAR(endInAnim);
@ -48,4 +48,4 @@ _args call _callbackSuccess;
_args call FUNC(createLitter);
// Emit local event for medical API
["ace_treatmentSucceded", [_medic, _patient, _bodyPart, _classname]] call CBA_fnc_localEvent;
["ace_treatmentSucceded", [_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem]] call CBA_fnc_localEvent;

View File

@ -37,7 +37,9 @@ The vehicle events will also have the following local variables available `_gunn
|----------|---------|---------|---------|---------|---------|
|`ace_unconscious` | [_unit, _state(BOOL)] | Global | Listen | Unit's unconscious state changed
|`ace_placedInBodyBag` | [_target, _bodyBag] | Global | Listen | Target placed into a bodybag Note: (Target will soon be deleted)
|`ace_treatmentSucceded` | [_caller, _target, _selectionName, _className] | Local | Listen | Treatment action is completed (local on the _caller)
|`ace_treatmentStarted` | [_caller, _target, _selectionName, _className, _itemUser, _usedItem] | Local | Listen | Treatment action is completed (local on the _caller)
|`ace_treatmentSucceded` | [_caller, _target, _selectionName, _className, _itemUser, _usedItem] | Local | Listen | Treatment action is completed (local on the _caller)
|`ace_treatmentFailed` | [_caller, _target, _selectionName, _className, _itemUser, _usedItem] | Local | Listen | Treatment action is completed (local on the _caller)
### 2.3 Interaction Menu (`ace_interact_menu`)
MenuType: 0 = Interaction, 1 = Self Interaction