From: Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com> Date: Sun, 4 Aug 2024 03:32:55 +0000 (+0000) Subject: fix(ChargerSystem): Don't show battery level twice. (#30625) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=968cd9dac65fae01885035fd9515728f824cb2b1;p=space-station-14.git fix(ChargerSystem): Don't show battery level twice. (#30625) --- 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")); }