Allow NukeOps test to function with multiple RuleGrids (#36049)
This commit is contained in:
@@ -152,14 +152,10 @@ public sealed class NukeOpsTest
|
|||||||
Assert.That(roleSys.MindGetAllRoleInfo(mindCrew).Any(x => nukeroles.Contains(x.Prototype)), Is.False);
|
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
|
// The game rule exists, and all the stations/shuttles/maps are properly initialized
|
||||||
var rule = entMan.AllComponents<NukeopsRuleComponent>().Single();
|
var rule = entMan.AllComponents<NukeopsRuleComponent>().Single();
|
||||||
var ruleComp = rule.Component;
|
var ruleComp = rule.Component;
|
||||||
var gridsRule = ruleGridComps.Single().Component;
|
var gridsRule = entMan.GetComponent<RuleGridsComponent>(rule.Uid);
|
||||||
foreach (var grid in gridsRule.MapGrids)
|
foreach (var grid in gridsRule.MapGrids)
|
||||||
{
|
{
|
||||||
Assert.That(entMan.EntityExists(grid));
|
Assert.That(entMan.EntityExists(grid));
|
||||||
|
|||||||
Reference in New Issue
Block a user