From 82b10bdae5ac2eee09cdb292e2bf76787337e060 Mon Sep 17 00:00:00 2001 From: mehbark Date: Thu, 1 May 2025 16:37:21 -0400 Subject: [PATCH] echo and exact match input --- main.gd | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/main.gd b/main.gd index 5c804f3..94b2507 100644 --- a/main.gd +++ b/main.gd @@ -23,21 +23,19 @@ func _ready() -> void: break func _input(event: InputEvent) -> void: - if event.is_action_pressed("u"): + if event.is_action_pressed("u", true, true): step(Vector2i.UP) - elif event.is_action_pressed("d"): + elif event.is_action_pressed("d", true, true): step(Vector2i.DOWN) - elif event.is_action_pressed("l"): + elif event.is_action_pressed("l", true, true): step(Vector2i.LEFT) - elif event.is_action_pressed("r"): + elif event.is_action_pressed("r", true, true): step(Vector2i.RIGHT) - # because most redo keybinds are a superset of undo, we check them first - # e.g. if C-Z, then C-z is pressed - elif event.is_action_pressed("redo"): - hist.redo() - elif event.is_action_pressed("undo"): + elif event.is_action_pressed("undo", true, true): hist.undo() - elif event.is_action_pressed("restart"): + elif event.is_action_pressed("redo", true, true): + hist.redo() + elif event.is_action_pressed("restart", true, true): restart() # TODO: