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

@@ -1254,7 +1254,6 @@ func export_player(scene_name) -> void:
# you interact with them
if get_node(CHAR_TYPE_NODE).get_node("npc").pressed:
new_character = ESCItem.new()
print("ITEM")
else:
new_character = ESCPlayer.new()
new_character.selectable = true
@@ -1478,7 +1477,6 @@ func export_generate_animations(character_node, num_directions) -> void:
# Generate default animation. This is used by the object manager to set the
# state when the object is registered. If there's no current state, the
# default animation will be used.
print("Process "+str(default_anim_length)+" frames - default")
for loop in range(default_anim_length):
texture = ImageTexture.new()
texture = sprite_frames.get_frame("idle_down", loop)

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"