]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Don't show NaN/infinity if AME has no cores (#41026)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Tue, 21 Oct 2025 19:15:32 +0000 (21:15 +0200)
committerGitHub <noreply@github.com>
Tue, 21 Oct 2025 19:15:32 +0000 (19:15 +0000)
Fixes #41025

Content.Server/Ame/EntitySystems/AmeControllerSystem.cs

index 4276eafd60d92de6117f4c1c2038c312925a4dbc..f47c2def5b54b96a5c10598d83852f2bc06094d4 100644 (file)
@@ -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;