0
0
Fork 0
mirror of https://gitlab.com/Oreolek/salet-module.git synced 2024-06-28 21:05:03 +03:00

Autoload option

This commit is contained in:
Alexander Yakovlev 2016-09-12 09:25:07 +07:00
parent e18f2bbed2
commit 2e6e009c8c
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "salet", "name": "salet",
"version": "1.4.1", "version": "1.4.2",
"description": "A general client-side framework for cybertext interactive fiction games.", "description": "A general client-side framework for cybertext interactive fiction games.",
"keywords": ["ifiction", "interactive fiction", "games", "coffee-script", "text", "menu"], "keywords": ["ifiction", "interactive fiction", "games", "coffee-script", "text", "menu"],
"homepage": "http://salet.oreolek.ru", "homepage": "http://salet.oreolek.ru",

View file

@ -25,7 +25,9 @@ class Salet
# REDEFINE THIS IN YOUR GAME # REDEFINE THIS IN YOUR GAME
@game_id = null @game_id = null
@game_version = "1.0" @game_version = "1.0"
@autosave = true @autosave = true
@autoload = true
@rnd = null @rnd = null
@time = 0 @time = 0
@ -405,7 +407,7 @@ class Salet
if (@view.hasLocalStorage()) if (@view.hasLocalStorage())
saveFile = localStorage.getItem(@getSaveId()) saveFile = localStorage.getItem(@getSaveId())
if (saveFile) if (saveFile and @autoload)
try try
@loadGame(JSON.parse(saveFile)) @loadGame(JSON.parse(saveFile))
@view.disableSaving() @view.disableSaving()