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-12-29 11:39:36 -06:00
committed by Vanessa
co-authored by ArtisticRoomba
parent 80f4492e41
commit 7b8038df14
45 changed files with 371 additions and 365 deletions
+1 -1
View File
@@ -340,7 +340,7 @@ public sealed partial class MechSystem : SharedMechSystem
if (!TryComp<BatteryComponent>(battery, out var batteryComp))
return false;
_battery.SetCharge(battery!.Value, batteryComp.CurrentCharge + delta.Float(), batteryComp);
_battery.SetCharge((battery.Value, batteryComp), batteryComp.CurrentCharge + delta.Float());
if (batteryComp.CurrentCharge != component.Energy) //if there's a discrepency, we have to resync them
{
Log.Debug($"Battery charge was not equal to mech charge. Battery {batteryComp.CurrentCharge}. Mech {component.Energy}");