Partial cleanup of ExplosionSystem (#36098)

* Cleanup warnings in ExplosionSystem.TileFill

* Formatting in ExplosionSystem.TileFill

* Cleanup warning in ExplosionSystem

* Formatting for ExplosionSystem

* Switch from MapChangedEvent to MapRemovedEvent

* Fix 1 warning in ExplosionSystem.Processing

* Fix 1 warning in ExplosionSystem.Visuals

* Fix 1 warning in ExplosionSystem.GridMap

* Fix 2 warnings in ExplosionSystem.Airtight

* Clear _grids
This commit is contained in:
Tayrtahn
2025-04-17 23:55:09 -04:00
committed by GitHub
parent 0da27d3371
commit 725522c183
6 changed files with 30 additions and 25 deletions

View File

@@ -67,13 +67,10 @@ public sealed partial class ExplosionSystem
private List<EntityUid> _anchored = new();
private void OnMapChanged(MapChangedEvent ev)
private void OnMapRemoved(MapRemovedEvent ev)
{
// If a map was deleted, check the explosion currently being processed belongs to that map.
if (ev.Created)
return;
if (_activeExplosion?.Epicenter.MapId != ev.Map)
if (_activeExplosion?.Epicenter.MapId != ev.MapId)
return;
QueueDel(_activeExplosion.VisualEnt);
@@ -718,7 +715,7 @@ sealed class Explosion
if (spaceData != null)
{
var mapUid = mapMan.GetMapEntityId(epicenter.MapId);
var mapUid = mapSystem.GetMap(epicenter.MapId);
_explosionData.Add(new()
{