Construction graph improvements (#17960)
This commit is contained in:
committed by
GitHub
parent
fbf1d476f2
commit
9243050e1a
@@ -84,32 +84,6 @@ namespace Content.IntegrationTests.Tests.Construction
|
||||
Assert.That(valid, Is.True, $"One or more SpawnPrototype actions specified invalid entity prototypes!\n{message}");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ConstructionGraphNodeEntityPrototypeValid()
|
||||
{
|
||||
await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings { NoClient = true });
|
||||
var server = pairTracker.Pair.Server;
|
||||
|
||||
var protoMan = server.ResolveDependency<IPrototypeManager>();
|
||||
|
||||
var valid = true;
|
||||
var message = new StringBuilder();
|
||||
|
||||
foreach (var graph in protoMan.EnumeratePrototypes<ConstructionGraphPrototype>())
|
||||
{
|
||||
foreach (var node in graph.Nodes.Values)
|
||||
{
|
||||
if (string.IsNullOrEmpty(node.Entity) || protoMan.TryIndex(node.Entity, out EntityPrototype _)) continue;
|
||||
|
||||
valid = false;
|
||||
message.Append($"Invalid entity prototype \"{node.Entity}\" on node \"{node.Name}\" of graph \"{graph.ID}\"\n");
|
||||
}
|
||||
}
|
||||
await pairTracker.CleanReturnAsync();
|
||||
|
||||
Assert.That(valid, Is.True, $"One or more nodes specified invalid entity prototypes!\n{message}");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ConstructionGraphEdgeValid()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user