Organic construction v2: three verified fixes, one open problem

Fixes (headless-verified): homes founded at the habitual sleeping spot
within reach of the community (not at distant stone mines); night sends
everyone to bed so beds are used and rough nights actually occur; a bed
must exist at arrival - floor-sleepers at full shelters now count as
unsheltered. Diagnostics added: incomplete_sites stat column, founding
logs.

Open (documented in FINDINGS.md, paused by request): the loop builds
forward but cannot rebuild after loss - winter crises ruin shelters and
recovery stalls (4 foundings in 240 days, no granary after two famines).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-21 14:58:43 -04:00
parent 41cd417601
commit 676a9f3f31
7 changed files with 6955 additions and 6387 deletions
+5 -3
View File
@@ -117,12 +117,14 @@ public partial class GameManager : Node2D
}
}
/// <summary>How many villagers are currently sleeping at this shelter.</summary>
public int RestingOccupancy(Building b)
/// <summary>How many villagers (other than <paramref name="except"/>)
/// are currently sleeping at this shelter.</summary>
public int RestingOccupancy(Building b, Npc? except = null)
{
int count = 0;
foreach (var npc in Npcs)
if (npc.State == NpcState.Resting && npc.Position.DistanceTo(b.Site) <= 2.5f)
if (npc != except && npc.State == NpcState.Resting &&
npc.Position.DistanceTo(b.Site) <= 2.5f)
count++;
return count;
}