mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 12:39:01 -06:00
Remove debugging prints in save.lua
This commit is contained in:
parent
fabdad056e
commit
f5873c97bc
@ -6,12 +6,10 @@ function loadSave()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function loadFromFile(filename)
|
function loadFromFile(filename)
|
||||||
print("Load from file")
|
|
||||||
local file_data = love.filesystem.read(filename)
|
local file_data = love.filesystem.read(filename)
|
||||||
if file_data == nil then
|
if file_data == nil then
|
||||||
return {} -- new object
|
return {} -- new object
|
||||||
end
|
end
|
||||||
print(file_data)
|
|
||||||
local save_data = binser.deserialize(file_data)
|
local save_data = binser.deserialize(file_data)
|
||||||
if save_data == nil then
|
if save_data == nil then
|
||||||
return {} -- new object
|
return {} -- new object
|
||||||
@ -46,25 +44,13 @@ function initConfig()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function saveConfig()
|
function saveConfig()
|
||||||
print("Save config")
|
love.filesystem.write(
|
||||||
local file_data = binser.serialize(config)
|
'config.sav', binser.serialize(config)
|
||||||
print(file_data)
|
|
||||||
local success, message = love.filesystem.write(
|
|
||||||
'config.sav', file_data
|
|
||||||
)
|
)
|
||||||
if not success then
|
|
||||||
print(message)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function saveHighscores()
|
function saveHighscores()
|
||||||
print("Save highscores")
|
love.filesystem.write(
|
||||||
local file_data = binser.serialize(highscores)
|
'highscores.sav', binser.serialize(highscores)
|
||||||
print(file_data)
|
|
||||||
local success, message = love.filesystem.write(
|
|
||||||
'highscores.sav', file_data
|
|
||||||
)
|
)
|
||||||
if not success then
|
|
||||||
print(message)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user