Remove all obsolete BatteryComponent method calls (#25871)
Removed all obsolete, non-ECS method calls to BatteryComponent
This commit is contained in:
@@ -7,6 +7,7 @@ using Content.Server.Station.Systems;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Content.Server.Power.EntitySystems;
|
||||
|
||||
namespace Content.Server.PowerSink
|
||||
{
|
||||
@@ -31,6 +32,7 @@ namespace Content.Server.PowerSink
|
||||
[Dependency] private readonly ExplosionSystem _explosionSystem = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly StationSystem _station = default!;
|
||||
[Dependency] private readonly BatterySystem _battery = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -64,7 +66,7 @@ namespace Content.Server.PowerSink
|
||||
if (!transform.Anchored)
|
||||
continue;
|
||||
|
||||
battery.CurrentCharge += networkLoad.NetworkLoad.ReceivingPower / 1000;
|
||||
_battery.SetCharge(entity, battery.CurrentCharge + networkLoad.NetworkLoad.ReceivingPower / 1000, battery);
|
||||
|
||||
var currentBatteryThreshold = battery.CurrentCharge / battery.MaxCharge;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user