35 if (
Class.CastTo(building, target.GetObject())&&
Class.CastTo(tool, item))
37 int doorIndex = building.GetDoorIndex(target.GetComponentIndex());
38 if (doorIndex != -1 && tool.GetKeyCompatibilityType() & building.GetLockCompatibilityType(doorIndex))
39 return building.IsDoorLocked(doorIndex);