From 968cd9dac65fae01885035fd9515728f824cb2b1 Mon Sep 17 00:00:00 2001 From: Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com> Date: Sun, 4 Aug 2024 03:32:55 +0000 Subject: [PATCH] fix(ChargerSystem): Don't show battery level twice. (#30625) --- Content.Server/Power/EntitySystems/ChargerSystem.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Server/Power/EntitySystems/ChargerSystem.cs b/Content.Server/Power/EntitySystems/ChargerSystem.cs index d4997f62a2..4e2543d2a7 100644 --- a/Content.Server/Power/EntitySystems/ChargerSystem.cs +++ b/Content.Server/Power/EntitySystems/ChargerSystem.cs @@ -52,9 +52,12 @@ internal sealed class ChargerSystem : EntitySystem if (!_container.TryGetContainer(uid, component.SlotId, out var container)) return; + if (HasComp(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(uid)) + if (container.ContainedEntities.Count == 0) { args.PushMarkup(Loc.GetString("charger-empty")); } -- 2.52.0