From d868e8b80384ac1729ad2fe99f4a1d22cf9f2d1b Mon Sep 17 00:00:00 2001 From: Tetro48 <76738929+Tetro48@users.noreply.github.com> Date: Wed, 9 Mar 2022 10:05:06 +0700 Subject: [PATCH] Replay tunings fix --- scene/replay.lua | 3 +++ tetris/modes/gamemode.lua | 3 +++ 2 files changed, 6 insertions(+) diff --git a/scene/replay.lua b/scene/replay.lua index f1ca2c0..bc8a71a 100644 --- a/scene/replay.lua +++ b/scene/replay.lua @@ -6,6 +6,9 @@ ReplayScene.title = "Replay" function ReplayScene:new(replay, game_mode, ruleset) config.gamesettings = replay["gamesettings"] + if replay["delayed_auto_shift"] then config.das = replay["delayed_auto_shift"] end + if replay["auto_repeat_rate"] then config.arr = replay["auto_repeat_rate"] end + if replay["das_cut_delay"] then config.dcd = replay["das_cut_delay"] end love.math.setRandomSeed(replay["random_low"], replay["random_high"]) love.math.setRandomState(replay["random_state"]) self.retry_replay = replay diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index 2734806..f0b7d5d 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -135,6 +135,9 @@ function GameMode:saveReplay() replay["lines"] = self.lines replay["gamesettings"] = config.gamesettings replay["secret_inputs"] = self.secret_inputs + replay["delayed_auto_shift"] = config.das + replay["auto_repeat_rate"] = config.arr + replay["das_cut_delay"] = config.dcd replay["timestamp"] = os.time() if love.filesystem.getInfo("replays") == nil then love.filesystem.createDirectory("replays")