refactor: separate action system responsibilities

This commit is contained in:
2026-07-05 14:17:45 +02:00
parent 81df7b5939
commit 4673f0698d
18 changed files with 458 additions and 383 deletions
+4 -3
View File
@@ -61,8 +61,9 @@ func _run() -> void:
)
worker.set_task(SimulationIds.ACTION_STUDY, 2.0)
worker.start_working()
worker.simulate_tick(village)
worker.simulate_tick(village)
var executor := ActionExecutionSystem.new()
executor.advance_npc(worker, village)
executor.advance_npc(worker, village)
_check(worker.task_complete, "A two-tick working task should complete")
var starving := SimNPC.new(
@@ -74,7 +75,7 @@ func _run() -> void:
)
starving.hunger = 100.0
starving.starvation_death_threshold = 1
starving.simulate_tick(village)
executor.advance_npc(starving, village)
_check(starving.is_dead, "Starvation threshold should still kill an NPC")
if failures.is_empty():