Fix input being blocked when item is not interactive #91 (#481)
This commit is contained in:
@@ -271,14 +271,8 @@ func _ready():
|
||||
# - event: Triggered event
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton and event.is_pressed():
|
||||
if not escoria.current_state == escoria.GAME_STATE.DEFAULT or \
|
||||
not is_interactive:
|
||||
escoria.logger.info(
|
||||
(
|
||||
"Item %s is not interactive or the game state doesn't " +
|
||||
"accept interactions"
|
||||
) % global_id
|
||||
)
|
||||
if not escoria.current_state == escoria.GAME_STATE.DEFAULT:
|
||||
escoria.logger.info("Game state doesn't accept interactions")
|
||||
return
|
||||
var p = get_global_mouse_position()
|
||||
var mouse_in_shape: bool = false
|
||||
|
||||
Reference in New Issue
Block a user