feat: let opportunity helpers act autonomously

This commit is contained in:
Rijad Zuzo
2026-07-16 10:58:48 +02:00
parent eaa15c076c
commit 0332c57a89
14 changed files with 253 additions and 30 deletions
+4 -1
View File
@@ -109,13 +109,16 @@ func _run() -> void:
)
manager.simulate_tick()
var deposit_decision: ActionSelectionResult = manager.get_latest_decision(helper.id)
_check(
(
helper.current_task == SimulationIds.ACTION_DEPOSIT_FOOD
and helper.target_id == SimulationIds.STORAGE_VILLAGE_PANTRY
and helper.has_travel_target
and deposit_decision != null
and "Responding to village need" in deposit_decision.reason
),
"The helper should autonomously choose the real pantry deposit after gathering"
"The re-derived helper should autonomously choose the real pantry deposit"
)
helper_visual.global_position = helper.travel_target_position
manager.synchronize_npc_position(helper.id, helper_visual.global_position)