public static bool IsInPrisonCell(this IntVec3 c, Map map) { Room roomOrAdjacent = c.GetRoomOrAdjacent(map); if (roomOrAdjacent != null) { return(roomOrAdjacent.isPrisonCell); } Log.Error("Checking prison cell status of " + c + " which is not in or adjacent to a room."); return(false); }
public static bool IsInPrisonCell(this IntVec3 c, Map map) { Room roomOrAdjacent = c.GetRoomOrAdjacent(map, RegionType.Set_Passable); bool result; if (roomOrAdjacent != null) { result = roomOrAdjacent.isPrisonCell; } else { Log.Error("Checking prison cell status of " + c + " which is not in or adjacent to a room.", false); result = false; } return(result); }