Cleanup BatterySystem (#41298)

* cleanup

* fix fixtures

* this belongs into the next PR

* review

* misc

---------

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
This commit is contained in:
slarticodefast
2025-11-08 21:55:02 +01:00
committed by GitHub
parent 841c09bbf1
commit 7155d0d291
45 changed files with 356 additions and 366 deletions

View File

@@ -358,13 +358,13 @@ namespace Content.Server.Power.EntitySystems
if (requireBattery)
{
_battery.SetCharge(uid, battery.CurrentCharge - apcBattery.IdleLoad * frameTime, battery);
_battery.SetCharge((uid, battery), battery.CurrentCharge - apcBattery.IdleLoad * frameTime);
}
// Otherwise try to charge the battery
else if (powered && !_battery.IsFull(uid, battery))
else if (powered && !_battery.IsFull((uid, battery)))
{
apcReceiver.Load += apcBattery.BatteryRechargeRate * apcBattery.BatteryRechargeEfficiency;
_battery.SetCharge(uid, battery.CurrentCharge + apcBattery.BatteryRechargeRate * frameTime, battery);
_battery.SetCharge((uid, battery), battery.CurrentCharge + apcBattery.BatteryRechargeRate * frameTime);
}
// Enable / disable the battery if the state changed