mirror of
https://gitlab.com/Oreolek/salet.git
synced 2024-07-04 07:45:03 +03:00
Autosave and cycling fix
This commit is contained in:
parent
99b678cfa7
commit
10b1eeed0d
|
@ -24,7 +24,7 @@ room "plaza", salet,
|
||||||
before: (system, from) ->
|
before: (system, from) ->
|
||||||
if from == 'world'
|
if from == 'world'
|
||||||
"""
|
"""
|
||||||
You climb up the well and come out to a central plaza of a #{cyclelink("quaint")} little town.
|
You climb up the well and come out to a central plaza of a #{system.view.cycleLink("quaint")} little town.
|
||||||
A plaque nearby says it's the town of *Innsmouth,* wherever that is.
|
A plaque nearby says it's the town of *Innsmouth,* wherever that is.
|
||||||
"""
|
"""
|
||||||
else
|
else
|
||||||
|
|
|
@ -372,7 +372,10 @@ class Salet
|
||||||
|
|
||||||
@rnd = new Random(@progress.seed)
|
@rnd = new Random(@progress.seed)
|
||||||
|
|
||||||
@view.clearContent()
|
# Don't load the save if it's an autosave at the first room (start).
|
||||||
|
# We don't need to clear the screen.
|
||||||
|
if saveFile.progress? and saveFile.progress.sequence.length > 1
|
||||||
|
@view.clearContent()
|
||||||
|
|
||||||
# Now play through the actions so far:
|
# Now play through the actions so far:
|
||||||
if (@init)
|
if (@init)
|
||||||
|
@ -405,7 +408,7 @@ class Salet
|
||||||
@view.enableErasing()
|
@view.enableErasing()
|
||||||
catch err
|
catch err
|
||||||
console.log "There was an error loading your save. The save is deleted."
|
console.log "There was an error loading your save. The save is deleted."
|
||||||
console.log err
|
console.error err
|
||||||
@eraseSave(true)
|
@eraseSave(true)
|
||||||
else
|
else
|
||||||
@progress.seed = new Date().toString()
|
@progress.seed = new Date().toString()
|
||||||
|
|
Loading…
Reference in a new issue