mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 14:09:03 -06:00
Fixed a bug where the game would sometimes not save on macOS
Version bump to beta5.2
This commit is contained in:
parent
86e975f929
commit
c56f290921
@ -1,8 +1,12 @@
|
|||||||
local binser = require 'libs.binser'
|
local binser = require 'libs.binser'
|
||||||
|
|
||||||
function loadSave()
|
function loadSave()
|
||||||
config = loadFromFile('config.sav')
|
config = loadFromFile(
|
||||||
highscores = loadFromFile('highscores.sav')
|
love.filesystem.getSaveDirectory() .. '/config.sav'
|
||||||
|
)
|
||||||
|
highscores = loadFromFile(
|
||||||
|
love.filesystem.getSaveDirectory() .. '/highscores.sav'
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
function loadFromFile(filename)
|
function loadFromFile(filename)
|
||||||
@ -40,9 +44,13 @@ function initConfig()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function saveConfig()
|
function saveConfig()
|
||||||
binser.writeFile('config.sav', config)
|
binser.writeFile(
|
||||||
|
love.filesystem.getSaveDirectory() .. '/config.sav', config
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
function saveHighscores()
|
function saveHighscores()
|
||||||
binser.writeFile('highscores.sav', highscores)
|
binser.writeFile(
|
||||||
|
love.filesystem.getSaveDirectory() .. '/highscores.sav', highscores
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
@ -1 +1 @@
|
|||||||
version = "v0.3-beta5.1"
|
version = "v0.3-beta5.2"
|
Loading…
Reference in New Issue
Block a user