1class RestrainingToolLocked
extends ItemBase
3 void ~RestrainingToolLocked()
5 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
6 if ( player && player.IsRestrained() )
8 player.SetRestrained(
false);
12 override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
14 super.EEItemLocationChanged(oldLoc, newLoc);
18 if ( oldLoc.IsValid() && oldLoc.GetParent() )
20 PlayerBase old_player = PlayerBase.Cast(oldLoc.GetParent().GetHierarchyRootPlayer());
21 if (old_player && old_player.IsRestrained())
23 old_player.SetRestrained(
false);
28 if ( newLoc.IsValid() )
30 if (newLoc.GetParent())
32 PlayerBase player = PlayerBase.Cast(newLoc.GetParent().GetHierarchyRootPlayer());
38 if ( !player.IsRestrained() )
40 player.SetRestrained(
true);
41 player.OnItemInHandsChanged();
44 if (player.IsControlledPlayer())
45 player.OnRestrainStart();
55 if (oldLoc.GetParent())
57 PlayerBase old_p = PlayerBase.Cast(oldLoc.GetParent().GetHierarchyRootPlayer());
60 MiscGameplayFunctions.TransformRestrainItem(
this, null, old_p, old_p);
72 super.EEKilled(killer);
74 InventoryLocation inventoryLocation =
new InventoryLocation();
75 GetInventory().GetCurrentInventoryLocation(inventoryLocation);
76 if (!inventoryLocation || !inventoryLocation.IsValid())
81 PlayerBase player = PlayerBase.Cast(inventoryLocation.GetParent());
82 if (player && player.IsRestrained())
84 player.SetRestrained(
false);
85 MiscGameplayFunctions.TransformRestrainItem(
this, null, player, player);
98class HandcuffsLocked
extends RestrainingToolLocked
102class RopeLocked
extends RestrainingToolLocked
106class DuctTapeLocked
extends RestrainingToolLocked
110class MetalWireLocked
extends RestrainingToolLocked
114class BarbedWireLocked
extends RestrainingToolLocked
void AddAction(typename actionName)
override void SetActions()
override void EEKilled(Object killer)
InventoryLocationType
types of Inventory Location
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)