public static Region GetRegion(this Thing thing, RegionType allowedRegionTypes = RegionType.Set_Passable) { if (!thing.Spawned) { return(null); } return(RegionAndRoomQuery.RegionAt(thing.Position, thing.Map, allowedRegionTypes)); }
public static Region GetRegion(this Thing thing, RegionType allowedRegionTypes = RegionType.Set_Passable) { Region result; if (!thing.Spawned) { result = null; } else { result = RegionAndRoomQuery.RegionAt(thing.Position, thing.Map, allowedRegionTypes); } return(result); }
public static Region GetRegion(this IntVec3 loc, Map map, RegionType allowedRegionTypes = RegionType.Set_Passable) { return(RegionAndRoomQuery.RegionAt(loc, map, allowedRegionTypes)); }
public static Room RoomAt(IntVec3 c, Map map, RegionType allowedRegionTypes = RegionType.Set_Passable) { Region region = RegionAndRoomQuery.RegionAt(c, map, allowedRegionTypes); return((region == null) ? null : region.Room); }