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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user