public void MergeGroups(ExcitedGroup other) { var ourSize = _tile.Count; var otherSize = other._tile.Count; if (ourSize > otherSize) { foreach (var tile in other._tile) { tile.ExcitedGroup = this; _tile.Add(tile); } other._tile.Clear(); other.Dispose(); ResetCooldowns(); } else { foreach (var tile in _tile) { tile.ExcitedGroup = other; other._tile.Add(tile); } _tile.Clear(); Dispose(); other.ResetCooldowns(); } }
public void ProcessHotspot() { if (!Hotspot.Valid) { _gridAtmosphereComponent.RemoveHotspotTile(this); return; } if (!Hotspot.SkippedFirstProcess) { Hotspot.SkippedFirstProcess = true; return; } ExcitedGroup?.ResetCooldowns(); if ((Hotspot.Temperature < Atmospherics.FireMinimumTemperatureToExist) || (Hotspot.Volume <= 1f) || Air == null || Air.Gases[(int)Gas.Oxygen] < 0.5f || Air.Gases[(int)Gas.Phoron] < 0.5f) { Hotspot = new Hotspot(); UpdateVisuals(); return; } PerformHotspotExposure(); if (Hotspot.Bypassing) { Hotspot.State = 3; _gridAtmosphereComponent.BurnTile(GridIndices); if (Air.Temperature > Atmospherics.FireMinimumTemperatureToSpread) { var radiatedTemperature = Air.Temperature * Atmospherics.FireSpreadRadiosityScale; foreach (var(_, tile) in _adjacentTiles) { if (!tile.Hotspot.Valid) { tile.HotspotExpose(radiatedTemperature, Atmospherics.CellVolume / 4); } } } } else { Hotspot.State = Hotspot.Volume > Atmospherics.CellVolume * 0.4f ? 2 : 1; } if (Hotspot.Temperature > MaxFireTemperatureSustained) { MaxFireTemperatureSustained = Hotspot.Temperature; } // TODO ATMOS Maybe destroy location here? }
private void LastShareCheck() { var lastShare = Air.LastShare; if (lastShare > Atmospherics.MinimumAirToSuspend) { ExcitedGroup.ResetCooldowns(); } else if (lastShare > Atmospherics.MinimumMolesDeltaToMove) { ExcitedGroup.DismantleCooldown = 0; } }