示例#1
0
 public static void WipeExistingThings(IntVec3 thingPos, Rot4 thingRot, BuildableDef thingDef, Map map, DestroyMode mode)
 {
     foreach (IntVec3 current in GenAdj.CellsOccupiedBy(thingPos, thingRot, thingDef.Size))
     {
         foreach (Thing current2 in map.thingGrid.ThingsAt(current).ToList <Thing>())
         {
             if (GenSpawn.SpawningWipes(thingDef, current2.def))
             {
                 current2.Destroy(mode);
             }
         }
     }
 }
示例#2
0
 public static void WipeExistingThings(IntVec3 thingPos, Rot4 thingRot, BuildableDef thingDef, Map map, DestroyMode mode)
 {
     foreach (IntVec3 item in GenAdj.CellsOccupiedBy(thingPos, thingRot, thingDef.Size))
     {
         foreach (Thing item2 in map.thingGrid.ThingsAt(item).ToList())
         {
             if (SpawningWipes(thingDef, item2.def))
             {
                 item2.Destroy(mode);
             }
         }
     }
 }
示例#3
0
 public static IEnumerable <IntVec3> CellsOccupiedBy(Thing t)
 {
     if (t.def.size.x == 1 && t.def.size.z == 1)
     {
         yield return(t.Position);
     }
     else
     {
         foreach (IntVec3 c in GenAdj.CellsOccupiedBy(t.Position, t.Rotation, t.def.size))
         {
             yield return(c);
         }
     }
 }
示例#4
0
        public static IEnumerable <IntVec3> CellsOccupiedBy(Thing t)
        {
            if (t.def.size.x == 1 && t.def.size.z == 1)
            {
                yield return(t.Position);

                /*Error: Unable to find new state assignment for yield return*/;
            }
            using (IEnumerator <IntVec3> enumerator = GenAdj.CellsOccupiedBy(t.Position, t.Rotation, t.def.size).GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    IntVec3 c = enumerator.Current;
                    yield return(c);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            yield break;
IL_013d:
            /*Error near IL_013e: Unexpected return in MoveNext()*/;
        }