From 33b69abbb846bf6f9c48d2d7474883de40832426 Mon Sep 17 00:00:00 2001 From: Rin Date: Sat, 21 Aug 2021 20:56:32 +0100 Subject: [PATCH] Stop cambridge from usurping the secret inputs table. Fixes a problem in modpack. --- scene/game.lua | 2 +- tetris/modes/gamemode.lua | 2 +- tetris/modes/marathon_a1.lua | 4 ++-- tetris/modes/marathon_a2.lua | 4 ++-- tetris/modes/survival_a2.lua | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scene/game.lua b/scene/game.lua index 67ca919..5bc08f0 100644 --- a/scene/game.lua +++ b/scene/game.lua @@ -8,7 +8,7 @@ function GameScene:new(game_mode, ruleset, inputs) self.retry_mode = game_mode self.retry_ruleset = ruleset self.secret_inputs = inputs - self.game = game_mode(config.gamemodesettings[game_mode.hash], self.secret_inputs) + self.game = game_mode(self.secret_inputs, config.gamemodesettings[game_mode.hash]) self.ruleset = ruleset(self.game) self.game:initialize(self.ruleset) self.inputs = { diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index d2c30d5..32caef7 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -15,7 +15,7 @@ GameMode.hash = "" GameMode.tagline = "" GameMode.rollOpacityFunction = function(age) return 0 end -function GameMode:new(config, secret_inputs) +function GameMode:new(secret_inputs, config) self.grid = Grid(10, 24) self.randomizer = Randomizer() self.piece = nil diff --git a/tetris/modes/marathon_a1.lua b/tetris/modes/marathon_a1.lua index f7b4504..a116fcf 100644 --- a/tetris/modes/marathon_a1.lua +++ b/tetris/modes/marathon_a1.lua @@ -14,8 +14,8 @@ MarathonA1Game.tagline = "Can you score enough points to reach the title of Gran -function MarathonA1Game:new(cfg) - MarathonA1Game.super:new(cfg) +function MarathonA1Game:new(_, cfg) + MarathonA1Game.super:new(_, cfg) self.roll_frames = 0 self.combo = 1 diff --git a/tetris/modes/marathon_a2.lua b/tetris/modes/marathon_a2.lua index a460890..1eb22f2 100644 --- a/tetris/modes/marathon_a2.lua +++ b/tetris/modes/marathon_a2.lua @@ -14,8 +14,8 @@ MarathonA2Game.tagline = "The points don't matter! Can you reach the invisible r -function MarathonA2Game:new(cfg) - MarathonA2Game.super:new(cfg) +function MarathonA2Game:new(_, cfg) + MarathonA2Game.super:new(_, cfg) self.roll_frames = 0 self.combo = 1 diff --git a/tetris/modes/survival_a2.lua b/tetris/modes/survival_a2.lua index f170aee..46ae65f 100644 --- a/tetris/modes/survival_a2.lua +++ b/tetris/modes/survival_a2.lua @@ -14,8 +14,8 @@ SurvivalA2Game.tagline = "The game starts fast and only gets faster!" -function SurvivalA2Game:new(cfg) - SurvivalA2Game.super:new(cfg) +function SurvivalA2Game:new(_, cfg) + SurvivalA2Game.super:new(_, cfg) self.roll_frames = 0 self.combo = 1 self.randomizer = History6RollsRandomizer()