AllowInteractHack
Tracking Issue: #564
Tags: events
The AllowInteractHack event allows mods to forbid an interactive object from being hackable by a unit.
AllowInteractHack event
| Param | Value | 
|---|---|
| EventID | AllowInteractHack | 
| EventData | XComLWTuple | 
| EventSource | XComGameState_InteractiveObject | 
| NewGameState | none | 
Tuple contents
| Index | Name | Type | Direction | 
|---|---|---|---|
| 0 | bAllowInteractHack | bool | inout | 
| 1 | HackingUnit | XComGameState_Unit | in | 
Listener template
static function EventListenerReturn OnAllowInteractHack(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local XComGameState_InteractiveObject InteractiveObject;
    local XComLWTuple Tuple;
    local bool bAllowInteractHack;
    local XComGameState_Unit HackingUnit;
    InteractiveObject = XComGameState_InteractiveObject(EventSource);
    Tuple = XComLWTuple(EventData);
    bAllowInteractHack = Tuple.Data[0].b;
    HackingUnit = XComGameState_Unit(Tuple.Data[1].o);
    // Your code here
    Tuple.Data[0].b = bAllowInteractHack;
    return ELR_NoInterrupt;
}