This commit is contained in:
2025-01-31 15:09:31 +08:00
parent 6272cd86e8
commit 552d32ff70
4 changed files with 34 additions and 42 deletions
+6 -14
View File
@@ -1,27 +1,19 @@
@tool
extends Blackboard
# Default values when initializing blackboard
var default_data = {
"move_target": null, # Vector2i for movement target
"can_arrange": false, # Whether bot can arrange items
"can_grab": false, # Whether bot can grab items
"can_put": false, # Whether bot can put items
"should_move": false, # Whether bot should move
"action_points": 0, # Current action points
"current_action": "", # Current action being performed
"item_to_grab": null, # Item to grab
"grab_position": null, # Position to grab from
"put_position": null, # Position to put item
"arrange_from": -1, # Slot to arrange from
"arrange_to": -1 # Slot to arrange to
"move_target": null,
"current_action": "",
"action_points": 3, # Adjust this value based on your game design
"last_position": null,
"path": [],
"is_moving": false
}
func _ready():
if Engine.is_editor_hint():
return
# Initialize with default values
for key in default_data:
if not has_value(key):
set_value(key, default_data[key])