From 836907ab62c337f254aef16d5ff7a2535c28d25e Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Wed, 11 Sep 2019 12:48:54 +0700 Subject: [PATCH] restore inventory room --- game/story.coffee | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/game/story.coffee b/game/story.coffee index 8f4f3b2..910b10c 100644 --- a/game/story.coffee +++ b/game/story.coffee @@ -52,6 +52,29 @@ room "start", """, choices: "#start" +# This is a special inventory room. +# The inventory button is a regular link to this room. +# You may alter these as much as you like or scrap it along with the button. +room "inventory", + canSave: false # saving the game here is forbidden. Aautosaving too. + enter: () -> + $("#inventory").hide() + exit: () -> + $("#inventory").show() + dsc: () -> + if salet.character.inventory.length == 0 + text = "You are carrying nothing." + else + text = "You are carrying:\n\n" + for thing in salet.character.inventory + text += "* #{salet.character.listinv(thing.name)}\n" + return text+"\n\n"+""" +
+ """ + actions: + exit: () -> + return salet.goBack() + room "world", tags: ["start"], optionText: "Enter the world",