Visits are the run's fact, not contents; one start path for game and tests; name the conjuring Materialize spreads

Galaxy.VisitedZones (saved as SavedGame.VisitedZones, key 19; a save without it reads its packs as visits) is written when PopulateLevel enters a zone and read by SectorRenderer, so unvisited zones show 'Has not been visited' as before. RunStart.Begin owns the new-run order (arena, enter, stage, materialize only if staged) and ActionGameManager calls it; AFailedStartMaterializesNothing runs it. Materialize's comment names the generated stock and loadouts as scaffolding deleted by follow-up conjuring-site-deletions; RegionStep and RequireDesigns comments corrected.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
soul 2026-11-28 18:11:30 +01:00
commit 6c92f46471
6 changed files with 93 additions and 17 deletions

View file

@ -850,6 +850,7 @@ public class ActionGameManager : MonoBehaviour
if (galaxyZone == null) throw new ArgumentNullException(nameof(galaxyZone));
// RunStart.Materialize owns every zone's existence; entering only reads it.
CurrentGalaxy.VisitedZones.Add(galaxyZone);
Zone = galaxyZone.Contents ?? throw new InvalidOperationException($"Zone {galaxyZone.Name} has no live contents.");
_zoneEntered = true; // the clock forgets its lead between frames, never inside a step
PlayMusic(MusicType.Overworld);
@ -967,12 +968,8 @@ public class ActionGameManager : MonoBehaviour
RunSave.Simulation simulation = null;
Func<RunStart.Staged> start = () =>
{
RunStart.GenerateArena(ItemManager, Settings.ZoneSettings, Settings.PlanetSettings, CurrentGalaxy, scenario);
RunStart.BuildArena(ItemManager, Settings.PlanetSettings, CurrentGalaxy);
PopulateLevel(CurrentGalaxy.Entrance);
var placed = RunStart.Stage(ItemManager, Zone, scenario, Settings.StartingHullName, failures);
if (placed != null) RunStart.Materialize(ItemManager, Settings.ZoneSettings, Settings.PlanetSettings, CurrentGalaxy);
return placed;
return RunStart.Begin(ItemManager, Settings.ZoneSettings, Settings.PlanetSettings, CurrentGalaxy, scenario,
Settings.StartingHullName, failures, () => PopulateLevel(CurrentGalaxy.Entrance));
};
var staged = RunStart.Launch(() =>
{