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 # you interact with them
if get_node(CHAR_TYPE_NODE).get_node("npc").pressed: if get_node(CHAR_TYPE_NODE).get_node("npc").pressed:
new_character = ESCItem.new() new_character = ESCItem.new()
print("ITEM")
else: else:
new_character = ESCPlayer.new() new_character = ESCPlayer.new()
new_character.selectable = true 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 # 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 # state when the object is registered. If there's no current state, the
# default animation will be used. # default animation will be used.
print("Process "+str(default_anim_length)+" frames - default")
for loop in range(default_anim_length): for loop in range(default_anim_length):
texture = ImageTexture.new() texture = ImageTexture.new()
texture = sprite_frames.get_frame("idle_down", loop) texture = sprite_frames.get_frame("idle_down", loop)

View File

@@ -162,6 +162,12 @@ func _on_CreateButton_pressed() -> void:
var selected_index = get_node(ACTION_NODE).selected var selected_index = get_node(ACTION_NODE).selected
item.default_action = get_node(ACTION_NODE).get_item_text(selected_index) 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 # Add Dialog Position to the background item
var interact_position = ESCLocation.new() var interact_position = ESCLocation.new()
interact_position.name = "interact_position" interact_position.name = "interact_position"