feat: let opportunity helpers act autonomously
This commit is contained in:
@@ -156,7 +156,6 @@ func simulate_tick() -> void:
|
||||
tick_count += 1
|
||||
if debug_logs:
|
||||
print("--- Tick ", tick_count, " ---")
|
||||
|
||||
var village_was_changed := false
|
||||
for npc in npcs:
|
||||
village_was_changed = _simulate_npc_tick(npc) or village_was_changed
|
||||
@@ -207,7 +206,8 @@ func _select_action_if_idle(npc: SimNPC, previous_state: StringName) -> void:
|
||||
return
|
||||
if npc.task_state not in [SimNPC.TASK_STATE_IDLE, SimNPC.TASK_STATE_COMPLETE]:
|
||||
return
|
||||
var selection := action_selector.select_action(npc, village, clock.time_of_day(), npcs)
|
||||
var helper := get_active_opportunity_helper()
|
||||
var selection := action_selector.select_action(npc, village, clock.time_of_day(), npcs, helper)
|
||||
if selection == null:
|
||||
return
|
||||
latest_decisions[npc.id] = selection
|
||||
|
||||
Reference in New Issue
Block a user