-
Notifications
You must be signed in to change notification settings - Fork 70
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
Create an option to make Fatigue and Injury Times Independent #1149
Create an option to make Fatigue and Injury Times Independent #1149
Conversation
Pull request modifies event listener templates Difference (click to expand)diff --git a/target/CHL_Event_Compiletest.uc b/target/CHL_Event_Compiletest.uc
index c229218..ceded57 100644
--- a/target/CHL_Event_Compiletest.uc
+++ b/target/CHL_Event_Compiletest.uc
@@ -630,6 +630,24 @@ static function EventListenerReturn OnOverrideHitEffects(Object EventData, Objec
return ELR_NoInterrupt;
}
+static function EventListenerReturn OnOverrideInjuryClearingFatigueBehavior(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
+{
+ local XComGameState_Unit UnitState;
+ local XComLWTuple Tuple;
+ local bool ShouldOverride;
+
+ UnitState = XComGameState_Unit(EventSource);
+ Tuple = XComLWTuple(EventData);
+
+ ShouldOverride = Tuple.Data[0].b;
+
+ // Your code here
+
+ Tuple.Data[0].b = ShouldOverride;
+
+ return ELR_NoInterrupt;
+}
+
static function EventListenerReturn OnOverrideKillXp(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
local XComGameState_Unit KilledUnit;
What? (click to expand)The Highlander documentation tool generates event listener examples from event specifications. |
Looks good to me. Is this tested? |
How does the unit status UI behave? |
X2WOTCCommunityHighlander/Src/XComGame/Classes/XComGameStateContext_HeadquartersOrder.uc
Outdated
Show resolved
Hide resolved
…ntext_HeadquartersOrder.uc Co-authored-by: robojumper <robojumper@gmail.com>
I've tested it, if you just put it to false, then the unit switches to the shaken status after recovering from injury. |
The problem with this is that the player has no idea when the soldier will actually be available for duty |
I don't think it's that big of a problem, you can still clearly see the red will regardless, but even then |
A systemic change like that would've been probably better implemented as a config bool, I struggle to come up with a use case where you would want different behavior for different soldiers in this regard.
I agree that this is a problem as well. However, I don't see either as grounds enough to deny this change, seeing as it preserves the vanilla behavior either way. |
Fixes #1148