29 {
31 if( !
IsInReach(player, target, UAMaxDistances.DEFAULT) )
return false;
32
33 Building building;
34 ToolBase tool;
35 if (Class.CastTo(building, target.GetObject())&& Class.CastTo(tool, item))
36 {
37 int doorIndex = building.
GetDoorIndex(target.GetComponentIndex());
38
39
40 AdditionalDoorInfo doorInfo = building.
GetDoorInfo(doorIndex);
42 {
44 {
45 EntityAI attachmentEntity = building.FindAttachmentBySlotName(relatedSlotName);
46 if (!attachmentEntity)
47 continue;
48
50 if (attachment && attachment.IsExternalLockType())
51 return false;
52 }
53 }
54
57 }
58
59 return false;
60 }
bool IsInReach(PlayerBase player, ActionTarget target, float maxDistance=1.0)
bool IsBuilding(ActionTarget target)
class GP5GasMask extends MaskBase ItemBase
ref TStringArray m_RelatedInventorySlotNames
Lock compatibility type, now in door config. Lockpick enabled by default if undefined.
AdditionalDoorInfo GetDoorInfo(int doorIdx)
int GetLockCompatibilityType(int doorIdx)
Which door is compatible with which key (door idx supplied). Bitwise.
proto native bool IsDoorLocked(int index)
When the door is locked.
proto native int GetDoorIndex(int componentIndex)
Gets the index of the door based on the view geometry component index.