CanTechBeInspired

Tracking Issue: #633

Tags: events

The CanTechBeInspired event allows mods to forbid a tech from being inspired. This provides an important lever for balancing the strategy game. It's particularly important for repeatable techs, which the inspiration mechanic doesn't seem to handle very well (the techs remain inspired even after the first inspired research of them is complete).

CanTechBeInspired event

Param Value
EventID CanTechBeInspired
EventData XComLWTuple
EventSource XComGameState_Tech
NewGameState yes

Tuple contents

Index Name Type Direction
0 bCanTechBeInspired bool inout

Listener template

static function EventListenerReturn OnCanTechBeInspired(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local XComGameState_Tech TechState;
    local XComLWTuple Tuple;
    local bool bCanTechBeInspired;

    TechState = XComGameState_Tech(EventSource);
    Tuple = XComLWTuple(EventData);

    bCanTechBeInspired = Tuple.Data[0].b;

    // Your code here

    Tuple.Data[0].b = bCanTechBeInspired;

    return ELR_NoInterrupt;
}

Source code references