Fix battery charging stopping just short of being full (#34028)

This commit is contained in:
Errant
2025-01-10 07:54:55 +01:00
committed by GitHub
parent b42a01580c
commit 0b1ed3ec7e
5 changed files with 8 additions and 20 deletions

View File

@@ -153,7 +153,7 @@ public sealed class EmergencyLightSystem : SharedEmergencyLightSystem
else
{
_battery.SetCharge(entity.Owner, battery.CurrentCharge + entity.Comp.ChargingWattage * frameTime * entity.Comp.ChargingEfficiency, battery);
if (battery.IsFullyCharged)
if (_battery.IsFull(entity, battery))
{
if (TryComp<ApcPowerReceiverComponent>(entity.Owner, out var receiver))
{