Browse Source

try lua saves

master
Nicholas Hayashi 3 years ago
parent
commit
965477f455
  1. 2
      main.lua
  2. 4
      src/game.lua

2
main.lua

@ -177,7 +177,7 @@ function main_scene(do_backdrop, do_logo)
{
texture = TEXTURES.LOAD_GAME_HEX,
action = function()
local save = am.load_state("save", "json")
local save = am.load_state("save", "lua")
if save then
game_init(save)

4
src/game.lua

@ -22,7 +22,7 @@ local game_scene_menu_options = {
{
texture = TEXTURES.LOAD_GAME_HEX,
action = function()
local save = am.load_state("save", "json")
local save = am.load_state("save", "lua")
if save then
game_init(save)
@ -741,7 +741,7 @@ function game_end()
end
function game_save()
am.save_state("save", game_serialize(), "json")
am.save_state("save", game_serialize(), "lua")
gui_alert("succesfully saved!")
end

Loading…
Cancel
Save