From 6e0b5e27c1ffc8ccb47310287b65dbc54613a790 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Tue, 23 Nov 2021 22:56:11 -0500 Subject: [PATCH] Rearranged the spawn SE actions --- tetris/modes/gamemode.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index 2c805e3..b97eeec 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -530,6 +530,8 @@ function GameMode:onEnterOrHold(inputs, ruleset) if not self.grid:canPlacePiece(self.piece) then self.game_over = true return + elseif self.piece:isDropBlocked(self.grid) then + playSE("bottom") end ruleset:dropPiece( inputs, self.piece, self.grid, self:getGravity(), @@ -578,10 +580,6 @@ function GameMode:initializeNextPiece( self.piece_soft_locked = false self.buffer_hard_drop = false self.buffer_soft_drop = false - if self.piece:isDropBlocked(self.grid) and - self.grid:canPlacePiece(self.piece) then - playSE("bottom") - end if generate_next_piece == nil then table.remove(self.next_queue, 1) table.insert(self.next_queue, self:getNextPiece(ruleset))