feat: profession-based staggered daily schedules

ProfessionDefinition gains schedule_offset (-0.12 to +0.12 fraction of day). ActionSelectionSystem shifts each NPC's effective time_of_day by their profession offset before determining sleep/meal/work periods. Farmers wake earliest (-0.04h = ~2:38am), woodcutters slightly early (-0.02h), guards slightly late (+0.02h), scholars latest (+0.05h = ~5:45am). Wanderers have no offset. The village now has naturally staggered rhythms instead of everyone doing the same thing at the same time.
This commit is contained in:
2026-07-09 00:19:14 +02:00
parent 2c3890502a
commit 8a955f3c29
7 changed files with 11 additions and 1 deletions
+2
View File
@@ -69,6 +69,7 @@ func _test_work_period_during_day() -> void:
"100 ticks should land in the work period"
)
var npc: SimNPC = manager.npcs[0]
npc.profession = SimulationIds.PROFESSION_WANDERER
npc.hunger = 20.0
npc.energy = 80.0
npc.home_position = npc.position
@@ -94,6 +95,7 @@ func _test_meal_period_hunger() -> void:
"50 ticks should land in the breakfast meal period"
)
var npc: SimNPC = manager.npcs[0]
npc.profession = SimulationIds.PROFESSION_WANDERER
npc.hunger = 65.0
npc.energy = 80.0
manager.village.food = 5.0