public static WaterRegion GetRegion(this Thing thing, RegionType allowedRegiontypes = RegionType.Set_Passable) { if (!thing.Spawned) { return(null); } return(!thing.Spawned ? null : WaterRegionAndRoomQuery.RegionAt(thing.Position, thing.Map, allowedRegiontypes)); }
public static WaterRoom RoomAt(IntVec3 c, Map map, RegionType allowedRegionTypes = RegionType.Set_Passable) { WaterRegion region = WaterRegionAndRoomQuery.RegionAt(c, map, allowedRegionTypes); return(region is null ? null : region.Room); }
public static WaterRegion GetRegion(this IntVec3 loc, Map map, RegionType allowedRegionTypes = RegionType.Set_Passable) { return(WaterRegionAndRoomQuery.RegionAt(loc, map, allowedRegionTypes)); }