From: Varen Date: Thu, 1 Feb 2024 11:54:24 +0000 (+0100) Subject: Fixes Electrocutions to use available power, not consumed power (#24554) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=cdfff3c4bd49f77d9711d590eb649e365c3bca91;p=space-station-14.git Fixes Electrocutions to use available power, not consumed power (#24554) -Electrocutions now happen using how much power there is rather than how much is being used. --- diff --git a/Content.Server/Electrocution/ElectrocutionSystem.cs b/Content.Server/Electrocution/ElectrocutionSystem.cs index 11e56a65c4..aac500f34f 100644 --- a/Content.Server/Electrocution/ElectrocutionSystem.cs +++ b/Content.Server/Electrocution/ElectrocutionSystem.cs @@ -258,7 +258,7 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem return false; var net = powerNet.NetworkNode; - var supp = net.LastCombinedSupply; + var supp = net.LastCombinedMaxSupply; if (supp <= 0f) return false; @@ -295,7 +295,7 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem { if (id != null && _nodeContainer.TryGetNode(nodeContainer, id, out var tryNode) && - tryNode.NodeGroup is IBasePowerNet { NetworkNode: { LastCombinedSupply: > 0 } }) + tryNode.NodeGroup is IBasePowerNet { NetworkNode: { LastCombinedMaxSupply: > 0 } }) { return tryNode; }