OverrideHasExtraUtilitySlot

Tracking Issue: #735

Tags: loadoutslots, events

Extends the ability check in HasExtraUtilitySlot() for the config array AbilityUnlocksExtraUtilitySlot (XComGameData.ini) to item granted abilities and abilities granted by the character template. Finally the event OverrideHasExtraUtilitySlot is triggered that allows mods to override the final result

OverrideHasExtraUtilitySlot event

Param Value
EventID OverrideHasExtraUtilitySlot
EventData XComLWTuple
EventSource XComGameState_Unit
NewGameState none

Tuple contents

Index Name Type Direction
0 bHasExtraUtilitySlot bool inout

Listener template

static function EventListenerReturn OnOverrideHasExtraUtilitySlot(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local XComGameState_Unit UnitState;
    local XComLWTuple Tuple;
    local bool bHasExtraUtilitySlot;

    UnitState = XComGameState_Unit(EventSource);
    Tuple = XComLWTuple(EventData);

    bHasExtraUtilitySlot = Tuple.Data[0].b;

    // Your code here

    Tuple.Data[0].b = bHasExtraUtilitySlot;

    return ELR_NoInterrupt;
}

Source code references