From ebe64600c179db33a4dd4be082c14eed23bace57 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 6 Oct 2026 22:47:47 +0200 Subject: [PATCH] Demo Terminus: the player starts in the base Longinus, not a Pirates-made hull The Pirates hire the player, who is not one of them (ruling player-not-a-pirate); the base Longinus with its default fit is the start hull (ruling demo-start-hull-longinus). The hull is named in the script; StartingHull no longer owns the demo's hull. The Pirates-hull test is replaced by one pinning the Longinus, its Alakrita maker, a null ship faction and the origin. Co-Authored-By: Claude Opus 5.5 --- .../ServerShared/Scenarios/DemoTerminus.cs | 4 ++-- tests/Aetheria.Shared.Tests/DemoTerminusTests.cs | 15 ++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Assets/Scripts/ServerShared/Scenarios/DemoTerminus.cs b/Assets/Scripts/ServerShared/Scenarios/DemoTerminus.cs index 0555a3b29..8cda7c600 100644 --- a/Assets/Scripts/ServerShared/Scenarios/DemoTerminus.cs +++ b/Assets/Scripts/ServerShared/Scenarios/DemoTerminus.cs @@ -2,7 +2,7 @@ using float2 = CultMath.float2; // The demo: one gate, one region and one boss, with a fixed cast. The Pirates are the protagonist's ostensible // employer, Zhestokost the antagonist whose home is the boss zone and the exit, Lucent Media and Aeronautics Unlimited -// the neutrals. A prelude galaxy of that cast, entered in a Pirates-made hull. +// the neutrals. A prelude galaxy of that cast; the player, who is not a Pirate, flies the base Longinus. public sealed class DemoTerminus : Scenario { public static readonly TutorialGenerationSettings Cast = new TutorialGenerationSettings @@ -36,6 +36,6 @@ public sealed class DemoTerminus : Scenario galaxy.FactionRelationships[galaxy.ResolveFaction(Cast.BufferFaction)] = FactionRelationship.Neutral; foreach (var neutral in Cast.NeutralFactions) galaxy.FactionRelationships[galaxy.ResolveFaction(neutral)] = FactionRelationship.Neutral; - stage.Player(stage.Generated(stage.StartingHull, pirates), float2.zero); + stage.Player(stage.Generated("Longinus"), float2.zero); } } diff --git a/tests/Aetheria.Shared.Tests/DemoTerminusTests.cs b/tests/Aetheria.Shared.Tests/DemoTerminusTests.cs index daffe87ff..e2df794cd 100644 --- a/tests/Aetheria.Shared.Tests/DemoTerminusTests.cs +++ b/tests/Aetheria.Shared.Tests/DemoTerminusTests.cs @@ -103,18 +103,23 @@ public sealed partial class RunStartTests Assert.Equal("Terminus (Demo)", listed.Name); } - // The run start as New Game runs it: the player flies a Pirates-made hull, at the entrance zone's origin. + // The run start as New Game runs it: the player is not a Pirate, so the hull is the base Longinus, made by Alakrita, + // not by the Pirates or any cast faction, with no faction on the ship, at the entrance zone's origin. [Fact] - public void DemoTerminus_player_flies_a_pirates_hull_at_the_origin() + public void DemoTerminus_player_flies_a_non_pirates_brand_hull_the_longinus() { AddPirates(); foreach (var seed in DemoSeeds) { var (galaxy, _, staged, failures) = Launch(new DemoTerminus(), Inputs(() => seed)); Assert.True(failures.Count == 0, string.Join("; ", failures)); - Assert.Equal("Pirates", staged.Player.Faction.Name); - Assert.Same(galaxy.Factions.Single(faction => faction.Name == "Pirates"), staged.Player.Faction); - Assert.Equal(_startingHull, staged.Player.HullData.Name); + Assert.Equal("Longinus", staged.Player.HullData.Name); + var design = _cache.RefOf(staged.Player.HullData).Key; + var product = Assert.Single(_cache.GetAll(), p => p.Design.Key.Equals(design)); + var maker = _cache.Get(product.Manufacturer); + Assert.Equal("Alakrita", maker.Name); + Assert.DoesNotContain(galaxy.Factions, faction => faction.Name == maker.Name); + Assert.Null(staged.Player.Faction); Assert.Equal(float3.zero, staged.Player.Position); } }