mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 13:59:03 -06:00
Fixed crash on loading the game with no save
This commit is contained in:
parent
55be30c99f
commit
a125c09106
13
main.lua
13
main.lua
@ -15,16 +15,17 @@ function love.load()
|
|||||||
|
|
||||||
love.window.setMode(love.graphics.getWidth(), love.graphics.getHeight(), {resizable = true});
|
love.window.setMode(love.graphics.getWidth(), love.graphics.getHeight(), {resizable = true});
|
||||||
|
|
||||||
|
if not config.gamesettings then config.gamesettings = {} end
|
||||||
|
for _, option in ipairs(GameConfigScene.options) do
|
||||||
|
if not config.gamesettings[option[1]] then
|
||||||
|
config.gamesettings[option[1]] = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if not config.input then
|
if not config.input then
|
||||||
config.input = {}
|
config.input = {}
|
||||||
scene = InputConfigScene()
|
scene = InputConfigScene()
|
||||||
else
|
else
|
||||||
if not config.gamesettings then config.gamesettings = {} end
|
|
||||||
for _, option in ipairs(GameConfigScene.options) do
|
|
||||||
if not config.gamesettings[option[1]] then
|
|
||||||
config.gamesettings[option[1]] = 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if config.current_mode then current_mode = config.current_mode end
|
if config.current_mode then current_mode = config.current_mode end
|
||||||
if config.current_ruleset then current_ruleset = config.current_ruleset end
|
if config.current_ruleset then current_ruleset = config.current_ruleset end
|
||||||
scene = TitleScene()
|
scene = TitleScene()
|
||||||
|
Loading…
Reference in New Issue
Block a user