]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix(FieldGenerators): Don't show nonsense popup (#30469)
authorBrandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
Sun, 25 Aug 2024 18:21:32 +0000 (18:21 +0000)
committerGitHub <noreply@github.com>
Sun, 25 Aug 2024 18:21:32 +0000 (20:21 +0200)
* .

Content.Server/Singularity/EntitySystems/ContainmentFieldGeneratorSystem.cs

index ca32beb8dbba02f647120f9f29b7ac4b2f97fc05..05262f2999629b14c5d128baa80267826791f3e6 100644 (file)
@@ -166,11 +166,12 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
             ChangeFieldVisualizer(value.Item1);
         }
         component.Connections.Clear();
+        if (component.IsConnected)
+            _popupSystem.PopupEntity(Loc.GetString("comp-containment-disconnected"), uid, PopupType.LargeCaution);
         component.IsConnected = false;
         ChangeOnLightVisualizer(generator);
         ChangeFieldVisualizer(generator);
         _adminLogger.Add(LogType.FieldGeneration, LogImpact.Medium, $"{ToPrettyString(uid)} lost field connections"); // Ideally LogImpact would depend on if there is a singulo nearby
-        _popupSystem.PopupEntity(Loc.GetString("comp-containment-disconnected"), uid, PopupType.LargeCaution);
     }
 
     #endregion