override public void SetBasement(Plane b, PixelPosByte pos) { if (b == null) { return; } SetWorkbuildingData(b, pos); if (current != null) { if (current != null) { current.Annihilate(true, true, false); } } else { AddToResetList(typeof(XStation)); } current = this; if (!indicatorPrepared) { PrepareIndicator(); cityMarker.parent.gameObject.SetActive(false); markerEnabled = false; } }
override public void Annihilate(bool clearFromSurface, bool returnResources, bool leaveRuins) { if (destroyed) { return; } else { destroyed = true; } if (!clearFromSurface) { basement = null; } PrepareWorkbuildingForDestruction(clearFromSurface, returnResources, leaveRuins); if (current == this) { current = null; } if (indicatorPrepared & markerEnabled) { cityMarker.transform.parent.gameObject.SetActive(false); markerEnabled = false; } Destroy(gameObject); }
override public void SetBasement(SurfaceBlock b, PixelPosByte pos) { if (b == null) { return; } SetBuildingData(b, pos); if (current != null & current != this) { current.Annihilate(false); } current = this; }
// EnvironmentMaster.environmentalConditions //GameMaster.lifegrowCoefficient public static void ResetStaticData() { current = null; if (cityMarker != null) { indicatorPrepared = true; markerEnabled = cityMarker.transform.parent.gameObject.activeSelf; } else { indicatorPrepared = false; markerEnabled = false; } envMaster = GameMaster.realMaster.environmentMaster; }
override public void SetBasement(Plane b, PixelPosByte pos) { if (b == null) { return; } SetWorkbuildingData(b, pos); if (current != null) { if (current != null) { current.Annihilate(StructureAnnihilationOrder.ManualDestructed); } } else { GameMaster.staticResetFunctions += ResetXStationStaticData; } current = this; }
override public void Annihilate(bool forced) { if (destroyed) { return; } else { destroyed = true; } if (forced) { UnsetBasement(); } PrepareWorkbuildingForDestruction(forced); if (current == this) { current = null; } Destroy(gameObject); }
override public void Annihilate(StructureAnnihilationOrder order) { if (destroyed) { return; } else { destroyed = true; } if (!order.sendMessageToBasement) { basement = null; } PrepareWorkbuildingForDestruction(order); if (current == this) { current = null; } Destroy(gameObject); }
// EnvironmentMaster.environmentalConditions //GameMaster.lifegrowCoefficient public static void ResetXStationStaticData() { current = null; envMaster = GameMaster.realMaster.environmentMaster; }