From bbc618a40a17ceb270777f87755428cbb80bd3ae Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 8 May 2026 09:22:23 +0200 Subject: [PATCH] phase(N.1): add ACDREAM_USE_WB_SCENERY feature flag scaffold MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase N.1 step 2: read the env var into a static bool. No behavior change yet — the flag is consumed in step 5 when GenerateViaWb is wired in. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/AcDream.Core/World/SceneryGenerator.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/AcDream.Core/World/SceneryGenerator.cs b/src/AcDream.Core/World/SceneryGenerator.cs index a5dc0ce..efdd79f 100644 --- a/src/AcDream.Core/World/SceneryGenerator.cs +++ b/src/AcDream.Core/World/SceneryGenerator.cs @@ -36,6 +36,16 @@ public static class SceneryGenerator private const float CellSize = 24.0f; private const float LandblockSize = 192.0f; // 8 cells * 24 units + /// + /// Phase N.1 feature flag — when set to "1", scenery placement uses + /// WorldBuilder's SceneryHelpers + TerrainUtils instead of + /// our hand-ported algorithms. Default off until visual verification at + /// landblock 0xA9B1 confirms behavior. See + /// docs/superpowers/specs/2026-05-08-phase-n1-scenery-via-wb-helpers-design.md. + /// + internal static readonly bool UseWbScenery = + System.Environment.GetEnvironmentVariable("ACDREAM_USE_WB_SCENERY") == "1"; + public readonly record struct ScenerySpawn( uint ObjectId, // GfxObj or Setup id Vector3 LocalPosition, // landblock-local world units