OverrideDarkEventCount

Tracking Issue: #711

Tags: events

Triggers the event OverrideDarkEventCount to allow mods to change the number of dark events in the monthly report.

OverrideDarkEventCount event

Param Value
EventID OverrideDarkEventCount
EventData XComLWTuple
EventSource XComGameState_HeadquartersAlien
NewGameState yes

Tuple contents

Index Name Type Direction
0 NumEvents int inout
1 bChosenAddedEvent bool inout

Listener template

static function EventListenerReturn OnOverrideDarkEventCount(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local XComGameState_HeadquartersAlien AlienHQ;
    local XComLWTuple Tuple;
    local int NumEvents;
    local bool bChosenAddedEvent;

    AlienHQ = XComGameState_HeadquartersAlien(EventSource);
    Tuple = XComLWTuple(EventData);

    NumEvents = Tuple.Data[0].i;
    bChosenAddedEvent = Tuple.Data[1].b;

    // Your code here

    Tuple.Data[0].i = NumEvents;
    Tuple.Data[1].b = bChosenAddedEvent;

    return ELR_NoInterrupt;
}

Source code references