public void Delete(BlockAnnihilationOrder order) { if (destroyed) { return; } else { destroyed = true; } PrepareWorkbuildingForDestruction(order.GetStructureOrder()); if (subscribedToUpdate) { GameMaster.realMaster.labourUpdateEvent -= LabourUpdate; subscribedToUpdate = false; } if (planes != null) { PlaneAnnihilationOrder pao = order.GetPlaneOrder(); foreach (var p in planes) { p.Value.Annihilate(pao); } } Destroy(gameObject); }
public void Delete(BlockAnnihilationOrder order) { if (destroyed) { return; } else { destroyed = true; } var so = order.GetStructureOrder(); PrepareBuildingForDestruction(so); if (so.doSpecialChecks) { GameMaster.realMaster.colonyController.storage.RemoveWarehouse(this); } // if (planes != null) { var po = order.GetPlaneOrder(); foreach (var p in planes) { p.Value.Annihilate(po); } } // Destroy(gameObject); }
/// <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; } }
public void Delete(BlockAnnihilationOrder order) { if (!destroyed) { Annihilate(order); } }
public void Delete(BlockAnnihilationOrder bo) { if (destroyed) { return; } else { destroyed = true; } if (subscribedToUpdate) { GameMaster.realMaster.everydayUpdate -= EverydayUpdate; subscribedToUpdate = false; } var so = bo.GetStructureOrder(); if (so.doSpecialChecks) { hotels.Remove(this); } PrepareBuildingForDestruction(so); if (so.doSpecialChecks && lodgersCount > 0) { DistributeLodgers(lodgersCount); } basement = null; Destroy(gameObject); }
} // no multimaterial planes public void Delete(BlockAnnihilationOrder order) { if (destroyed) { return; } else { destroyed = true; } PrepareStructureForDestruction(order.GetStructureOrder()); upperPlane?.Annihilate(order.GetPlaneOrder()); basement = null; Destroy(gameObject); }
/// <summary> /// Do not use directly, use chunk.DeleteBlock /// </summary> public void Annihilate(BlockAnnihilationOrder order) { if (!destroyed) { destroyed = true; } if (planes != null) { var pao = order.GetPlaneOrder(); foreach (var px in planes) { px.Value.Annihilate(pao); } } }
}//no multimaterial planes public void Delete(BlockAnnihilationOrder order) { if (destroyed) { return; } else { destroyed = true; } var so = order.GetStructureOrder(); PrepareBuildingForDestruction(so); if (planes != null) { var po = order.GetPlaneOrder(); foreach (var p in planes) { p.Value.Annihilate(po); } } Destroy(gameObject); }