AllowRulerOnMission

Tracking Issue: #791

Tags: dlc2, events

Allows listeners to forbid a particular (or all) rulers from a particular XComGameState_MissionSite.

Be aware that the AlienRulerLocations system completely bypasses this check (doesn't trigger this event).

AllowRulerOnMission event

Param Value
EventID AllowRulerOnMission
EventData XComLWTuple
EventSource XComGameState_MissionSite
NewGameState yes

Tuple contents

Index Name Type Direction
0 bAllowRuler bool inout
1 RulerObjectID int in

Listener template

static function EventListenerReturn OnAllowRulerOnMission(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local XComGameState_MissionSite MissionState;
    local XComLWTuple Tuple;
    local bool bAllowRuler;
    local int RulerObjectID;

    MissionState = XComGameState_MissionSite(EventSource);
    Tuple = XComLWTuple(EventData);

    bAllowRuler = Tuple.Data[0].b;
    RulerObjectID = Tuple.Data[1].i;

    // Your code here

    Tuple.Data[0].b = bAllowRuler;

    return ELR_NoInterrupt;
}

Source code references