Fix apc battery state (#15568)

This commit is contained in:
Slava0135
2023-04-23 11:22:09 +03:00
committed by GitHub
parent 8a70f6e858
commit 4646e58cbc
3 changed files with 7 additions and 17 deletions

View File

@@ -143,7 +143,7 @@ namespace Content.Server.Power.EntitySystems
var state = new ApcBoundInterfaceState(apc.MainBreakerEnabled, apc.HasAccess,
(int) MathF.Ceiling(battery.CurrentSupply), apc.LastExternalState,
battery.AvailableSupply / battery.Capacity);
battery.CurrentStorage / battery.Capacity);
_ui.TrySetUiState(uid, ApcUiKey.Key, state, ui: ui);
}