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 <noreply@anthropic.com>
This commit is contained in:
parent
da2a299baa
commit
80de88f267
1 changed files with 7 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue