using Robust.Shared.GameObjects; using Robust.Shared.Prototypes; namespace Content.IntegrationTests.Tests._CP14; #nullable enable [TestFixture] public sealed class CP14EntityTest { [Test] public async Task CheckAllCP14EntityHasForkFilteredCategory() { await using var pair = await PoolManager.GetServerClient(); var server = pair.Server; var compFactory = server.ResolveDependency(); var protoManager = server.ResolveDependency(); await server.WaitAssertion(() => { Assert.Multiple(() => { if (!protoManager.TryIndex("ForkFiltered", out var indexedFilter)) return; foreach (var proto in protoManager.EnumeratePrototypes()) { if (!proto.ID.StartsWith("CP14")) continue; if (proto.Abstract || proto.HideSpawnMenu) continue; Assert.That(proto.Categories.Contains(indexedFilter), $"CP14 fork proto: {proto} does not marked abstract, or have a HideSpawnMenu or ForkFiltered category"); } }); }); await pair.CleanReturnAsync(); } }