Trim migration.yml (#19081)

This commit is contained in:
Leon Friedrich
2023-08-14 19:44:34 +12:00
committed by GitHub
parent 3268ea3d92
commit 5ba1a41742
2 changed files with 5 additions and 91 deletions

View File

@@ -32,11 +32,12 @@ public sealed class MapMigrationSystem : EntitySystem
if (!TryReadFile(out var mappings))
return;
// Verify that all of the entries map to valid entity prototypes.
foreach (var node in mappings.Values)
{
var newId = ((ValueDataNode) node).Value;
if (!string.IsNullOrEmpty(newId) && newId != "null")
DebugTools.Assert(_protoMan.HasIndex<EntityPrototype>(newId));
DebugTools.Assert(_protoMan.HasIndex<EntityPrototype>(newId), $"{newId} is not an entity prototype.");
}
#endif
}