mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-12-22 21:59:02 -06:00
Added an option to disable diagonal input
This commit is contained in:
parent
40a2e78280
commit
f7c4908062
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user