refactor: separate action system responsibilities
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user