mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 03:29:02 -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'
|
||||
|
||||
function loadSave()
|
||||
config = loadFromFile('config.sav')
|
||||
highscores = loadFromFile('highscores.sav')
|
||||
config = loadFromFile(
|
||||
love.filesystem.getSaveDirectory() .. '/config.sav'
|
||||
)
|
||||
highscores = loadFromFile(
|
||||
love.filesystem.getSaveDirectory() .. '/highscores.sav'
|
||||
)
|
||||
end
|
||||
|
||||
function loadFromFile(filename)
|
||||
@ -40,9 +44,13 @@ function initConfig()
|
||||
end
|
||||
|
||||
function saveConfig()
|
||||
binser.writeFile('config.sav', config)
|
||||
binser.writeFile(
|
||||
love.filesystem.getSaveDirectory() .. '/config.sav', config
|
||||
)
|
||||
end
|
||||
|
||||
function saveHighscores()
|
||||
binser.writeFile('highscores.sav', highscores)
|
||||
binser.writeFile(
|
||||
love.filesystem.getSaveDirectory() .. '/highscores.sav', highscores
|
||||
)
|
||||
end
|
||||
|
@ -1 +1 @@
|
||||
version = "v0.3-beta5.1"
|
||||
version = "v0.3-beta5.2"
|
Loading…
Reference in New Issue
Block a user