Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical - Add treatment status events #8385

Merged
merged 2 commits into from Sep 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions addons/medical_treatment/functions/fnc_treatment.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
2 changes: 2 additions & 0 deletions addons/medical_treatment/functions/fnc_treatmentFailure.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
4 changes: 2 additions & 2 deletions addons/medical_treatment/functions/fnc_treatmentSuccess.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
4 changes: 3 additions & 1 deletion docs/wiki/framework/events-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down