public static void DropRoofInCells(List <IntVec3> cells, Map map, List <Thing> outCrushedThings = null)
        {
            if (cells.NullOrEmpty <IntVec3>())
            {
                return;
            }
            IntVec3 cell = IntVec3.Invalid;

            for (int i = 0; i < cells.Count; i++)
            {
                if (cells[i].Roofed(map))
                {
                    RoofCollapserImmediate.DropRoofInCellPhaseOne(cells[i], map, outCrushedThings);
                }
            }
            for (int j = 0; j < cells.Count; j++)
            {
                if (cells[j].Roofed(map))
                {
                    RoofCollapserImmediate.DropRoofInCellPhaseTwo(cells[j], map);
                    cell = cells[j];
                }
            }
            if (cell.IsValid)
            {
                SoundDefOf.Roof_Collapse.PlayOneShot(new TargetInfo(cell, map, false));
            }
        }
Beispiel #2
0
 public static void DropRoofInCells(IntVec3 c, Map map, List <Thing> outCrushedThings = null)
 {
     if (c.Roofed(map))
     {
         RoofCollapserImmediate.DropRoofInCellPhaseOne(c, map, outCrushedThings);
         RoofCollapserImmediate.DropRoofInCellPhaseTwo(c, map);
         SoundDefOf.Roof_Collapse.PlayOneShot(new TargetInfo(c, map, false));
     }
 }
Beispiel #3
0
 public static void DropRoofInCells(IntVec3 c, Map map)
 {
     if (c.Roofed(map))
     {
         RoofCollapserImmediate.DropRoofInCellPhaseOne(c, map);
         RoofCollapserImmediate.DropRoofInCellPhaseTwo(c, map);
         SoundDefOf.RoofCollapse.PlayOneShot(new TargetInfo(c, map, false));
     }
 }
        public static void DropRoofInCells(IEnumerable <IntVec3> cells, Map map, List <Thing> outCrushedThings = null)
        {
            IntVec3 cell = IntVec3.Invalid;

            foreach (IntVec3 current in cells)
            {
                if (current.Roofed(map))
                {
                    RoofCollapserImmediate.DropRoofInCellPhaseOne(current, map, outCrushedThings);
                }
            }
            foreach (IntVec3 current2 in cells)
            {
                if (current2.Roofed(map))
                {
                    RoofCollapserImmediate.DropRoofInCellPhaseTwo(current2, map);
                    cell = current2;
                }
            }
            if (cell.IsValid)
            {
                SoundDefOf.Roof_Collapse.PlayOneShot(new TargetInfo(cell, map, false));
            }
        }
Beispiel #5
0
        public static void DropRoofInCells(IEnumerable <IntVec3> cells, Map map)
        {
            IntVec3 cell = IntVec3.Invalid;

            foreach (IntVec3 cell2 in cells)
            {
                if (cell2.Roofed(map))
                {
                    RoofCollapserImmediate.DropRoofInCellPhaseOne(cell2, map);
                }
            }
            foreach (IntVec3 cell3 in cells)
            {
                if (cell3.Roofed(map))
                {
                    RoofCollapserImmediate.DropRoofInCellPhaseTwo(cell3, map);
                    cell = cell3;
                }
            }
            if (cell.IsValid)
            {
                SoundDefOf.RoofCollapse.PlayOneShot(new TargetInfo(cell, map, false));
            }
        }