Health analyzer displays turns off when the battery dies (#16125)
This commit is contained in:
@@ -8,6 +8,7 @@ namespace Content.Shared.PowerCell;
|
||||
public abstract class SharedPowerCellSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly ItemSlotsSystem _itemSlots = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -48,7 +49,7 @@ public abstract class SharedPowerCellSystem : EntitySystem
|
||||
|
||||
if (args.Container.ID != component.CellSlotId)
|
||||
return;
|
||||
|
||||
_appearance.SetData(uid, PowerCellSlotVisuals.Enabled, true);
|
||||
RaiseLocalEvent(uid, new PowerCellChangedEvent(false), false);
|
||||
}
|
||||
|
||||
@@ -56,7 +57,7 @@ public abstract class SharedPowerCellSystem : EntitySystem
|
||||
{
|
||||
if (args.Container.ID != component.CellSlotId)
|
||||
return;
|
||||
|
||||
_appearance.SetData(uid, PowerCellSlotVisuals.Enabled, false);
|
||||
RaiseLocalEvent(uid, new PowerCellChangedEvent(true), false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user