mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Replace `binser with bitser`
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
local binser = require 'libs.binser'
|
||||
local bitser = require 'libs.bitser'
|
||||
local fs = love.filesystem
|
||||
|
||||
function loadSave()
|
||||
@@ -6,11 +6,10 @@ function loadSave()
|
||||
end
|
||||
|
||||
function loadFromFile(filename)
|
||||
local save_data = fs.read(filename)
|
||||
if save_data == nil then
|
||||
if fs.read(filename) == nil then
|
||||
return {} -- new object
|
||||
end
|
||||
return binser.deserialize(save_data)[1]
|
||||
return bitser.loadLoveFile(filename)
|
||||
end
|
||||
|
||||
function initConfig()
|
||||
@@ -25,5 +24,5 @@ function initConfig()
|
||||
end
|
||||
|
||||
function saveConfig()
|
||||
fs.write(CONFIG_FILE,binser.serialize(config))
|
||||
bitser.dumpLoveFile(CONFIG_FILE, config)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user