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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user