Pow3r bugfixes (#16941)

This commit is contained in:
Pieter-Jan Briers
2023-05-30 02:32:59 +02:00
committed by GitHub
parent 1d72e0f133
commit 2ec53b818c
3 changed files with 7 additions and 5 deletions

View File

@@ -194,7 +194,7 @@ namespace Content.Server.Power.Pow3r
foreach (var batteryId in network.BatteryLoads)
{
var battery = state.Batteries[batteryId];
if (!battery.Enabled || battery.DesiredPower == 0 || battery.Paused)
if (!battery.Enabled || battery.DesiredPower == 0 || battery.Paused || !battery.CanCharge)
continue;
battery.LoadingMarked = true;
@@ -240,7 +240,7 @@ namespace Content.Server.Power.Pow3r
foreach (var batteryId in network.BatterySupplies)
{
var battery = state.Batteries[batteryId];
if (!battery.Enabled || battery.Paused)
if (!battery.Enabled || battery.Paused || !battery.CanDischarge)
continue;
battery.SupplyingMarked = true;