mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-12-22 12:59:03 -06:00
Added the ability to _always_ reverse rotation.
This commit is contained in:
commit
4670cb7c15
@ -6,9 +6,9 @@ require 'load.save'
|
||||
|
||||
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"}},
|
||||
{"manlock", "Manual locking",{"Per ruleset","Per gamemode","Harddrop", "Softdrop"}},
|
||||
{"piece_colour", "Piece Colours", {"Per ruleset","Arika" ,"TTC"}},
|
||||
{"world_reverse","World Reverse", {"No" ,"SRS only" ,"Always"}},
|
||||
}
|
||||
local optioncount = #ConfigScene.options
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user