From 3ee4c9a4cb1e1beb09b9efbd9f6d7de24a2a4b96 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 13 Jan 2019 09:50:05 -0500 Subject: [PATCH] Added a function to introduce the story --- satiate.js | 4 +++- stories/demo.js | 3 +++ stories/fen-snack.js | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/satiate.js b/satiate.js index 4f2fe6c..08eb878 100644 --- a/satiate.js +++ b/satiate.js @@ -75,7 +75,7 @@ function init(story) { }, flags: { - + } }, }; @@ -90,6 +90,8 @@ function init(story) { refreshHook = story.refresh; + story.intro.intro(state); + goToRoom(story.intro.start, state); } diff --git a/stories/demo.js b/stories/demo.js index 2616e5d..c85fb0a 100644 --- a/stories/demo.js +++ b/stories/demo.js @@ -5,6 +5,9 @@ stories.push({ "start": "Home", "setup": state => { + }, + "intro": state => { + print(["don't fall down the stairs ok"]); } }, "sounds": [ diff --git a/stories/fen-snack.js b/stories/fen-snack.js index 6c1826e..a094b97 100644 --- a/stories/fen-snack.js +++ b/stories/fen-snack.js @@ -76,6 +76,9 @@ stories.push({ "alive" ] }, state); + }, + intro: state => { + print(["Hot, slimy walls ripple and squeeze, the stomach of your captor stewing you in a churning stew of chyme and acid. You've only been trapped under the crux's pelt for a few minutes...and it doesn't seem like you'll last much longer than that, either."]); } }, refresh: state => {