0
0
Fork 0
mirror of https://gitlab.com/Oreolek/salet-module.git synced 2024-06-26 03:50:49 +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",
"version": "1.4.1",
"version": "1.4.2",
"description": "A general client-side framework for cybertext interactive fiction games.",
"keywords": ["ifiction", "interactive fiction", "games", "coffee-script", "text", "menu"],
"homepage": "http://salet.oreolek.ru",

View file

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