]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add atmos error log (#22696)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Mon, 18 Dec 2023 07:37:13 +0000 (02:37 -0500)
committerGitHub <noreply@github.com>
Mon, 18 Dec 2023 07:37:13 +0000 (18:37 +1100)
Content.Server/Atmos/EntitySystems/AtmosphereSystem.Processing.cs

index 8cd47ca00c2f4b3b54b097873421a7eb69d08cf5..09affe2e5c88212ad511f1842a6611b6b0676e1a 100644 (file)
@@ -4,6 +4,7 @@ using Content.Server.NodeContainer.NodeGroups;
 using Content.Shared.Atmos;
 using Content.Shared.Atmos.Components;
 using Content.Shared.Maps;
+using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
 using Robust.Shared.Physics.Components;
 using Robust.Shared.Timing;
@@ -449,6 +450,17 @@ namespace Content.Server.Atmos.EntitySystems
                 var (owner, atmosphere) = ent;
                 TryComp(owner, out GasTileOverlayComponent? visuals);
 
+                if (!TryComp(owner, out TransformComponent? x)
+                    || x.MapUid == null
+                    || TerminatingOrDeleted(x.MapUid.Value)
+                    || x.MapID == MapId.Nullspace)
+                {
+                    Log.Error($"Attempting to process atmos without a map? Entity: {ToPrettyString(owner)}");
+                    _simulationPaused = false;
+                    _currentRunAtmosphere.Clear();
+                    continue;
+                }
+
                 if (atmosphere.LifeStage >= ComponentLifeStage.Stopping || Paused(owner) || !atmosphere.Simulated)
                     continue;