Use inventory items (WIP)
This commit is contained in:
@@ -238,7 +238,8 @@ func click_on_item(item_global_id: String, event: InputEvent, action: String) ->
|
||||
escoria.action_manager.do(
|
||||
escoria.action_manager.ACTION.ITEM_LEFT_CLICK,
|
||||
[item_global_id, event],
|
||||
true
|
||||
false
|
||||
# true
|
||||
)
|
||||
|
||||
if (action == ACTION1 && target_obj.tooltip_name != "") || (action == ACTION2 && target_obj is ESCItemWithTooltip && target_obj.tooltip2_name != ""):
|
||||
@@ -276,6 +277,9 @@ func click_on_inventory_item(item_global_id: String, event: InputEvent, action:
|
||||
$tooltip_layer/tooltip2.hide()
|
||||
|
||||
func left_click_on_inventory_item(inventory_item_global_id: String, event: InputEvent) -> void:
|
||||
var target_obj = escoria.object_manager.get_object(inventory_item_global_id).node
|
||||
if ACTION1 in target_obj.combine_when_selected_action_is_in:
|
||||
Input.set_custom_mouse_cursor(target_obj.inventory_texture)
|
||||
click_on_inventory_item(inventory_item_global_id, event, ACTION1)
|
||||
|
||||
func right_click_on_inventory_item(inventory_item_global_id: String, event: InputEvent) -> void:
|
||||
|
||||
Reference in New Issue
Block a user