]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Allow NukeOps test to function with multiple RuleGrids (#36049)
authorTayrtahn <tayrtahn@gmail.com>
Mon, 24 Mar 2025 18:59:13 +0000 (14:59 -0400)
committerGitHub <noreply@github.com>
Mon, 24 Mar 2025 18:59:13 +0000 (19:59 +0100)
Content.IntegrationTests/Tests/GameRules/NukeOpsTest.cs

index 5790e414f3909e381fd9016f3841ce1fadadc04f..86bcffd3367ea1186cd3eae4a35abb14efa43066 100644 (file)
@@ -152,14 +152,10 @@ public sealed class NukeOpsTest
             Assert.That(roleSys.MindGetAllRoleInfo(mindCrew).Any(x => nukeroles.Contains(x.Prototype)), Is.False);
         }
 
-        var ruleGridComps = entMan.AllComponents<RuleGridsComponent>();
-        Assert.That(ruleGridComps, Has.Length.EqualTo(1),
-            $"Unexpected RuleGrid(s) detected! {string.Join(',', ruleGridComps.Select(e => server.EntMan.ToPrettyString(e.Uid)))}");
-
         // The game rule exists, and all the stations/shuttles/maps are properly initialized
         var rule = entMan.AllComponents<NukeopsRuleComponent>().Single();
         var ruleComp = rule.Component;
-        var gridsRule = ruleGridComps.Single().Component;
+        var gridsRule = entMan.GetComponent<RuleGridsComponent>(rule.Uid);
         foreach (var grid in gridsRule.MapGrids)
         {
             Assert.That(entMan.EntityExists(grid));