From 80de88f2674a4799c9d1256b3a89e7e23e42ccbf Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 3 Oct 2026 14:54:03 +0200 Subject: [PATCH] Ship mounts: each weapon needs a muzzle of its own Kills the Stryker survivor that armed every weapon with any muzzle on the ship (the && in the per-weapon muzzle check turned into ||): a second weapon mount with no muzzle is refused even when the first has one. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs b/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs index 349411ea2..8855475ae 100644 --- a/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs +++ b/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs @@ -356,6 +356,13 @@ public sealed class ShipAuthoringTests unarmed.Visual.Anchors.RemoveAll(anchor => anchor.Role == "weapon-muzzle"); Assert.Contains("mod.skiff: weapon hardpoint gun needs at least one muzzle anchor", Refusal(unarmed)); + // Each weapon needs a muzzle of its own: another weapon's muzzle does not arm it. + var second = Armed(); + second.Hull.Shape.Cells[0, 1] = true; + second.Hull.Hardpoints.Add(new HardpointData { Type = HardpointType.Launcher, Position = new int2(0, 1), Shape = new Shape(), Transform = "tube" }); + second.Visual.Anchors.Add(new ShipAnchor { Id = "tube", Role = "weapon-mount", ModelNodeId = "tube" }); + Assert.Contains("mod.skiff: weapon hardpoint tube needs at least one muzzle anchor", Refusal(second)); + // A valid pair plans without a refusal of the plan's own; muzzles by Order, then id ordinally. var valid = Armed(); var (mount, muzzles) = Assert.Single(ShipModPlan.Build(valid.Hull, valid.Visual).Weapons);