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 if (doorIndex != -1 && tool.GetKeyCompatibilityType() & building.GetLockCompatibilityType(doorIndex))
39 return building.IsDoorLocked(doorIndex);
40 }
41 return false;
42 }
bool IsInReach(PlayerBase player, ActionTarget target, float maxDistance=1.0)
bool IsBuilding(ActionTarget target)