private void MiscCardExposedToSpace(HoverTextDrawer hoverTextDrawer) { if (CellSelectionObject.IsExposedToSpace(cellPos)) { hoverTextDrawer.NewLine(26); hoverTextDrawer.DrawIcon(__this.iconDash, 18); hoverTextDrawer.DrawText(MISC.STATUSITEMS.SPACE.NAME, __this.Styles_BodyText.Standard); } }
public void Update(Vector2I min, Vector2I max, Vector3 emitter_position) { emitterPosition = emitter_position; totalTileCount = 0; for (int i = 0; i < allLayers.Count; i++) { Layer layer = allLayers[i]; layer.Reset(); } for (int j = min.y; j < max.y; j++) { if (j % 2 != 1) { for (int k = min.x; k < max.x; k++) { if (k % 2 != 0) { int num = Grid.XYToCell(k, j); if (Grid.IsValidCell(num)) { totalTileCount++; if (Grid.IsVisible(num)) { if (Grid.GravitasFacility[num]) { facilityLayer.tileCount += 8; } else { Element element = Grid.Element[num]; if (element != null) { if (element.IsLiquid && Grid.IsSubstantialLiquid(num, 0.35f)) { AmbienceType ambience = element.substance.GetAmbience(); if (ambience != AmbienceType.None) { liquidLayers[(int)ambience].tileCount++; liquidLayers[(int)ambience].averageTemperature += Grid.Temperature[num]; } } else if (element.IsGas) { AmbienceType ambience2 = element.substance.GetAmbience(); if (ambience2 != AmbienceType.None) { gasLayers[(int)ambience2].tileCount++; gasLayers[(int)ambience2].averageTemperature += Grid.Temperature[num]; } } else if (element.IsSolid) { SolidAmbienceType solidAmbience = element.substance.GetSolidAmbience(); if (Grid.Foundation[num]) { solidAmbience = SolidAmbienceType.Tile; solidLayers[(int)solidAmbience].tileCount += TuningData <Tuning> .Get().foundationTileValue; spaceLayer.tileCount -= TuningData <Tuning> .Get().foundationTileValue; } else if ((UnityEngine.Object)Grid.Objects[num, 2] != (UnityEngine.Object)null) { solidAmbience = SolidAmbienceType.Tile; solidLayers[(int)solidAmbience].tileCount += TuningData <Tuning> .Get().backwallTileValue; spaceLayer.tileCount -= TuningData <Tuning> .Get().backwallTileValue; } else if (solidAmbience != SolidAmbienceType.None) { solidLayers[(int)solidAmbience].tileCount++; } else if (element.id == SimHashes.Regolith || element.id == SimHashes.MaficRock) { spaceLayer.tileCount++; } } else if (element.id == SimHashes.Vacuum && CellSelectionObject.IsExposedToSpace(num)) { if ((UnityEngine.Object)Grid.Objects[num, 1] != (UnityEngine.Object)null) { spaceLayer.tileCount -= TuningData <Tuning> .Get().buildingTileValue; } spaceLayer.tileCount++; } } } } else { fogLayer.tileCount++; } } } } } } Vector2I vector2I = max - min; int cell_count = vector2I.x * vector2I.y; for (int l = 0; l < allLayers.Count; l++) { Layer layer2 = allLayers[l]; layer2.UpdatePercentage(cell_count); } loopingLayers.Sort(); topLayers.Clear(); for (int m = 0; m < loopingLayers.Count; m++) { Layer layer3 = loopingLayers[m]; if (m < 3 && layer3.tilePercentage > 0f) { layer3.Start(emitter_position); layer3.UpdateAverageTemperature(); layer3.UpdateParameters(emitter_position); topLayers.Add(layer3); } else { layer3.Stop(); } } oneShotLayers.Sort(); for (int n = 0; n < activeSolidLayerCount; n++) { if (solidTimers[n].ShouldPlay() && oneShotLayers[n].tilePercentage > 0f) { oneShotLayers[n].Start(emitter_position); } } }