using Content.Shared.Hands.Components; using Content.Shared.Prototypes; using Content.Shared.Pulling.Components; using Robust.Shared.GameObjects; using Robust.Shared.Prototypes; namespace Content.IntegrationTests.Tests.Puller; #nullable enable [TestFixture] public sealed class PullerTest { /// /// Checks that needsHands on PullerComponent is not set on mobs that don't even have hands. /// [Test] public async Task PullerSanityTest() { await using var pair = await PoolManager.GetServerClient(); var server = pair.Server; var compFactory = server.ResolveDependency(); var protoManager = server.ResolveDependency(); await server.WaitAssertion(() => { Assert.Multiple(() => { foreach (var proto in protoManager.EnumeratePrototypes()) { if (!proto.TryGetComponent(out SharedPullerComponent? puller)) continue; if (!puller.NeedsHands) continue; Assert.That(proto.HasComponent(compFactory), $"Found puller {proto} with NeedsHand pulling but has no hands?"); } }); }); await pair.CleanReturnAsync(); } }