Initial commit: Theriapolis baseline at port/godot branch point

Captures the pre-Godot-port state of the codebase. This is the rollback
anchor for the Godot port (M0 of theriapolis-rpg-implementation-plan-godot-port.md).
All Phase 0 through Phase 6.5 work is included; Phase 7 is in flight.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Christopher Wiebe
2026-04-30 20:40:51 -07:00
commit b451f83174
525 changed files with 75786 additions and 0 deletions
@@ -0,0 +1,37 @@
using Theriapolis.Core.Data;
using Theriapolis.Core.Util;
namespace Theriapolis.Core.World.Generation;
/// <summary>
/// Accumulating context passed through the world-generation pipeline.
/// Holds the WorldState under construction, per-subsystem RNG streams, and a logger.
/// </summary>
public sealed class WorldGenContext
{
public WorldState World { get; }
/// <summary>Named RNG sub-streams, keyed by the subsystem constant name.</summary>
public Dictionary<string, SeededRng> Rngs { get; } = new();
/// <summary>Directory that holds macro_template.json, biomes.json, etc.</summary>
public string DataDirectory { get; init; } = "";
/// <summary>Called after each stage completes: (stageName, progressFraction 01).</summary>
public Action<string, float>? ProgressCallback { get; set; }
/// <summary>Simple diagnostic log sink.</summary>
public Action<string>? Log { get; set; }
public WorldGenContext(ulong seed, string dataDirectory)
{
World = new WorldState { WorldSeed = seed };
DataDirectory = dataDirectory;
}
public void ReportProgress(string stageName, float fraction)
=> ProgressCallback?.Invoke(stageName, Math.Clamp(fraction, 0f, 1f));
public void LogMessage(string msg)
=> Log?.Invoke(msg);
}