From fa972161679767a524ef879e6432ad732d90b139 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Tue, 12 Jan 2021 15:20:22 -0500 Subject: [PATCH] Minor piece bottom SFX fix --- tetris/rulesets/ruleset.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tetris/rulesets/ruleset.lua b/tetris/rulesets/ruleset.lua index a6c5b67..6509e69 100644 --- a/tetris/rulesets/ruleset.lua +++ b/tetris/rulesets/ruleset.lua @@ -112,8 +112,14 @@ function Ruleset:rotatePiece(inputs, piece, grid, prev_inputs, initial) end end + local was_drop_blocked = piece:isDropBlocked(grid) + self:attemptRotate(new_inputs, piece, grid, initial) + if not was_drop_blocked and piece:isDropBlocked(grid) then + playSE("bottom") + end + -- prev_inputs becomes the previous inputs for input, value in pairs(inputs) do prev_inputs[input] = inputs[input]