WoundRecoveryTimeModifier
Tracking Issue: #1582
Tags: events
Allows mods to apply a multiplier to the Wound recovery project time, where a
value of 1.0 makes no change, 2.0 doubles the duration, etc. Listeners can
get the recovering unit from the Healing project's ProjectFocus property.
WoundRecoveryTimeModifier event
| Param | Value |
|---|---|
| EventID | WoundRecoveryTimeModifier |
| EventData | XComLWTuple |
| EventSource | XComGameState_HeadquartersProjectHealSoldier |
| NewGameState | maybe |
Tuple contents
| Index | Name | Type | Direction |
|---|---|---|---|
| 0 | TimeMultiplier | float | inout |
| 1 | bAssumeActive | bool | in |
Listener template
static function EventListenerReturn OnWoundRecoveryTimeModifier(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
local XComGameState_HeadquartersProjectHealSoldier ProjectState;
local XComLWTuple Tuple;
local float TimeMultiplier;
local bool bAssumeActive;
ProjectState = XComGameState_HeadquartersProjectHealSoldier(EventSource);
Tuple = XComLWTuple(EventData);
TimeMultiplier = Tuple.Data[0].f;
bAssumeActive = Tuple.Data[1].b;
// Your code here
Tuple.Data[0].f = TimeMultiplier;
return ELR_NoInterrupt;
}
The NewGameState and bAssumeActive will be whatever caller to CalculateWorkPerHour() passes. Note that
both arguments are optional.
If you want to modify the TimeMultiplier, you must subscribe with ELD_Immediate deferral