Compare commits
9 Commits
des-fishin
...
ed-14-04-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b028f1fcff | ||
|
|
bc88dc3c55 | ||
|
|
552b996319 | ||
|
|
c10a62b37b | ||
|
|
354d633134 | ||
|
|
93b748fc4d | ||
|
|
4839610435 | ||
|
|
5cb4fa0544 | ||
|
|
613dc050d6 |
@@ -202,6 +202,7 @@ namespace Content.IntegrationTests.Tests
|
||||
// TODO MAP TESTS
|
||||
// Move this to some separate test?
|
||||
CheckDoNotMap(map, root, protoManager);
|
||||
CP14CheckOnlyForkFiltered(map, root, protoManager);
|
||||
|
||||
if (version >= 7)
|
||||
{
|
||||
@@ -270,6 +271,32 @@ namespace Content.IntegrationTests.Tests
|
||||
});
|
||||
}
|
||||
|
||||
private void CP14CheckOnlyForkFiltered(ResPath map, YamlNode node, IPrototypeManager protoManager)
|
||||
{
|
||||
//ignore all vanilla maps
|
||||
if (!map.ToString().Contains("CP14"))
|
||||
return;
|
||||
|
||||
var yamlEntities = node["entities"];
|
||||
if (!protoManager.TryIndex<EntityCategoryPrototype>("ForkFiltered", out var filterCategory))
|
||||
return;
|
||||
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
foreach (var yamlEntity in (YamlSequenceNode)yamlEntities)
|
||||
{
|
||||
var protoId = yamlEntity["proto"].AsString();
|
||||
|
||||
// This doesn't properly handle prototype migrations, but thats not a significant issue.
|
||||
if (!protoManager.TryIndex(protoId, out var proto, false))
|
||||
continue;
|
||||
|
||||
Assert.That(proto.Categories.Contains(filterCategory),
|
||||
$"\nMap {map} contains entities without FORK FILTERED category ({proto.Name})");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private bool IsPreInit(ResPath map,
|
||||
MapLoaderSystem loader,
|
||||
IDependencyCollection deps,
|
||||
|
||||
@@ -58067,7 +58067,7 @@ entities:
|
||||
- type: Transform
|
||||
pos: 106.5,42.5
|
||||
parent: 1
|
||||
- proto: DeskBell
|
||||
- proto: CP14Bell
|
||||
entities:
|
||||
- uid: 9141
|
||||
components:
|
||||
|
||||
@@ -122858,14 +122858,4 @@ entities:
|
||||
rot: 1.5707963267948966 rad
|
||||
pos: -7.5,-35.5
|
||||
parent: 1
|
||||
- proto: PlushieLizardInversed
|
||||
entities:
|
||||
- uid: 23369
|
||||
components:
|
||||
- type: MetaData
|
||||
desc: oooo you like mapping. ur a mapper
|
||||
name: Viator
|
||||
- type: Transform
|
||||
pos: -52.729527,-71.3009
|
||||
parent: 1
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user