fix(game.gd): if using an item cancel action on click on bg, fixes #116

This commit is contained in:
2025-09-02 13:25:35 +02:00
parent 2c42dff6e5
commit c91589ec89
4 changed files with 5 additions and 5 deletions

View File

@@ -270,7 +270,8 @@ func perform_inputevent_on_object(
# player walking towards the destination.
if current_action and not event_to_queue:
# MODIFIED FOR RETURN TO MONKEY UI
# clear_current_action()
if action_state != ACTION_INPUT_STATE.AWAITING_TARGET_ITEM:
clear_current_action()
action_finished.emit()
return

View File

@@ -245,6 +245,7 @@ func click_on_bg(position: Vector2) -> void:
# If we are using an inventory item reset mouse cursor and cancel action
if escoria.action_manager.action_state == ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM:
gymkhana.cursor_manager.clear_cursor()
escoria.action_manager.clear_current_tool()
if escoria.main.current_scene.player:

View File

@@ -5,4 +5,3 @@ func set_cursor(texture: Texture) -> void:
func clear_cursor():
Input.set_custom_mouse_cursor(null)
# escoria.action_manager.clear_current_tool()