From dbc862a2a7b76312f53aa7d7101b6716bc741d1c Mon Sep 17 00:00:00 2001 From: Lynn Date: Sat, 24 Nov 2018 17:55:08 +0100 Subject: [PATCH] Properly pass debug and cheats --- map_gen/Diggy/Scenario.lua | 6 +++--- map_gen/combined/diggy.lua | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/map_gen/Diggy/Scenario.lua b/map_gen/Diggy/Scenario.lua index 315e4bf9..c3f16329 100644 --- a/map_gen/Diggy/Scenario.lua +++ b/map_gen/Diggy/Scenario.lua @@ -39,7 +39,7 @@ end --[[-- Register the events required to initialize the scenario. ]] -function Scenario.register(debug) +function Scenario.register(debug, cheats) if global.diggy_scenario_registered then error('Cannot register the Diggy scenario multiple times.') return @@ -50,11 +50,11 @@ function Scenario.register(debug) global.scenario.config.fish_market.enable = nil end - if (_DEBUG) then + if debug then Debug.enable_debug() end - if (_CHEATS) then + if cheats then Debug.enable_cheats() end diff --git a/map_gen/combined/diggy.lua b/map_gen/combined/diggy.lua index 7304a920..bab23ec3 100644 --- a/map_gen/combined/diggy.lua +++ b/map_gen/combined/diggy.lua @@ -1,2 +1,2 @@ -- authors Linaori, valansch -require 'map_gen.Diggy.Scenario'.register(_DEBUG) +require 'map_gen.Diggy.Scenario'.register(_DEBUG, _CHEATS)