21 {
23
24 if ( target_entity && target_entity.CanUseConstruction() )
25 {
26 string selection = target_entity.GetActionComponentName( target.GetComponentIndex() );
27 ConstructionActionData construction_action_data = player.GetConstructionActionData();
30
31 if ( slot_id != -1 )
32 {
35 {
36 construction_action_data.
SetSlotId( slot_id );
37
38 return true;
39 }
40 }
41 else if ( item.IsKindOf("CombinationLock") )
42 {
44
45
46
47
48
49 InventoryLocation loc = new InventoryLocation;
51
52 if (found)
53 {
54
56
57 return true;
58 }
59 }
60 }
61
62 return false;
63 }
FindInventoryLocationType
flags for searching locations in inventory
override bool IsPlayerInside(PlayerBase player, string selection)
override bool CheckSlotVerticalDistance(int slot_id, PlayerBase player)
int GetAttachmentSlotFromSelection(PlayerBase player, EntityAI target, ItemBase item_to_attach, string selection)
void SetSlotId(int slot_id)
proto native int GetSlot()
returns slot id if current type is Attachment