예제 #1
0
 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);
        }
예제 #3
0
 public static Region GetRegion(this IntVec3 loc, Map map, RegionType allowedRegionTypes = RegionType.Set_Passable)
 {
     return(RegionAndRoomQuery.RegionAt(loc, map, allowedRegionTypes));
 }
예제 #4
0
        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);
        }