Layout-aim tests: AddWing picks the guns by design name (the hull is equipment too)

Fixes 3098ff69, whose two Wing tests did not build their fixture. Test-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-15 01:52:44 +02:00
commit 61e66dac35

View file

@ -58,8 +58,8 @@ public sealed partial class ContactRevealTests
Assert.True(ship.TryEquip(Make("Gun"), new int2(0, 0)));
Assert.True(ship.TryEquip(Make("Gun"), new int2(2, 3)));
Place(ship, position);
var gunA = ship.Equipment.Single(i => i.Position.x == 0);
var gunB = ship.Equipment.Single(i => i.Position.x == 2);
var gunA = ship.Equipment.Single(i => i.Data.Name == "Gun" && i.Position.x == 0);
var gunB = ship.Equipment.Single(i => i.Data.Name == "Gun" && i.Position.x == 2);
Assert.True(gunA.Hardpoint != null && gunB.Hardpoint != null && !ReferenceEquals(gunA.Hardpoint, gunB.Hardpoint), "fixture: each gun sits on its own mount");
return (ship, gunA, gunB);
}