diff --git a/main.lua b/main.lua index e8a4dcd..1d61568 100644 --- a/main.lua +++ b/main.lua @@ -10,8 +10,10 @@ function love.load() require "load.bigint" loadSave() require "scene" + --config["side_next"] = false --config["reverse_rotate"] = true + --config["das_last_key"] = false config["fullscreen"] = false love.window.setMode(love.graphics.getWidth(), love.graphics.getHeight(), {resizable = true}); @@ -29,12 +31,7 @@ function love.load() if config.secret == nil then config.secret = false elseif config.secret == true then playSE("welcome") end - if not config.gamesettings then - config.gamesettings = {} - config["das_last_key"] = false - else - config["das_last_key"] = config.gamesettings.das_last_key == 2 - end + if not config.gamesettings then config.gamesettings = {} end for _, option in ipairs(GameConfigScene.options) do if not config.gamesettings[option[1]] then config.gamesettings[option[1]] = 1 diff --git a/scene/game_config.lua b/scene/game_config.lua index a3905e0..249759b 100644 --- a/scene/game_config.lua +++ b/scene/game_config.lua @@ -13,7 +13,7 @@ ConfigScene.options = { {"world_reverse", "A Button Rotation", false, {"Left", "Auto", "Right"}}, {"spawn_positions", "Spawn Positions", false, {"Per ruleset", "In field", "Out of field"}}, {"display_gamemode", "Display Gamemode", false, {"On", "Off"}}, - {"das_last_key", "DAS Switch", false, {"Default", "Instant"}}, + {"das_last_key", "DAS Last Key", false, {"Off", "On"}}, {"smooth_movement", "Smooth Piece Drop", false, {"On", "Off"}}, {"synchroes_allowed", "Synchroes", false, {"Per ruleset", "On", "Off"}}, {"diagonal_input", "Diagonal Input", false, {"On", "Off"}}, @@ -38,7 +38,6 @@ function ConfigScene:new() end function ConfigScene:update() - config["das_last_key"] = config.gamesettings.das_last_key == 2 self.sfxSlider:update() self.bgmSlider:update() end diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index 53bc6d3..874c4cd 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -378,7 +378,7 @@ function GameMode:stopDAS() end function GameMode:chargeDAS(inputs) - if config["das_last_key"] then + if config.gamesettings.das_last_key == 2 then if inputs["right"] == true and self.das.direction ~= "right" and not self.prev_inputs["right"] then self:startRightDAS() elseif inputs["left"] == true and self.das.direction ~= "left" and not self.prev_inputs["left"] then