fix(game.gd): if using an item cancel action on click on bg, fixes #116
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user