diff --git a/Content.Client/Power/APC/UI/ApcMenu.xaml b/Content.Client/Power/APC/UI/ApcMenu.xaml
index 61b12083c5..5926b5de4c 100644
--- a/Content.Client/Power/APC/UI/ApcMenu.xaml
+++ b/Content.Client/Power/APC/UI/ApcMenu.xaml
@@ -8,6 +8,7 @@
+
diff --git a/Content.Client/Power/APC/UI/ApcMenu.xaml.cs b/Content.Client/Power/APC/UI/ApcMenu.xaml.cs
index 9cc6877652..1a33b41635 100644
--- a/Content.Client/Power/APC/UI/ApcMenu.xaml.cs
+++ b/Content.Client/Power/APC/UI/ApcMenu.xaml.cs
@@ -32,6 +32,11 @@ namespace Content.Client.Power.APC.UI
BreakerButton.Pressed = castState.MainBreaker;
}
+ if (PowerLabel != null)
+ {
+ PowerLabel.Text = Loc.GetString("apc-menu-power-label", ("power", castState.Power));
+ }
+
if (ExternalPowerStateLabel != null)
{
switch (castState.ApcExternalPower)
diff --git a/Content.Server/Power/EntitySystems/ApcSystem.cs b/Content.Server/Power/EntitySystems/ApcSystem.cs
index d442a77c06..45ad5a6aca 100644
--- a/Content.Server/Power/EntitySystems/ApcSystem.cs
+++ b/Content.Server/Power/EntitySystems/ApcSystem.cs
@@ -135,9 +135,12 @@ namespace Content.Server.Power.EntitySystems
if (!Resolve(uid, ref apc, ref battery, ref ui))
return;
+ var netBattery = Comp(uid);
+ float power = netBattery is not null ? netBattery.CurrentSupply : 0f;
+
if (_userInterfaceSystem.GetUiOrNull(uid, ApcUiKey.Key, ui) is { } bui)
{
- bui.SetState(new ApcBoundInterfaceState(apc.MainBreakerEnabled, apc.LastExternalState, battery.CurrentCharge / battery.MaxCharge));
+ bui.SetState(new ApcBoundInterfaceState(apc.MainBreakerEnabled, (int)MathF.Ceiling(power), apc.LastExternalState, battery.CurrentCharge / battery.MaxCharge));
}
}
diff --git a/Content.Shared/APC/SharedApc.cs b/Content.Shared/APC/SharedApc.cs
index 7669e32aa2..d49115b151 100644
--- a/Content.Shared/APC/SharedApc.cs
+++ b/Content.Shared/APC/SharedApc.cs
@@ -57,12 +57,14 @@ namespace Content.Shared.APC
public sealed class ApcBoundInterfaceState : BoundUserInterfaceState
{
public readonly bool MainBreaker;
+ public readonly int Power;
public readonly ApcExternalPowerState ApcExternalPower;
public readonly float Charge;
- public ApcBoundInterfaceState(bool mainBreaker, ApcExternalPowerState apcExternalPower, float charge)
+ public ApcBoundInterfaceState(bool mainBreaker, int power, ApcExternalPowerState apcExternalPower, float charge)
{
MainBreaker = mainBreaker;
+ Power = power;
ApcExternalPower = apcExternalPower;
Charge = charge;
}
diff --git a/Resources/Locale/en-US/ui/power-apc.ftl b/Resources/Locale/en-US/ui/power-apc.ftl
index c283eb56af..829b459ee9 100644
--- a/Resources/Locale/en-US/ui/power-apc.ftl
+++ b/Resources/Locale/en-US/ui/power-apc.ftl
@@ -1,6 +1,7 @@
apc-menu-title = APC
apc-menu-breaker-label = Main Breaker:{" "}
apc-menu-breaker-button = Toggle
+apc-menu-power-label = Power: {$power} W
apc-menu-external-label = External Power:{" "}
apc-menu-charge-label = Charge:{" "}