fix(ChargerSystem): Don't show battery level twice. (#30625)

This commit is contained in:
Brandon Hu
2024-08-04 03:32:55 +00:00
committed by GitHub
parent 0d506ccffc
commit 968cd9dac6

View 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"));
}