]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix(ChargerSystem): Don't show battery level twice. (#30625)
authorBrandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
Sun, 4 Aug 2024 03:32:55 +0000 (03:32 +0000)
committerGitHub <noreply@github.com>
Sun, 4 Aug 2024 03:32:55 +0000 (13:32 +1000)
Content.Server/Power/EntitySystems/ChargerSystem.cs

index d4997f62a282eed61dbdaea7b9a2dddcc673f575..4e2543d2a70dddfba536639f5a40e80145eb6c20 100644 (file)
@@ -52,9 +52,12 @@ internal sealed class ChargerSystem : EntitySystem
             if (!_container.TryGetContainer(uid, component.SlotId, out var container))
                 return;
 
+            if (HasComp<PowerCellSlotComponent>(uid))
+                return;
+
             // if charger is empty and not a power cell type charger, add empty message
             // power cells have their own empty message by default, for things like flash lights
-            if (container.ContainedEntities.Count == 0 && !HasComp<PowerCellSlotComponent>(uid))
+            if (container.ContainedEntities.Count == 0)
             {
                 args.PushMarkup(Loc.GetString("charger-empty"));
             }