convert it to entity category

This commit is contained in:
Killerqu00
2025-01-29 12:22:38 +01:00
parent 02f7dad6f3
commit d15a770078
24 changed files with 64 additions and 46 deletions

View File

@@ -161,15 +161,17 @@ namespace Content.IntegrationTests.Tests
// testing that maps have nothing with the "DO NOT MAP" suffix
// I do it here because it's basically copy-paste code for the most part
var yamlEntities = root["entities"];
if (!protoManager.TryIndex<EntityCategoryPrototype>("DoNotMap", out var dnmCategory))
return;
foreach (var yamlEntity in (YamlSequenceNode)yamlEntities)
{
var protoId = yamlEntity["proto"].AsString();
protoManager.TryIndex(protoId, out var proto, false);
if (proto is null || proto.EditorSuffix is null)
continue;
if (proto.EditorSuffix.ToUpper().Contains("DO NOT MAP") && !DoNotMapWhitelist.Contains(map.ToString()))
if (proto.Categories.Contains(dnmCategory) && !DoNotMapWhitelist.Contains(map.ToString()))
{
Assert.Fail($"\nMap {map} has the DO NOT MAP prototype {proto}");
Assert.Fail($"\nMap {map} has the DO NOT MAP prototype {proto.Name}");
}
}
}