feat: Wizard - set up combine when selected for inventory items

This commit is contained in:
Balloonpopper
2023-01-02 17:18:04 +11:00
parent cc0a067b18
commit dc4b6c24fe
2 changed files with 7 additions and 3 deletions

View File

@@ -158,10 +158,16 @@ func _on_CreateButton_pressed() -> void:
item.global_id = get_node(GLOBAL_ID_NODE).text
item.is_interactive = get_node(INTERACTIVE_NODE).pressed
item.tooltip_name = get_node(ITEM_NAME_NODE).text
var selected_index = get_node(ACTION_NODE).selected
item.default_action = get_node(ACTION_NODE).get_item_text(selected_index)
# Make the item by default it's usable straight out of the inventory
if inventory_mode == true:
var new_pool_array: PoolStringArray = item.combine_when_selected_action_is_in
new_pool_array.append("use")
item.combine_when_selected_action_is_in = new_pool_array
# Add Dialog Position to the background item
var interact_position = ESCLocation.new()
interact_position.name = "interact_position"