-
Notifications
You must be signed in to change notification settings - Fork 739
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
Make state change status updates consistent #6538
Conversation
State transitions call respective functions in the status component where unit variables and status are actually handled.
@@ -1,7 +1,8 @@ | |||
#include "script_component.hpp" | |||
/* | |||
* Author: BaerMitUmlaut | |||
* Handles a unit entering cardiac arrest. | |||
* Author: RedBery |
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.
Author: BaerMitUmlaut, RedBery
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.
Baer's name was only here because the enteredStateCardiacArrest file was copied over and edited so the header was for that function.
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.
ok. I got confused :)
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
State transitions call respective functions in the status component where unit variables and status are actually handled.
State transitions now call their respective status update functions in the status component where unit variables and status are actually handled.
We don't actually need to use events here since the statemachine component depends on the status component. For public consumption we already raise an
ace_unconscious
andace_cardiacArrest
event within the status update functions (the latter I changed to make consistent with existing unconscious event so it fires for both entry and exit).This PR also fixes an additional behaviour where on death a unit would become bloodied even if they weren't before (untested, but going by the
setStructuralDamage
function header that's what it's for).I've also taken the chance to rename the
setUnconsciousStatemachine
function to simplysetUnconscious
since it resides in the status component and thus has the prefix to differentiate it from the publicace_medical_fnc_setUnconscious
.Closes #6531