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 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-06 22:47:47 +02:00
commit ebe64600c1
2 changed files with 12 additions and 7 deletions

View file

@ -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);
}
}

View file

@ -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<FactionProductData>(), 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);
}
}