Every new run is a scenario: the script harness, the tutorial and main galaxies as scenarios, the New Game submenu and six test arenas
A Scenario is an abstract C# class compiled with the game: Generate picks the galaxy through GalaxyStage (Main or Prelude, at the scenario's seed, the background noise drawn from the same seed), Stage places the run's first entities through ScenarioStage (Fit, Bare, Generated, Preset, Player, Place, Cargo), which collects named failures and admits nothing. RunStart generates the galaxy, the arena under Ambient and admits everything through Zone.Admit, all or nothing. The aetheria.scenario record, ScenarioShip, ScenarioEntity, RunStart.Check and the null-scenario branch are cut. New Game opens a submenu: Tutorial Galaxy and Main Galaxy, then (editor and development builds) Djinni Shakedown, Starved Reactor, Arcs, Duel, Launcher Angles and Long Haul, each with its brief. MainMenu.Launch is the one way into a new run; ActionGameManager.PendingScenario carries the scenario to StartGame once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8a0a29e0de
commit
d0782a7d14
31 changed files with 1173 additions and 611 deletions
|
|
@ -106,6 +106,8 @@ public class ActionGameManager : MonoBehaviour
|
|||
}
|
||||
|
||||
public static Galaxy CurrentGalaxy;
|
||||
// The scenario a new run starts from: MainMenu.Launch sets it, and StartGame's new-run branch consumes it once.
|
||||
public static Scenario PendingScenario;
|
||||
|
||||
public GameSettings Settings;
|
||||
//public string StarterShipTemplate = "Longinus";
|
||||
|
|
@ -796,14 +798,15 @@ public class ActionGameManager : MonoBehaviour
|
|||
var saved = CultCache.GetGlobal<SavedGame>();
|
||||
if (saved == null)
|
||||
{
|
||||
var scenario = PendingScenario ?? throw new InvalidOperationException("A new run needs a scenario; MainMenu.Launch sets one.");
|
||||
PendingScenario = null;
|
||||
SectorMap.QueueZoneReveal(CurrentGalaxy.Entrance.AdjacentZones.Prepend(CurrentGalaxy.Entrance));
|
||||
// RunStart owns what a new run starts with (docs/scenarios-cut.md, 2.2); this only enters and binds.
|
||||
RunStart.GenerateArena(ItemManager, Settings.ZoneSettings, CurrentGalaxy, null);
|
||||
// RunStart owns what a new run starts with (docs/scenarios-cut.md, R.4); this only enters and binds.
|
||||
RunStart.GenerateArena(ItemManager, Settings.ZoneSettings, CurrentGalaxy, scenario);
|
||||
PopulateLevel(CurrentGalaxy.Entrance);
|
||||
var failures = new List<string>();
|
||||
var staged = RunStart.Stage(ItemManager, Zone, null, Settings.StartingHullName,
|
||||
CurrentGalaxy.IsPrelude ? CurrentGalaxy.ResolveFaction(Settings.TutorialGenerationSettings.ProtagonistFaction) : null, failures)
|
||||
?? throw new InvalidOperationException($"The new run could not stage: {string.Join("; ", failures)}");
|
||||
var staged = RunStart.Stage(ItemManager, Zone, scenario, Settings.StartingHullName, Settings.TutorialGenerationSettings, failures)
|
||||
?? throw new InvalidOperationException($"Scenario {scenario.Name} could not stage: {string.Join("; ", failures)}");
|
||||
BindToEntity(staged.Player);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue