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 deltanedas
parent c2adf1a90f
commit b8bea99091
1 changed files with 4 additions and 1 deletions

View File

@ -48,9 +48,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"));
}