mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-04 05:17:28 +00:00
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:
committed by
Vanessa
co-authored by
ArtisticRoomba
parent
80f4492e41
commit
7b8038df14
@@ -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}");
|
||||
|
||||
Reference in New Issue
Block a user