Files
Christopher Wiebe b451f83174 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>
2026-04-30 20:40:51 -07:00

73 lines
3.1 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace Theriapolis.Core.World;
public enum NarrativeAnchor : byte
{
Millhaven, Thornfield, FortDustwall, TheTangles,
SanctumFidelis, Heartstone
}
public enum SettlementEconomy : byte
{
Farming, Mining, Manufacturing, Trade, Military, Fishing
}
public enum SettlementGovernance : byte
{
Council, Mayor, MilitaryCommandant, ClanElder, Corporate, Anarchic
}
public enum PoiType : byte
{
None, ImperiumRuin, AbandonedMine, CultDen, NaturalCave, OvergrownSettlement
}
/// <summary>
/// A placed settlement or point of interest on the world map.
/// Tier 14 are inhabited settlements; Tier 5 are PoIs (IsPoi == true).
/// </summary>
public sealed class Settlement
{
public int Id { get; init; }
public string Name { get; set; } = "";
public int Tier { get; init; }
public int TileX { get; init; }
public int TileY { get; init; }
/// <summary>World-pixel X (tile center).</summary>
public float WorldPixelX => TileX * C.WORLD_TILE_PIXELS + C.WORLD_TILE_PIXELS * 0.5f;
/// <summary>World-pixel Y (tile center).</summary>
public float WorldPixelY => TileY * C.WORLD_TILE_PIXELS + C.WORLD_TILE_PIXELS * 0.5f;
/// <summary>Narrative anchor this settlement fulfills, or null for non-anchors.</summary>
public NarrativeAnchor? Anchor { get; init; }
// ── Generated attributes (set by SettlementAttributesStage) ─────────────
public SettlementEconomy Economy { get; set; }
public SettlementGovernance Governance { get; set; }
public string[] CladeRatios { get; set; } = Array.Empty<string>();
public float WealthLevel { get; set; }
public int Population { get; set; }
public float HybridPct { get; set; }
public string ScentProfile { get; set; } = "";
// ── Derived after infrastructure gen ────────────────────────────────────
public bool HasRailStation { get; set; }
public bool IsOnRiver { get; set; }
// ── PoI-specific ─────────────────────────────────────────────────────────
public bool IsPoi { get; init; }
public PoiType PoiType { get; set; }
// ── Phase 6 M0 — building footprints ────────────────────────────────────
/// <summary>
/// Buildings stamped inside this settlement, derived deterministically
/// from the matched <see cref="Data.SettlementLayoutDef"/>. Populated
/// lazily by <see cref="Settlements.SettlementStamper"/> on first chunk
/// generation that touches this settlement; identical across reloads.
/// </summary>
public List<Settlements.BuildingFootprint> Buildings { get; } = new();
/// <summary>True once <see cref="Buildings"/> has been resolved.</summary>
public bool BuildingsResolved { get; set; }
}