OverridePatrolDestination
Tracking Issue: #718
Tags: events
Allow mods to override patrol locations from other alert data causes
Listeners can set AllowThisCause
to true
to allow this AlertCause
OverridePatrolDestination event
Param | Value |
---|---|
EventID | OverridePatrolDestination |
EventData | XComLWTuple |
EventSource | none |
NewGameState | none |
Tuple contents
Index | Name | Type | Direction |
---|---|---|---|
0 | AlertCause | int | in |
1 | AllowThisCause | bool | inout |
Listener template
static function EventListenerReturn OnOverridePatrolDestination(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
local XComLWTuple Tuple;
local int AlertCause;
local bool AllowThisCause;
Tuple = XComLWTuple(EventData);
AlertCause = Tuple.Data[0].i;
AllowThisCause = Tuple.Data[1].b;
// Your code here
Tuple.Data[1].b = AllowThisCause;
return ELR_NoInterrupt;
}