feat: let opportunity helpers act autonomously
This commit is contained in:
@@ -222,11 +222,17 @@ func begin_pantry_restock() -> bool:
|
||||
var interested := _get_npc(_interested_villager_id)
|
||||
if helper == null or interested == null or simulation_manager.get_active_opportunity() == null:
|
||||
return false
|
||||
var opportunity_helper: OpportunityHelperResult = (
|
||||
simulation_manager.get_active_opportunity_helper()
|
||||
)
|
||||
if opportunity_helper == null or opportunity_helper.helper_npc_id != helper.id:
|
||||
return false
|
||||
var selection: ActionSelectionResult = simulation_manager.action_selector.select_action(
|
||||
helper,
|
||||
simulation_manager.village,
|
||||
simulation_manager.clock.time_of_day(),
|
||||
simulation_manager.npcs
|
||||
simulation_manager.npcs,
|
||||
opportunity_helper
|
||||
)
|
||||
if (
|
||||
selection == null
|
||||
|
||||
Reference in New Issue
Block a user