OverridePromotionBlueprintTagPrefix

Tracking Issue: #600

Tags: ui, events

Fires an 'OverridePromotionBlueprintTagPrefix' event that allows mods to override the promotion blueprint tag prefix for the after action screen. This means that mods can ensure the camera is positioned properly when displaying their custom promotion screen during the post-mission cinematic.

OverridePromotionBlueprintTagPrefix event

Param Value
EventID OverridePromotionBlueprintTagPrefix
EventData XComLWTuple
EventSource UIAfterAction
NewGameState none

Tuple contents

Index Name Type Direction
0 UnitState XComGameState_Unit in
1 TagPrefix string inout

Listener template

static function EventListenerReturn OnOverridePromotionBlueprintTagPrefix(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local UIAfterAction Screen;
    local XComLWTuple Tuple;
    local XComGameState_Unit UnitState;
    local string TagPrefix;

    Screen = UIAfterAction(EventSource);
    Tuple = XComLWTuple(EventData);

    UnitState = XComGameState_Unit(Tuple.Data[0].o);
    TagPrefix = Tuple.Data[1].s;

    // Your code here

    Tuple.Data[1].s = TagPrefix;

    return ELR_NoInterrupt;
}

Source code references