From 929020e7df46bf4d76b3333e72d4268c668ab694 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 30 Sep 2026 15:00:44 +0200 Subject: [PATCH] Scenarios Cut 1: a quiet arena drops a story station's turrets too The quiet-arena test ran with an empty Narrative directory, so the story-station branch of ZoneGenerator never ran under Ambient: false and keeping its turrets went unnoticed (Soul's S06). The test now places a story station in the entrance, as the narrative loader would, and checks it is generated. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/RunStartTests.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/Aetheria.Shared.Tests/RunStartTests.cs b/tests/Aetheria.Shared.Tests/RunStartTests.cs index 3ae6ead30..5065e4398 100644 --- a/tests/Aetheria.Shared.Tests/RunStartTests.cs +++ b/tests/Aetheria.Shared.Tests/RunStartTests.cs @@ -244,7 +244,8 @@ public sealed class RunStartTests : IDisposable } // Ambient: false keeps the stations and drops every generated ship and turret; ambient, and a plain New Game, keep - // them. The arena is the galaxy's entrance pack. + // them. The arena is the galaxy's entrance pack. The entrance holds a story station, placed as the narrative would + // place one, so a story station's own turrets are dropped too. [Fact] public void AQuietArenaHasNoGeneratedShipOrTurretButKeepsItsStations() { @@ -253,6 +254,10 @@ public sealed class RunStartTests : IDisposable pack.Entities.OfType().Count(e => ((HullData) _cache.Get(e.Hull.Data)).HullType == HullType.Turret), pack.Entities.OfType().Count(e => ((HullData) _cache.Get(e.Hull.Data)).HullType == HullType.Station)); + _galaxy.Entrance.Locations.Add(new LocationStory + { + Zone = _galaxy.Entrance, Name = "story", Type = LocationType.Station, Faction = _protagonist, Turrets = 2 + }); var plain = Census(RunStart.GenerateArena(_items, _zoneSettings, _galaxy, null)); var ambient = Census(RunStart.GenerateArena(_items, _zoneSettings, _galaxy, new Scenario { Ambient = true })); var quietPack = RunStart.GenerateArena(_items, _zoneSettings, _galaxy, new Scenario { Ambient = false }); @@ -265,6 +270,7 @@ public sealed class RunStartTests : IDisposable Assert.Equal(0, quiet.turrets); Assert.True(quiet.stations > 0); Assert.Equal(ambient.stations, quiet.stations); + Assert.Contains(quietPack.Entities.OfType(), station => station.Story == 0); } // A turret preset stages as an orbital entity with no orbit, which stays where it is put.