Skip to content
Snippets Groups Projects
Commit faf6462a authored by dg's avatar dg
Browse files

Force autosave on zone change on, to ensure savefile consistency

git-svn-id: http://svn.net-core.org/repos/t-engine4@3910 51575b47-30f0-44d4-a5cc-537603b46e54
parent 05dbc23e
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ function _M:generateList()
game:saveSettings("background_saves", ("background_saves = %s\n"):format(tostring(config.settings.background_saves)))
self.c_list:drawItem(item)
end,}
--[[
local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Autosaves the whole game when switching zones. This is safer but can make playing a bit slower while it saves. Savefiles will also be somewhat bigger.#WHITE#"}
list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Autosave when leaving a zone#WHITE##{normal}#", status=function(item)
return tostring(config.settings.tome.autosave and "enabled" or "disabled")
......@@ -79,7 +79,7 @@ function _M:generateList()
game:saveSettings("tome.autosave", ("tome.autosave = %s\n"):format(tostring(config.settings.tome.autosave)))
self.c_list:drawItem(item)
end,}
]]
local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Forces the game to save each level instead of each zone.\nThis makes it save more often but the game will use less memory when deep in a dungeon.\n\n#LIGHT_RED#Changing this option will not affect already visited zones.#WHITE#"}
list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Zone save per level#WHITE##{normal}#", status=function(item)
return tostring(config.settings.tome.save_zone_levels and "enabled" or "disabled")
......
......@@ -47,7 +47,9 @@ local UIBase = require "engine.ui.Base"
-- Init settings
config.settings.tome = config.settings.tome or {}
profile.mod.allow_build = profile.mod.allow_build or {}
if type(config.settings.tome.autosave) == "nil" then config.settings.tome.autosave = true end
--if type(config.settings.tome.autosave) == "nil" then
config.settings.tome.autosave = true
--end
if not config.settings.tome.smooth_move then config.settings.tome.smooth_move = 3 end
if not config.settings.tome.gfx then
local w, h = core.display.size()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment