mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 14: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 = {
|
ConfigScene.options = {
|
||||||
-- this serves as reference to what the options' values mean i guess?
|
-- this serves as reference to what the options' values mean i guess?
|
||||||
{"manlock", "Manual locking", {"Per ruleset","Per gamemode","Harddrop", "Softdrop"}},
|
{"manlock", "Manual locking",{"Per ruleset","Per gamemode","Harddrop", "Softdrop"}},
|
||||||
{"piece_colour", "Piece Colours", {"Per ruleset", "Arika", "TTC"}},
|
{"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
|
local optioncount = #ConfigScene.options
|
||||||
|
|
||||||
|
@ -110,7 +110,14 @@ function ARS:onPieceDrop(piece, grid)
|
|||||||
piece.lock_delay = 0 -- step reset
|
piece.lock_delay = 0 -- step reset
|
||||||
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
|
function ARS:getDefaultOrientation() return 3 end -- downward facing pieces by default
|
||||||
|
|
||||||
return ARS
|
return ARS
|
||||||
|
@ -185,7 +185,14 @@ function ARS:onPieceRotate(piece, grid)
|
|||||||
end
|
end
|
||||||
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
|
function ARS:getDefaultOrientation() return 3 end -- downward facing pieces by default
|
||||||
|
|
||||||
return ARS
|
return ARS
|
||||||
|
@ -172,7 +172,14 @@ function ARS:onPieceRotate(piece, grid)
|
|||||||
end
|
end
|
||||||
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
|
function ARS:getDefaultOrientation() return 3 end -- downward facing pieces by default
|
||||||
|
|
||||||
return ARS
|
return ARS
|
||||||
|
@ -184,5 +184,12 @@ function SRS:onPieceRotate(piece, grid)
|
|||||||
end
|
end
|
||||||
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
|
return SRS
|
||||||
|
@ -151,7 +151,14 @@ function ARS:onPieceDrop(piece, grid)
|
|||||||
piece.lock_delay = 0 -- step reset
|
piece.lock_delay = 0 -- step reset
|
||||||
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
|
function ARS:getDefaultOrientation() return 3 end -- downward facing pieces by default
|
||||||
|
|
||||||
return ARS
|
return ARS
|
||||||
|
@ -100,7 +100,7 @@ function CRAP:attemptRotate(new_inputs, piece, grid, initial)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if rot_dir == 0 then return 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
|
rot_dir = 4 - rot_dir
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ function Ruleset:attemptRotate(new_inputs, piece, grid, initial)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if rot_dir == 0 then return 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
|
rot_dir = 4 - rot_dir
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -185,5 +185,12 @@ function SRS:onPieceRotate(piece, grid)
|
|||||||
end
|
end
|
||||||
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
|
return SRS
|
||||||
|
@ -127,7 +127,14 @@ function Tengen:onPieceDrop(piece, grid)
|
|||||||
piece.lock_delay = 0 -- step reset
|
piece.lock_delay = 0 -- step reset
|
||||||
end
|
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
|
function Tengen:getDefaultOrientation() return 3 end -- downward facing pieces by default
|
||||||
|
|
||||||
return Tengen
|
return Tengen
|
||||||
|
Loading…
Reference in New Issue
Block a user