]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix Gas Analyzers not opening (#27610)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Thu, 2 May 2024 06:00:01 +0000 (18:00 +1200)
committerGitHub <noreply@github.com>
Thu, 2 May 2024 06:00:01 +0000 (16:00 +1000)
Content.Server/Atmos/EntitySystems/GasAnalyzerSystem.cs

index 15e1dde4ecfcc727f2fd1831db1e6e38c13be4fc..b42f36262936667c37ed52bd063743380f2631ed 100644 (file)
@@ -95,9 +95,9 @@ namespace Content.Server.Atmos.EntitySystems
             component.Enabled = true;
             Dirty(uid, component);
             UpdateAppearance(uid, component);
-            if (!HasComp<ActiveGasAnalyzerComponent>(uid))
-                AddComp<ActiveGasAnalyzerComponent>(uid);
+            EnsureComp<ActiveGasAnalyzerComponent>(uid);
             UpdateAnalyzer(uid, component);
+            OpenUserInterface(uid, user, component);
         }
 
         /// <summary>