Added the ability to _always_ reverse rotation.

This commit is contained in:
Joe Zeng 2020-11-06 20:46:36 -05:00 committed by GitHub
commit 4670cb7c15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 61 additions and 12 deletions

View File

@ -8,7 +8,7 @@ ConfigScene.options = {
-- this serves as reference to what the options' values mean i guess?
{"manlock", "Manual locking",{"Per ruleset","Per gamemode","Harddrop", "Softdrop"}},
{"piece_colour", "Piece Colours", {"Per ruleset","Arika" ,"TTC"}},
{"world_reverse", "World Reverse", {"No", "Yes"}},
{"world_reverse","World Reverse", {"No" ,"SRS only" ,"Always"}},
}
local optioncount = #ConfigScene.options

View File

@ -110,7 +110,14 @@ function ARS:onPieceDrop(piece, grid)
piece.lock_delay = 0 -- step reset
end
function ARS:get180RotationValue() return 3 end
function ARS:get180RotationValue()
if config.gamesettings.world_reverse == 3 then
return 3
else
return 1
end
end
function ARS:getDefaultOrientation() return 3 end -- downward facing pieces by default
return ARS

View File

@ -185,7 +185,14 @@ function ARS:onPieceRotate(piece, grid)
end
end
function ARS:get180RotationValue() return 3 end
function ARS:get180RotationValue()
if config.gamesettings.world_reverse == 3 then
return 3
else
return 1
end
end
function ARS:getDefaultOrientation() return 3 end -- downward facing pieces by default
return ARS

View File

@ -172,7 +172,14 @@ function ARS:onPieceRotate(piece, grid)
end
end
function ARS:get180RotationValue() return 3 end
function ARS:get180RotationValue()
if config.gamesettings.world_reverse == 3 then
return 3
else
return 1
end
end
function ARS:getDefaultOrientation() return 3 end -- downward facing pieces by default
return ARS

View File

@ -184,5 +184,12 @@ function SRS:onPieceRotate(piece, grid)
end
end
function SRS:get180RotationValue() return 3 end
function SRS:get180RotationValue()
if config.gamesettings.world_reverse == 1 then
return 1
else
return 3
end
end
return SRS

View File

@ -151,7 +151,14 @@ function ARS:onPieceDrop(piece, grid)
piece.lock_delay = 0 -- step reset
end
function ARS:get180RotationValue() return 3 end
function ARS:get180RotationValue()
if config.gamesettings.world_reverse == 3 then
return 3
else
return 1
end
end
function ARS:getDefaultOrientation() return 3 end -- downward facing pieces by default
return ARS

View File

@ -100,7 +100,7 @@ function CRAP:attemptRotate(new_inputs, piece, grid, initial)
end
if rot_dir == 0 then return end
if self.world and config.gamesettings.world_reverse == 2 then
if config.gamesettings.world_reverse == 3 or (self.world and config.gamesettings.world_reverse == 2) then
rot_dir = 4 - rot_dir
end

View File

@ -76,7 +76,7 @@ function Ruleset:attemptRotate(new_inputs, piece, grid, initial)
end
if rot_dir == 0 then return end
if self.world and config.gamesettings.world_reverse == 2 then
if config.gamesettings.world_reverse == 3 or (self.world and config.gamesettings.world_reverse == 2) then
rot_dir = 4 - rot_dir
end

View File

@ -185,5 +185,12 @@ function SRS:onPieceRotate(piece, grid)
end
end
function SRS:get180RotationValue() return 3 end
function SRS:get180RotationValue()
if config.gamesettings.world_reverse == 1 then
return 1
else
return 3
end
end
return SRS

View File

@ -127,7 +127,14 @@ function Tengen:onPieceDrop(piece, grid)
piece.lock_delay = 0 -- step reset
end
function Tengen:get180RotationValue() return config["reverse_rotate"] and 1 or 3 end
function Tengen:get180RotationValue()
if config.gamesettings.world_reverse == 3 then
return 1
else
return 3
end
end
function Tengen:getDefaultOrientation() return 3 end -- downward facing pieces by default
return Tengen