OnGetPCSImage

Tracking Issue: #110

Tags: ui, events

Allows overriding the UI image for a PCS. The base game switches on the stat being boosted, which precludes custom PCS from having a custom icon. Note that for historical reasons, the tuple ID is GetPCSImageTuple while the event ID is OnGetPCSImage.

OnGetPCSImage event

Param Value
EventID OnGetPCSImage
EventData XComLWTuple
EventSource none
NewGameState none

Tuple contents

Index Name Type Direction
0 ItemState XComGameState_Item in
1 ImagePath string out

Listener template

static function EventListenerReturn OnOnGetPCSImage(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local XComLWTuple Tuple;
    local XComGameState_Item ItemState;
    local string ImagePath;

    Tuple = XComLWTuple(EventData);

    ItemState = XComGameState_Item(Tuple.Data[0].o);

    // Your code here

    Tuple.Data[1].s = ImagePath;

    return ELR_NoInterrupt;
}

Source code references