--- /dev/null
+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
+{
+ /// <summary>
+ /// Checks that needsHands on PullerComponent is not set on mobs that don't even have hands.
+ /// </summary>
+ [Test]
+ public async Task PullerSanityTest()
+ {
+ await using var pair = await PoolManager.GetServerClient();
+ var server = pair.Server;
+
+ var compFactory = server.ResolveDependency<IComponentFactory>();
+ var protoManager = server.ResolveDependency<IPrototypeManager>();
+
+ await server.WaitAssertion(() =>
+ {
+ Assert.Multiple(() =>
+ {
+ foreach (var proto in protoManager.EnumeratePrototypes<EntityPrototype>())
+ {
+ if (!proto.TryGetComponent(out SharedPullerComponent? puller))
+ continue;
+
+ if (!puller.NeedsHands)
+ continue;
+
+ Assert.That(proto.HasComponent<HandsComponent>(compFactory), $"Found puller {proto} with NeedsHand pulling but has no hands?");
+ }
+ });
+ });
+
+ await pair.CleanReturnAsync();
+ }
+}
damage:
types:
Piercing: 5
- - type: Puller
- needsHands: true
- type: Tag
tags:
- VimPilot
- type: HTN
rootTask:
task: SimpleHostileCompound
- - type: Puller
- needsHands: true
- type: ZombieImmune
- type: entity
accent: chicken
- type: SentienceTarget
flavorKind: station-event-random-sentience-flavor-organic
- - type: Puller
- needsHands: true
- type: NpcFactionMember
factions:
- Passive
-
+
- type: entity
parent: MobChicken
id: MobChicken1
Base: dead-1
Dead:
Base: dead-1
-
+
- type: entity
parent: MobChicken
id: MobChicken2
prototype: Mothroach
- type: TypingIndicator
proto: moth
- - type: Puller
- needsHands: true
- type: Destructible
thresholds:
- trigger:
bloodMaxVolume: 0.1
- type: MobPrice
price: 50
- - type: Puller
- needsHands: true
- type: entity
name: cow
path: /Audio/Animals/goose_honk.ogg
- type: Bloodstream
bloodMaxVolume: 100
- - type: Puller
- type: NpcFactionMember
factions:
- Passive
- type: HTN
rootTask:
task: SimpleHostileCompound
- - type: Puller
- type: entity
name: kangaroo
- type: GhostTakeoverAvailable
- type: Loadout
prototypes: [SyndicateOperativeGearMonkey]
-
+
- type: entity
id: MobMonkeySyndicateAgent
parent: MobBaseSyndicateMonkey
- type: CanEscapeInventory
- type: MobPrice
price: 50
- - type: Puller
- needsHands: true
- type: BadFood
- type: NonSpreaderZombie
- type: PreventSpiller
- type: Damageable
damageContainer: Biological
damageModifierSet: Scale
- - type: Puller
- needsHands: true
- type: Tag
tags:
- VimPilot
path: /Audio/Animals/frog_ribbit.ogg
- type: Bloodstream
bloodMaxVolume: 50
- - type: Puller
- needsHands: true
- type: Tag
tags:
- VimPilot
- type: Damageable
damageContainer: Biological
damageModifierSet: Scale
- - type: Puller
- needsHands: true
# Code unique spider prototypes or combine them all into one spider and get a
# random sprite state when you spawn it.
gender: epicene
- type: SentienceTarget
flavorKind: station-event-random-sentience-flavor-corgi
- - type: Puller
- type: MobPrice
price: 200
- type: Tag