feat: SkipRoads iteration toggle (terrain-water task 03)

Config flag SkipRoads (default false): when on, GenerateRoadsAsync and
the 3_roads snapshot are skipped entirely; export proceeds with all
four road sections present but empty (both v2 and legacy v1 permit
zero counts); the console states loudly that the blueprint is a
road-less iteration artifact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Stewart Howe 2026-08-07 01:27:36 -04:00
parent fb14b0693b
commit 81f7030140
2 changed files with 30 additions and 4 deletions

View file

@ -14,6 +14,11 @@ namespace IslaApocalypse.Core // Change this if your namespace is different
public static float DensityMultiplier = 1.0f; // <-- Replaces TownCount
public static int ChunkRadius = 24; // Default chunk size, can be overridden by config
// Iteration toggle: skip the ~25-min A* road pass entirely. The blueprint is
// still exported (road sections present but empty) — an iteration artifact,
// not a shippable world. Default false.
public static bool SkipRoads = false;
public static void LoadConfig()
{
string path = "res://ServerConfig.json";
@ -61,7 +66,13 @@ namespace IslaApocalypse.Core // Change this if your namespace is different
// Extract the ChunkRadius
if (data.ContainsKey("ChunkRadius")) {
ChunkRadius = (int)data["ChunkRadius"];
}
}
// Extract the SkipRoads iteration toggle
if (data.ContainsKey("SkipRoads"))
{
SkipRoads = (bool)data["SkipRoads"];
}
switch (profile)
{

View file

@ -92,13 +92,28 @@ public partial class MapGenerator : TextureRect
GD.Print($"{T()} Towns placed: {_towns.Count}.");
await CaptureStage("2_towns");
// NEW: We await the roads so the engine doesn't freeze!
await GenerateRoadsAsync();
if (ConfigManager.SkipRoads)
{
// Iteration toggle (terrain-water task 03): the road pass is ~25 min of a
// ~26-min generation. Skipping it leaves all four road lists empty, so the
// export writes present-but-empty road sections.
GD.Print("==========================================================");
GD.Print($"{T()} ⚠⚠ SKIPROADS IS ON — ROAD GENERATION SKIPPED ENTIRELY.");
GD.Print($"{T()} ⚠⚠ This blueprint has NO ROADS. It is an ITERATION");
GD.Print($"{T()} ⚠⚠ ARTIFACT, not a world. Do not judge or ship it.");
GD.Print("==========================================================");
}
else
{
// NEW: We await the roads so the engine doesn't freeze!
await GenerateRoadsAsync();
}
ExportMapData();
GD.Print($"{T()} Blueprint exported.");
await CaptureStage("3_roads");
if (!ConfigManager.SkipRoads)
await CaptureStage("3_roads");
GD.Print($"{T()} GENERATION COMPLETE.");
}