From f235eea3d98ad2b0bd886aed97c1885fa1954fe3 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 18 Oct 2026 21:22:05 +0200 Subject: [PATCH] Exit_open_only_in_the_exit_zone: the faction with the boss Loadout is one that can get its hull's brand Co-Authored-By: Claude Sonnet 5.5 --- tests/Aetheria.Shared.Tests/RunGoalTests.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/RunGoalTests.cs b/tests/Aetheria.Shared.Tests/RunGoalTests.cs index ef714a5e4..804576a46 100644 --- a/tests/Aetheria.Shared.Tests/RunGoalTests.cs +++ b/tests/Aetheria.Shared.Tests/RunGoalTests.cs @@ -432,9 +432,12 @@ public sealed partial class RunStartTests { var galaxy = RunStart.Generate(new MainGalaxy(), Inputs(() => 1)); // The shipped catalog sets no boss Loadout, so the main galaxy places no boss: give a faction one and a boss zone that is - // not the exit, as the generator would for a faction with a boss Loadout. - var faction = galaxy.Factions.First(); - SetBoss(faction, MakeBossLoadout(SoldShipHulls().First(), "Gate Boss")); + // not the exit, as the generator would for a faction with a boss Loadout. The Loadout leaves its hull's brand to the + // context, so the faction is one that can get a product of the hull: its own maker. + var hull = SoldShipHulls().OrderBy(h => h.Name, StringComparer.Ordinal).First(); + var maker = _cache.Get(_cache.GetAll().First(product => _cache.Get(product.Design) == hull).Manufacturer); + var faction = galaxy.Factions.Single(candidate => candidate.Name == maker.Name); + SetBoss(faction, MakeBossLoadout(hull, "Gate Boss")); var bossZone = galaxy.Zones.First(zone => zone != galaxy.Exit); galaxy.BossZones[faction] = bossZone; var zone = ZoneOf(galaxy, bossZone);