From 65464a0a0e94bf94583e3fc4bbac3d4fe3b38904 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 6 Oct 2026 19:45:37 +0200 Subject: [PATCH] Demo Terminus tests: the Pirates fixture reaches every manufacturer, as the entrance's station needs Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/DemoTerminusTests.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/DemoTerminusTests.cs b/tests/Aetheria.Shared.Tests/DemoTerminusTests.cs index 03a1bb123..97e324649 100644 --- a/tests/Aetheria.Shared.Tests/DemoTerminusTests.cs +++ b/tests/Aetheria.Shared.Tests/DemoTerminusTests.cs @@ -14,11 +14,17 @@ public sealed partial class RunStartTests { private static readonly uint[] DemoSeeds = { 1, 2, 3, 4, 5 }; - // The catalog record the demo's protagonist needs, until the shipped catalog has one. - private void AddPirates() => _cache.Upsert(new Faction + // The catalog record the demo's protagonist needs, until the shipped catalog has one. Zone names need a name file, + // and the entrance's station needs a faction whose allegiance reaches some manufacturer, so it reaches every one. + private void AddPirates() { - Name = "Pirates", ShortName = "Pirates", GeonameFile = _cache.RefOf(_cache.GetAll().First()) - }); + var pirates = new Faction + { + Name = "Pirates", ShortName = "Pirates", GeonameFile = _cache.RefOf(_cache.GetAll().First()) + }; + foreach (var faction in _cache.GetAll().ToArray()) pirates.Allegiance[_cache.RefOf(faction)] = 1; + _cache.Upsert(pirates); + } private Galaxy DemoGalaxy(uint seed) => RunStart.Generate(new DemoTerminus(), Inputs(() => seed));