Formalises Content/ access from the Godot host. Content lives at the
repo root (sibling of Theriapolis.Godot/), not duplicated under res://,
so the MonoGame branch and headless Tools keep reading from the same
single source of truth.
ContentPaths.cs:
Static ContentRoot/DataDir/GfxDir resolved once via res:// walk-up
and cached. Replaces two inline ResolveDataDir copies in SmokeTest
and WorldMapView.
ContentLoader.cs:
LoadGfx(relativePath) -> ImageTexture, cached by relative path.
Bypasses the res:// import pipeline because Content/ lives outside
the project — fine for static pixel-art assets at native size, and
the project default texture filter is already Nearest. Cache is
per-process, never evicted (full atlas <1 MB).
AssetTest.cs + Main.cs --asset-test flag:
Smoke-tests the pipeline. Walks Content/Data and Content/Gfx,
reports counts, attempts to load every PNG, prints per-subdir
breakdown. Quits with non-zero on any failure.
Verified post-refactor (--asset-test):
53 JSON files in Data, 50 PNG files in Gfx (8 tactical/deco +
42 tactical/surface), 50/50 loaded, 0 failures.
Verified no regressions:
--smoke-test (M1) still produces canonical FNV hashes.
--world-map 12345 (M2) still produces 3 rivers / 91 roads /
226 settlements / 0 rails / 0 bridges.
Scope note: plan mentioned "tile/NPC/CodexUI atlases — three
separate themes". Only tactical/ exists in Content/Gfx today; NPC
and CodexUI atlases never landed during MonoGame development. M3
ships what's actually present. ContentLoader.LoadGfx works for any
future sub-directories without changes.
Closes M3 of theriapolis-rpg-implementation-plan-godot-port.md.
Next: M4 (tactical render).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Proves Theriapolis.Core works untouched under Godot's csproj — the worldgen
pipeline produces byte-identical output whether invoked from the Tools CLI
or from inside the Godot process. This is the determinism contract surviving
the port.
Architecture test:
CoreNoDependencyTests now forbids Godot.* and GodotSharp in addition to
Microsoft.Xna and MonoGame. Both bans stay in force for the duration of
the port so neither engine can leak into Core.
Determinism oracle:
New worldgen-hash Tools command runs the full pipeline and prints FNV-1a
hashes for every channel (elevation, moisture, temperature, biomes,
settlements, polylines) plus per-stage hashes. Pairs with the Godot
smoke-test for cross-process verification.
Godot-side smoke test:
SmokeTest.cs runs WorldGenerator.RunAll inside the Godot process; Main.cs
fires it on --smoke-test <seed>. Resolves Content/Data via res:// walk-up.
M0 hello-world behaviour preserved when launched without the flag.
Verification (seed 12345):
- dotnet run -- worldgen-hash and Godot --headless --smoke-test agree on
all 6 channels and all 14 per-stage hashes (diff produces zero output)
- 10-run sweeps stable on both sides post-determinism-fix
- dotnet test: 708/708 pass
Closes M1 of theriapolis-rpg-implementation-plan-godot-port.md.
Next: M2 (world map render).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>