OverrideShowPromoteIcon
Tracking Issue: #631
Tags: events
The OverrideShowPromoteIcon event allows mods to determine
whether a promotion icon for a particular soldier should be displayed or not.
This can be relevant for mods that add their own promotion mechanics for soldiers,
e.g. a psionic class that has to go on a few missions before they can be stuck into
a Psi Lab to get their promotion.
OverrideShowPromoteIcon event
| Param | Value | 
|---|---|
| EventID | OverrideShowPromoteIcon | 
| EventData | XComLWTuple | 
| EventSource | XComGameState_Unit | 
| NewGameState | none | 
Tuple contents
| Index | Name | Type | Direction | 
|---|---|---|---|
| 0 | bShowPromotionIcon | bool | inout | 
Listener template
static function EventListenerReturn OnOverrideShowPromoteIcon(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local XComGameState_Unit UnitState;
    local XComLWTuple Tuple;
    local bool bShowPromotionIcon;
    UnitState = XComGameState_Unit(EventSource);
    Tuple = XComLWTuple(EventData);
    bShowPromotionIcon = Tuple.Data[0].b;
    // Your code here
    Tuple.Data[0].b = bShowPromotionIcon;
    return ELR_NoInterrupt;
}