From 10b1eeed0d96af2a48a151a9601ef97d62a0be68 Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Mon, 1 Feb 2016 22:16:36 +0700 Subject: [PATCH] Autosave and cycling fix --- game/story.coffee | 2 +- lib/salet.coffee | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/game/story.coffee b/game/story.coffee index dbacade..4e74486 100644 --- a/game/story.coffee +++ b/game/story.coffee @@ -24,7 +24,7 @@ room "plaza", salet, before: (system, from) -> 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. """ else diff --git a/lib/salet.coffee b/lib/salet.coffee index 2c96a7a..64e4cb2 100644 --- a/lib/salet.coffee +++ b/lib/salet.coffee @@ -372,7 +372,10 @@ class Salet @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: if (@init) @@ -405,7 +408,7 @@ class Salet @view.enableErasing() catch err console.log "There was an error loading your save. The save is deleted." - console.log err + console.error err @eraseSave(true) else @progress.seed = new Date().toString()