GetLocalizedItemCategory

Tracking Issue: #1112

Tags: events

Triggers GetLocalizedItemCategory event that can be used by mods to localize their new item categories.

GetLocalizedItemCategory event

Param Value
EventID GetLocalizedItemCategory
EventData XComLWTuple
EventSource X2ItemTemplate
NewGameState none

Tuple contents

Index Name Type Direction
0 CategoryLocale string out

Listener template

static function EventListenerReturn OnGetLocalizedItemCategory(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local X2ItemTemplate ItemTemplate;
    local XComLWTuple Tuple;
    local string CategoryLocale;

    ItemTemplate = X2ItemTemplate(EventSource);
    Tuple = XComLWTuple(EventData);

    // Your code here

    Tuple.Data[0].s = CategoryLocale;

    return ELR_NoInterrupt;
}

Source code references