protected override void DoEffect() { JobDriver_RemoveRoof.removedRoofs.Clear(); base.Map.roofGrid.SetRoof(base.Cell, null); JobDriver_RemoveRoof.removedRoofs.Add(base.Cell); RoofCollapseCellsFinder.CheckCollapseFlyingRoofs(JobDriver_RemoveRoof.removedRoofs, base.Map, true); JobDriver_RemoveRoof.removedRoofs.Clear(); }
protected override void DoEffect() { removedRoofs.Clear(); base.Map.roofGrid.SetRoof(base.Cell, null); removedRoofs.Add(base.Cell); RoofCollapseCellsFinder.CheckCollapseFlyingRoofs(removedRoofs, base.Map, removalMode: true); removedRoofs.Clear(); }
private void DestroyRoofs() { this.removedRoofsTmp.Clear(); foreach (IntVec3 intVec in from x in GenRadial.RadialCellsAround(base.Position, this.Graphic.drawSize.magnitude * 0.75f, true) where x.InBounds(base.Map) select x) { if (!this.CellImmuneToDamage(intVec) && intVec.Roofed(base.Map)) { RoofDef roof = intVec.GetRoof(base.Map); if (!roof.isThickRoof && !roof.isNatural) { RoofCollapserImmediate.DropRoofInCells(intVec, base.Map, null); this.removedRoofsTmp.Add(intVec); } } } if (this.removedRoofsTmp.Count > 0) { RoofCollapseCellsFinder.CheckCollapseFlyingRoofs(this.removedRoofsTmp, base.Map, true, false); } }
private void DestroyRoofs() { removedRoofsTmp.Clear(); foreach (IntVec3 item in from x in GenRadial.RadialCellsAround(base.Position, 4.2f, useCenter: true) where x.InBounds(base.Map) select x) { if (!CellImmuneToDamage(item) && item.Roofed(base.Map)) { RoofDef roof = item.GetRoof(base.Map); if (!roof.isThickRoof && !roof.isNatural) { RoofCollapserImmediate.DropRoofInCells(item, base.Map); removedRoofsTmp.Add(item); } } } if (removedRoofsTmp.Count > 0) { RoofCollapseCellsFinder.CheckCollapseFlyingRoofs(removedRoofsTmp, base.Map, removalMode: true); } }