From 3a1478fb47f990ea654fd9df56fc3f24c2012bff Mon Sep 17 00:00:00 2001 From: entar Date: Thu, 5 Jun 2025 10:48:21 +0700 Subject: [PATCH] Fixed christmas BF and key rebinding --- characters/bf-christmas.json | 8 ++++---- main.lua | 18 +++++++----------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/characters/bf-christmas.json b/characters/bf-christmas.json index f1b5eaa..b993f9f 100644 --- a/characters/bf-christmas.json +++ b/characters/bf-christmas.json @@ -20,7 +20,7 @@ "fps": 24, "anim": "singLEFT", "indices": [], - "name": "BF NOTE LEFT0" + "name": "BF NOTE LEFT" }, { "loop": false, @@ -31,7 +31,7 @@ "fps": 24, "anim": "singDOWN", "indices": [], - "name": "BF NOTE DOWN0" + "name": "BF NOTE DOWN" }, { "loop": false, @@ -42,7 +42,7 @@ "fps": 24, "anim": "singUP", "indices": [], - "name": "BF NOTE UP0" + "name": "BF NOTE UP" }, { "loop": false, @@ -53,7 +53,7 @@ "fps": 24, "anim": "singRIGHT", "indices": [], - "name": "BF NOTE RIGHT0" + "name": "BF NOTE RIGHT" }, { "loop": false, diff --git a/main.lua b/main.lua index 0c9330a..f688449 100644 --- a/main.lua +++ b/main.lua @@ -94,17 +94,13 @@ function love.keypressed(key, un, is) curDiff = curDiffList[1] curDiffInd = 1 end - elseif key == "1" then - gettingKey = 1 - elseif key == "2" then - gettingKey = 2 - elseif key == "3" then - gettingKey = 3 - elseif key == "4" then - gettingKey = 3 - elseif key == "0" then - settings.Downscroll = not settings.Downscroll - files.write_file("settings.json", json.stringify(settings)) + elseif tonumber(key) and tonumber(key) < 5 then + if key == "0" then + settings.Downscroll = not settings.Downscroll + files.write_file("settings.json", json.stringify(settings)) + else + gettingKey = tonumber(key) + end end else keybinds[gettingKey] = key