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); }
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); }
}//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); }