/// <summary> /// Don not use directly, use chunk.DeleteBlock() instead /// </summary> public void Annihilate(BlockAnnihilationOrder order) { //#block annihilate if (destroyed | GameMaster.sceneClearing) { return; } else { destroyed = true; } extension?.Annihilate(order); if (mainStructure != null) { if (mainStructureIsABlocker) { if (!order.chunkClearing) { mainStructure.SectionDeleted(pos); } } else { mainStructure.Annihilate(StructureAnnihilationOrder.ChunkClearing); } mainStructure = null; } }
/// <summary> /// Don not use directly, use chunk.DeleteBlock() instead /// </summary> public void Annihilate(bool compensateStructures) { //#block annihilate if (destroyed | GameMaster.sceneClearing) { return; } else { destroyed = true; } extension?.Annihilate(compensateStructures); if (mainStructure != null) { if (mainStructureIsABlocker) { mainStructure.SectionDeleted(pos); } else { (mainStructure as IPlanable).Delete(true, compensateStructures, false); } mainStructure = null; } }