This commit is contained in:
2025-01-31 17:45:35 +08:00
parent cf389135c0
commit ef8d06b6cc
7 changed files with 253 additions and 26 deletions
+9
View File
@@ -1,6 +1,15 @@
extends ConditionLeaf
func is_goals_achieved(actor) -> bool:
# ... same is_goals_achieved function as in can_grab.gd ...
return false
func tick(actor: Node, blackboard: Blackboard) -> int:
# First check if goals are achieved
if is_goals_achieved(actor):
blackboard.set_value("current_action", "idle")
return FAILURE
# Find an item in playerboard that matches goals
var put_slot = -1
for i in range(actor.playerboard.size()):