diff --git a/Content.Client/Entry/IgnoredComponents.cs b/Content.Client/Entry/IgnoredComponents.cs index add0962dca..8fdf47f719 100644 --- a/Content.Client/Entry/IgnoredComponents.cs +++ b/Content.Client/Entry/IgnoredComponents.cs @@ -9,7 +9,6 @@ namespace Content.Client.Entry "AmmoBox", "Pickaxe", "IngestionBlocker", - "Interactable", "Charger", "CloningPod", "Destructible", @@ -54,13 +53,10 @@ namespace Content.Client.Entry "DeployableBarrier", "MagicMirror", "FloorTile", - "ShuttleController", "RandomInsulation", "Electrified", "Electrocution", - "Pourable", "Paper", - "Write", "Bloodstream", "TransformableContainer", "Mind", @@ -71,7 +67,6 @@ namespace Content.Client.Entry "BatterySelfRecharger", "Puddle", "Stomach", - "CanSpill", "SpeedLoader", "Hitscan", "StunOnCollide", @@ -79,9 +74,7 @@ namespace Content.Client.Entry "Brain", "CommunicationsConsole", "BarSign", - "DroppedBodyPart", "DoorBumpOpener", - "DroppedMechanism", "SolarPanel", "BodyScanner", "Stunbaton", @@ -93,7 +86,6 @@ namespace Content.Client.Entry "DamageOnToolInteract", "ExaminableBattery", "PottedPlantHide", - "SecureEntityStorage", "Lock", "PresetIdCard", "SolarControlConsole", @@ -118,18 +110,14 @@ namespace Content.Client.Entry "ApcPowerReceiver", "Cable", "StressTestMovement", - "Toys", "EmitSoundOnThrow", - "Salvage", "SalvageMagnet", "Flash", "Docking", "Telecrystal", - "TrashSpawner", "RCD", "RCDAmmo", "CursedEntityStorage", - "Listening", "Radio", "DisposalHolder", "DisposalTagger", @@ -154,8 +142,6 @@ namespace Content.Client.Entry "DrawableSolution", "InjectableSolution", "Barotrauma", - "GasSprayer", - "GasVapor", "GasVentPump", "GasPassiveVent", "GasVentScrubber", @@ -173,11 +159,6 @@ namespace Content.Client.Entry "AMEPart", "AMEFuelContainer", "AMEShield", - "PressurePump", - "PressureVent", - "VolumePump", - "PressureSiphon", - "PipeHeater", "AtmosDevice", "SignalReceiver", "SignalSwitch", @@ -200,7 +181,6 @@ namespace Content.Client.Entry "Headset", "ComputerBoard", "GasCanister", - "GasCanisterPort", "GasPort", "GasPortable", "AtmosPipeColor", @@ -212,12 +192,9 @@ namespace Content.Client.Entry "SeedExtractor", "Produce", "Log", - "Hoe", "Seed", "ActivatableUI", "ActivatableUIRequiresPower", - "BotanySharp", - "PlantSampleTaker", "Internals", "GasTank", "BreathMask", @@ -235,14 +212,10 @@ namespace Content.Client.Entry "MorgueTray", "CrematoriumEntityStorage", "RandomSpriteState", - "DebugEquip", - "InnateActions", "ReagentGrinder", "Extractable", "WelderRefinable", - "ConveyorAssembly", "TwoWayLever", - "FirelockElectronics", "SolutionInjectOnCollide", "Machine", "MachinePart", @@ -251,7 +224,6 @@ namespace Content.Client.Entry "ChemicalAmmo", "CargoTelepad", "TraitorDeathMatchRedemption", - "GlassBeaker", "CanHostGuardian", "SliceableFood", "DamageOtherOnHit", @@ -266,20 +238,14 @@ namespace Content.Client.Entry "Toilet", "ClusterFlash", "Repairable", - "GasGenerator", "SolutionTransfer", "Evaporation", - "Shovel", "ReagentTank", "UtilityAI", - "MouseAccent", "FlashImmunity", "GhostTakeoverAvailable", "GhostRoleMobSpawner", "GhostOnMove", - "BedsheetSpawner", - "ToySpawner", - "FigureSpawner", "RandomSpawner", "SpawnAfterInteract", "DisassembleOnActivate", diff --git a/Content.IntegrationTests/Tests/GameObjects/Components/EntityPrototypeComponentsTest.cs b/Content.IntegrationTests/Tests/GameObjects/Components/EntityPrototypeComponentsTest.cs index 954006aa4b..65eb9542db 100644 --- a/Content.IntegrationTests/Tests/GameObjects/Components/EntityPrototypeComponentsTest.cs +++ b/Content.IntegrationTests/Tests/GameObjects/Components/EntityPrototypeComponentsTest.cs @@ -1,10 +1,8 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; -using Content.Client; -using Content.Client.Entry; using NUnit.Framework; using Robust.Shared.ContentPack; using Robust.Shared.GameObjects; @@ -14,12 +12,12 @@ using YamlDotNet.RepresentationModel; namespace Content.IntegrationTests.Tests.GameObjects.Components { [TestFixture] - [TestOf(typeof(IgnoredComponents))] + [TestOf(typeof(Client.Entry.IgnoredComponents))] [TestOf(typeof(Server.Entry.IgnoredComponents))] public class EntityPrototypeComponentsTest : ContentIntegrationTest { [Test] - public async Task Test() + public async Task PrototypesHaveKnownComponents() { var (client, server) = await StartConnectedServerDummyTickerClientPair(); @@ -118,5 +116,40 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components Assert.Fail(message.ToString()); } + + [Test] + public async Task IgnoredComponentsExistInTheCorrectPlaces() + { + var (client, server) = await StartConnectedServerClientPair(); + var serverComponents = server.ResolveDependency(); + var ignoredServerNames = Server.Entry.IgnoredComponents.List; + var clientComponents = client.ResolveDependency(); + var ignoredClientNames = Client.Entry.IgnoredComponents.List; + + var failureMessages = ""; + foreach (var clientIgnored in ignoredClientNames) + { + if (clientComponents.TryGetRegistration(clientIgnored, out _)) + { + failureMessages = $"{failureMessages}\nComponent {clientIgnored} was ignored on client, but exists on client"; + } + if (!serverComponents.TryGetRegistration(clientIgnored, out _)) + { + failureMessages = $"{failureMessages}\nComponent {clientIgnored} was ignored on client, but does not exist on server"; + } + } + foreach (var serverIgnored in ignoredServerNames) + { + if (serverComponents.TryGetRegistration(serverIgnored, out _)) + { + failureMessages = $"{failureMessages}\nComponent {serverIgnored} was ignored on server, but exists on server"; + } + if (!clientComponents.TryGetRegistration(serverIgnored, out _)) + { + failureMessages = $"{failureMessages}\nComponent {serverIgnored} was ignored on server, but does not exist on client"; + } + } + Assert.IsEmpty(failureMessages); + } } } diff --git a/Content.Server/Entry/IgnoredComponents.cs b/Content.Server/Entry/IgnoredComponents.cs index b697b9a8ce..5deb43916e 100644 --- a/Content.Server/Entry/IgnoredComponents.cs +++ b/Content.Server/Entry/IgnoredComponents.cs @@ -13,10 +13,8 @@ namespace Content.Server.Entry "ItemStatus", "Marker", "Clickable", - "RadiatingLight", "Icon", "ClientEntitySpawner", - "ToySingularity", "CharacterInfo" }; }