Allow NukeOps test to function with multiple RuleGrids (#36049)

This commit is contained in:
Tayrtahn
2025-03-24 14:59:13 -04:00
committed by GitHub
parent 67b76d81e5
commit ae07c5d841

View 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));