mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* more-item-status * update 1 * update 2 * Update pistol.yml * update 3 * yml * oops * BatteryItemStatus * fix ChargeItemStatus * Update item-status.ftl * review update 1 * review fix 1 * Update BatteryInfoSystem.cs * Update TimerTriggerItemStatus * merge fix * merge fix * review update 2 * review update 3 * fix marge * StyleNano * review update 4 * review update 5 * BatteryItemStatus * BatteryItemStatus Client * code cleanup * merge * merge and GasTank fix * Merge * unnecessary components * review * oops * GasTank * wawa
28 lines
1 KiB
C#
28 lines
1 KiB
C#
using Content.Shared.PowerCell;
|
|
using Content.Shared.Power.EntitySystems;
|
|
using Content.Shared.Power.Components;
|
|
using Content.Shared.PowerCell.Components;
|
|
using Content.Client.Power.UI;
|
|
using Content.Client.Items;
|
|
|
|
namespace Content.Client.Power.EntitySystems;
|
|
|
|
/// <summary>
|
|
/// Wires up item status logic for <see cref="BatteryComponent"/> and <see cref="BatteryStatusControl"/>.
|
|
/// Shows battery charge information when examining items with batteries.
|
|
/// </summary>
|
|
public sealed partial class BatteryItemStatusSystem : EntitySystem
|
|
{
|
|
[Dependency] private SharedBatterySystem _battery = default!;
|
|
[Dependency] private PowerCellSystem _powerCell = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
Subs.ItemStatus<BatteryComponent>(entity =>
|
|
new BatteryStatusControl(entity.Owner, EntityManager, _battery, _powerCell));
|
|
Subs.ItemStatus<PowerCellSlotComponent>(entity =>
|
|
new BatteryStatusControl(entity.Owner, EntityManager, _battery, _powerCell));
|
|
}
|
|
}
|