From: Pieter-Jan Briers Date: Tue, 21 Oct 2025 19:15:32 +0000 (+0200) Subject: Don't show NaN/infinity if AME has no cores (#41026) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=04a2c2e9685dc78c4eebc61442ea6661fe571b91;p=space-station-14.git Don't show NaN/infinity if AME has no cores (#41026) Fixes #41025 --- diff --git a/Content.Server/Ame/EntitySystems/AmeControllerSystem.cs b/Content.Server/Ame/EntitySystems/AmeControllerSystem.cs index 4276eafd60..f47c2def5b 100644 --- a/Content.Server/Ame/EntitySystems/AmeControllerSystem.cs +++ b/Content.Server/Ame/EntitySystems/AmeControllerSystem.cs @@ -150,7 +150,7 @@ public sealed class AmeControllerSystem : EntitySystem // how much power can be produced at the current settings, in kW // we don't use max. here since this is what is set in the Controller, not what the AME is actually producing float targetedPowerSupply = 0; - if (TryGetAMENodeGroup(uid, out var group)) + if (TryGetAMENodeGroup(uid, out var group) && group.CoreCount > 0) { coreCount = group.CoreCount; targetedPowerSupply = group.CalculatePower(controller.InjectionAmount, group.CoreCount) / 1000;