Replaced spaces with tabs.

Check CONTRIBUTING.md, guys!
This commit is contained in:
Joe Zeng
2020-11-06 20:49:44 -05:00
parent 4670cb7c15
commit 2e3eff025f
55 changed files with 1175 additions and 1175 deletions

View File

@@ -7,13 +7,13 @@ SRS.name = "Guideline SRS"
SRS.hash = "Standard"
SRS.world = true
SRS.colourscheme = {
I = "C",
L = "O",
J = "B",
S = "G",
Z = "R",
O = "Y",
T = "M",
I = "C",
L = "O",
J = "B",
S = "G",
Z = "R",
O = "Y",
T = "M",
}
SRS.softdrop_lock = false
SRS.harddrop_lock = true
@@ -132,13 +132,13 @@ SRS.wallkicks_line = {
};
function SRS:check_new_low(piece)
for _, block in pairs(piece:getBlockOffsets()) do
local y = piece.position.y + block.y
if y > piece.lowest_y then
piece.manipulations = 0
piece.lowest_y = y
end
end
for _, block in pairs(piece:getBlockOffsets()) do
local y = piece.position.y + block.y
if y > piece.lowest_y then
piece.manipulations = 0
piece.lowest_y = y
end
end
end
-- Component functions.
@@ -170,16 +170,16 @@ end
function SRS:onPieceCreate(piece, grid)
piece.manipulations = 0
piece.lowest_y = -math.huge
piece.lowest_y = -math.huge
end
function SRS:onPieceDrop(piece, grid)
self:check_new_low(piece)
if piece.manipulations >= 15 and piece:isDropBlocked(grid) then
piece.locked = true
else
piece.lock_delay = 0 -- step reset
end
self:check_new_low(piece)
if piece.manipulations >= 15 and piece:isDropBlocked(grid) then
piece.locked = true
else
piece.lock_delay = 0 -- step reset
end
end
function SRS:onPieceMove(piece, grid)
@@ -194,8 +194,8 @@ end
function SRS:onPieceRotate(piece, grid)
piece.lock_delay = 0 -- rotate reset
self:check_new_low(piece)
piece.manipulations = piece.manipulations + 1
self:check_new_low(piece)
piece.manipulations = piece.manipulations + 1
if piece:isDropBlocked(grid) then
if piece.manipulations >= 15 then
piece.locked = true