Added an option to disable diagonal input

This commit is contained in:
Ishaan Bhardwaj 2020-12-14 22:43:50 -05:00
parent 40a2e78280
commit f7c4908062
2 changed files with 12 additions and 1 deletions

View File

@ -11,7 +11,8 @@ ConfigScene.options = {
{"world_reverse","A Button Rotation", {"Left" ,"Auto" ,"Right"}},
{"next_se", "Next Piece SFX", {"On", "Off"}},
{"das_last_key", "DAS Switch", {"Default", "Instant"}},
{"synchroes_allowed", "Synchroes", {"Per ruleset", "On", "Off"}}
{"synchroes_allowed", "Synchroes", {"Per ruleset", "On", "Off"}},
{"diagonal_input", "Diagonal Input", {"On", "Off"}}
}
local optioncount = #ConfigScene.options

View File

@ -100,6 +100,16 @@ function GameMode:update(inputs, ruleset)
end
if self.completed then return end
if config.gamesettings.diagonal_input == 2 then
if inputs["left"] or inputs["right"] then
inputs["up"] = false
inputs["down"] = false
elseif inputs["up"] or inputs["down"] then
inputs["left"] = false
inputs["right"] = false
end
end
-- advance one frame
if self:advanceOneFrame(inputs, ruleset) == false then return end