-
Notifications
You must be signed in to change notification settings - Fork 740
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
Conversation
@@ -147,6 +147,8 @@ if (_callbackProgress isEqualTo {}) then { | |||
|
|||
[_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem] call _callbackStart; | |||
|
|||
[QGVAR(treatmentStartedLocal), [_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem]] call CBA_fnc_localEvent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These don't need to have Local
at the end of them, that is implied by localEvent
and is documented.
It looks like these should also be simplified to ace_treatmentStarted
rather than ace_medical_treatment_treatmentStartedLocal
, but I'd let someone else confirm that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the Local
tags.
Quite a lot of events in ACE are QGVAR. Is this convention supposed to be internal then? If yes, I could append the arguments to ace_treatmentSucceded
instead of making a new event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Updated
ace_treatmentSucceded
with_itemUser
and_usedItem
parameters; - Renamed other two events to
ace_treatmentStarted
andace_treatmentFailed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I believe we decided at some point that QGVAR events for internal only and public events can just use ace_
, probably not documented anywhere though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Adds
ace_medical_treatment_treatmentStartedLocal
ace_medical_treatment_treatmentSucceededLocal
, andace_medical_treatment_treatmentFailedLocal
CBA events. All of them have the same six parameters passed unchanged from the treatment action:
_medic
,_patient
,_bodyPart
,_classname
,_itemUser
,_usedItem
.Rationale:
I've been trying to write a ShackTac-style medical extension without forking ACE. When trying to add a "PlayerName is bandaging you"/"You are being assisted" hint, I've been stopped by the following drawbacks in existing
ace_medical_treatment_{TREATMENT}Local
(e.g.ace_medical_treatment_bandageLocal
) events:_medic
parameter.Here's an example of someone else trying to do this kind of hint with the existing API. I think this PR would improve the situation.
Existing "ace_treatmentSucceded" event seems grandfathered in from before the medical rewrite, so I'm leaving it alone.