From 4f7b63340ffde04b270b2332f1afa51a2448e6ff Mon Sep 17 00:00:00 2001 From: Michael Andrew Date: Tue, 23 Aug 2016 15:48:20 +1200 Subject: [PATCH 01/15] Added some pseudo code defining options for adding items --- src/scripts/index.js | 2 ++ src/skill/handlers/respond.js | 48 +++++++++++++++++++++++++++++++++++ src/tags/panel-edit-scene.tag | 6 +++++ src/tags/panel-home.tag | 2 ++ 4 files changed, 58 insertions(+) diff --git a/src/scripts/index.js b/src/scripts/index.js index 01bc07a..2f8e28a 100644 --- a/src/scripts/index.js +++ b/src/scripts/index.js @@ -16,6 +16,8 @@ import toggleNoticeMixin from "../tags/mixins/toggleNotice" import config from "../skill/models/config.json!" import scenes from "../skill/models/scenes.json!" +//TODO: add ability to import items from "../skill/models/items.json!" + riot.mixin('toggleNotice', toggleNoticeMixin ) riot.mount('map', { config, scenes }) diff --git a/src/skill/handlers/respond.js b/src/skill/handlers/respond.js index 9b49cdb..ec08db3 100644 --- a/src/skill/handlers/respond.js +++ b/src/skill/handlers/respond.js @@ -77,6 +77,54 @@ function buildPrompt ( scene, isForSpeech ) { if ( scene.voice.prompt ) return scene.voice.prompt.trim() + //TODO: add support for returning utterances of the option items in the scene along with the list of other scenes the + //player can travel to. + //need to add a new property to the options objects to define if it is a scene or item. Items should reference itemId + //item options should also have the isHidden property to define if they are invisible in the scene description + + /* + + "options": [ + { + "utterances": [ + "open door 1" + ], + "sceneId": 2 + }, + { + "utterances": [ + "open door 2" + ], + "sceneId": 3 + }, + { + "utterances": [ + "open door 3" + ], + "sceneId": 4 + }, + { + "utterances": [ + "open door 4" + ], + "sceneId": 5 + }, + { + "utterances": [ + "pick up red key" + ], + "itemId": 1 + }, + { + "utterances": [ + "pick up blue key" + ], + "itemId": 2 + }] + + + */ + var options = scene.options.filter( function ( option ) { return ! utils.findResponseBySceneId( option.sceneId ).isHidden }).map( function ( option ) { diff --git a/src/tags/panel-edit-scene.tag b/src/tags/panel-edit-scene.tag index db3ec8f..6586559 100644 --- a/src/tags/panel-edit-scene.tag +++ b/src/tags/panel-edit-scene.tag @@ -9,6 +9,8 @@ + +
--> + +
From efae26c991c5983f75360ecd1801b532cd019ea2 Mon Sep 17 00:00:00 2001 From: Michael Andrew Date: Tue, 23 Aug 2016 15:51:25 +1200 Subject: [PATCH 02/15] Initial UI for selecting an item to add Prompts the user if they want to add a scene or item, then asks them what item they want to connect to. --- src/tags/js/scene.js | 86 +++++++++++++++++++++++++++----------------- src/tags/scene.tag | 85 ++++++++++++++++++++++++++++--------------- 2 files changed, 109 insertions(+), 62 deletions(-) diff --git a/src/tags/js/scene.js b/src/tags/js/scene.js index ee68b55..9c423bc 100644 --- a/src/tags/js/scene.js +++ b/src/tags/js/scene.js @@ -78,45 +78,65 @@ this.onClickEditScene = function (e) { }; this.onClickAddOption = function (e) { + e.stopPropagation(); + + var selection = prompt("What type do you want to add? Options are: scene / item", "scene"); + var parentSceneId = opts.scene ? opts.scene.id : 0; - var sceneId = 0;while (opts.scenes.find(function (scene) { - return scene.id === sceneId; - })) { - sceneId++; - } var parentScene = opts.scenes.find(function (scene) { return scene.id === Number(parentSceneId); }); - var option = { - sceneId: sceneId, - utterances: ['open door'] - }; - - var scene = { - id: sceneId, - color: 'default', - isHidden: false, - generateOptions: true, - readPreviousOptions: false, - card: { - title: 'Room', - text: 'You enter a room.', - image: { - smallImageUrl: null, - largeImageUrl: null - } - }, - voice: { - intro: 'You enter a room. What would you like to do?', - prompt: '' - }, - options: [] - }; - - parentScene.options.push(option); - opts.scenes.push(scene); + console.log(selection); + + if (selection === 'item') { + + var itemId = prompt("Enter the ID of the item you want to add", "42"); + + var option = { + itemId: itemId, + utterances: ['take item'] + }; + + parentScene.options.push(option); + } else { + + var sceneId = 0;while (opts.scenes.find(function (scene) { + return scene.id === sceneId; + })) { + sceneId++; + } + + var option = { + sceneId: sceneId, + utterances: ['open door'] + }; + + var scene = { + id: sceneId, + color: 'default', + isHidden: false, + generateOptions: true, + readPreviousOptions: false, + card: { + title: 'Room', + text: 'You enter a room.', + image: { + smallImageUrl: null, + largeImageUrl: null + } + }, + voice: { + intro: 'You enter a room. What would you like to do?', + prompt: '' + }, + options: [] + }; + + parentScene.options.push(option); + opts.scenes.push(scene); + } riot.route('/scene:' + parentScene.id + '/option:' + (parentScene.options.length - 1)); }; diff --git a/src/tags/scene.tag b/src/tags/scene.tag index 9f6f845..4c2f9ef 100644 --- a/src/tags/scene.tag +++ b/src/tags/scene.tag @@ -99,41 +99,68 @@ } this.onClickAddOption = e => { + + //TODO: add support for showing UI to prompt user to select if they are adding a link to a scene or an item first + e.stopPropagation() + + var selection = prompt("What type do you want to add? Options are: scene / item", "scene"); + var parentSceneId = opts.scene ? opts.scene.id : 0 - var sceneId = 0; while ( opts.scenes.find( scene => scene.id === sceneId ) ) { sceneId++ } var parentScene = opts.scenes.find( scene => scene.id === Number( parentSceneId ) ) - var option = { - sceneId, - utterances: [ - 'open door' - ] - } + console.log(selection); - var scene = { - id: sceneId, - color: 'default', - isHidden: false, - generateOptions: true, - readPreviousOptions: false, - card: { - title: 'Room', - text: 'You enter a room.', - image: { - smallImageUrl: null, - largeImageUrl: null - } - }, - voice: { - intro: 'You enter a room. What would you like to do?', - prompt: '' - }, - options: [] - } + if(selection === 'item'){ + + var itemId = prompt("Enter the ID of the item you want to add", "42"); + + var option = { + itemId, + utterances: [ + 'take item' + ] + } - parentScene.options.push( option ) - opts.scenes.push( scene ) + parentScene.options.push( option ) + + }else{ + + + var sceneId = 0; while ( opts.scenes.find( scene => scene.id === sceneId ) ) { sceneId++ } + + + var option = { + sceneId, + utterances: [ + 'open door' + ] + } + + var scene = { + id: sceneId, + color: 'default', + isHidden: false, + generateOptions: true, + readPreviousOptions: false, + card: { + title: 'Room', + text: 'You enter a room.', + image: { + smallImageUrl: null, + largeImageUrl: null + } + }, + voice: { + intro: 'You enter a room. What would you like to do?', + prompt: '' + }, + options: [] + } + + parentScene.options.push( option ) + opts.scenes.push( scene ) + } riot.route('/scene:' + parentScene.id + '/option:' + ( parentScene.options.length -1 ) ) } From eb9a990bf43d1d95d8fc413adbeccd9924ebb6da Mon Sep 17 00:00:00 2001 From: Michael Andrew Date: Wed, 24 Aug 2016 08:51:29 +1200 Subject: [PATCH 03/15] Reverted changes to scene --- src/tags/scene.tag | 85 ++++++++++++++++------------------------------ 1 file changed, 29 insertions(+), 56 deletions(-) diff --git a/src/tags/scene.tag b/src/tags/scene.tag index 4c2f9ef..9f6f845 100644 --- a/src/tags/scene.tag +++ b/src/tags/scene.tag @@ -99,69 +99,42 @@ } this.onClickAddOption = e => { - - //TODO: add support for showing UI to prompt user to select if they are adding a link to a scene or an item first - e.stopPropagation() - - var selection = prompt("What type do you want to add? Options are: scene / item", "scene"); - var parentSceneId = opts.scene ? opts.scene.id : 0 + var sceneId = 0; while ( opts.scenes.find( scene => scene.id === sceneId ) ) { sceneId++ } var parentScene = opts.scenes.find( scene => scene.id === Number( parentSceneId ) ) - console.log(selection); - - if(selection === 'item'){ - - var itemId = prompt("Enter the ID of the item you want to add", "42"); - - var option = { - itemId, - utterances: [ - 'take item' - ] - } - - parentScene.options.push( option ) - - }else{ - - - var sceneId = 0; while ( opts.scenes.find( scene => scene.id === sceneId ) ) { sceneId++ } - - - var option = { - sceneId, - utterances: [ - 'open door' - ] - } - - var scene = { - id: sceneId, - color: 'default', - isHidden: false, - generateOptions: true, - readPreviousOptions: false, - card: { - title: 'Room', - text: 'You enter a room.', - image: { - smallImageUrl: null, - largeImageUrl: null - } - }, - voice: { - intro: 'You enter a room. What would you like to do?', - prompt: '' - }, - options: [] - } + var option = { + sceneId, + utterances: [ + 'open door' + ] + } - parentScene.options.push( option ) - opts.scenes.push( scene ) + var scene = { + id: sceneId, + color: 'default', + isHidden: false, + generateOptions: true, + readPreviousOptions: false, + card: { + title: 'Room', + text: 'You enter a room.', + image: { + smallImageUrl: null, + largeImageUrl: null + } + }, + voice: { + intro: 'You enter a room. What would you like to do?', + prompt: '' + }, + options: [] } + parentScene.options.push( option ) + opts.scenes.push( scene ) + riot.route('/scene:' + parentScene.id + '/option:' + ( parentScene.options.length -1 ) ) } From 62e6673313e64e9239717c9d9599e9ef280faa1f Mon Sep 17 00:00:00 2001 From: Michael Andrew Date: Wed, 24 Aug 2016 08:58:30 +1200 Subject: [PATCH 04/15] Added pseudocode for setting session.attributes.flags Describes method of setting and checking flags when scenes are entered, allowing many different options: - Items that go into users inventory - Utterances that check if one or more items exist before allowing user to proceed into the linked scene - Puzzles involving multiple buttons that must be pushed before a door can be opened --- src/skill/AlexaSkill.js | 7 ++- src/tags/js/scene.js | 86 +++++++++++++--------------------- src/tags/panel-edit-option.tag | 5 ++ src/tags/panel-edit-scene.tag | 4 +- src/tags/panel-home.tag | 2 +- 5 files changed, 48 insertions(+), 56 deletions(-) diff --git a/src/skill/AlexaSkill.js b/src/skill/AlexaSkill.js index 8f81db4..8aeeaf2 100644 --- a/src/skill/AlexaSkill.js +++ b/src/skill/AlexaSkill.js @@ -67,8 +67,13 @@ AlexaSkill.prototype.execute = function ( event, context ) { + this._appId) throw "Invalid applicationId" } + + //TODO: allow default attributes.flags to be loaded from json file which is written when the global attributes.flags list is set + if (!event.session.attributes) { - event.session.attributes = {} + event.session.attributes = { + flags: {} + } } if (event.session.new) { this.eventHandlers.onSessionStarted(event.request, event.session) diff --git a/src/tags/js/scene.js b/src/tags/js/scene.js index 9c423bc..ee68b55 100644 --- a/src/tags/js/scene.js +++ b/src/tags/js/scene.js @@ -78,65 +78,45 @@ this.onClickEditScene = function (e) { }; this.onClickAddOption = function (e) { - e.stopPropagation(); - - var selection = prompt("What type do you want to add? Options are: scene / item", "scene"); - var parentSceneId = opts.scene ? opts.scene.id : 0; + var sceneId = 0;while (opts.scenes.find(function (scene) { + return scene.id === sceneId; + })) { + sceneId++; + } var parentScene = opts.scenes.find(function (scene) { return scene.id === Number(parentSceneId); }); - console.log(selection); - - if (selection === 'item') { - - var itemId = prompt("Enter the ID of the item you want to add", "42"); - - var option = { - itemId: itemId, - utterances: ['take item'] - }; - - parentScene.options.push(option); - } else { - - var sceneId = 0;while (opts.scenes.find(function (scene) { - return scene.id === sceneId; - })) { - sceneId++; - } - - var option = { - sceneId: sceneId, - utterances: ['open door'] - }; - - var scene = { - id: sceneId, - color: 'default', - isHidden: false, - generateOptions: true, - readPreviousOptions: false, - card: { - title: 'Room', - text: 'You enter a room.', - image: { - smallImageUrl: null, - largeImageUrl: null - } - }, - voice: { - intro: 'You enter a room. What would you like to do?', - prompt: '' - }, - options: [] - }; - - parentScene.options.push(option); - opts.scenes.push(scene); - } + var option = { + sceneId: sceneId, + utterances: ['open door'] + }; + + var scene = { + id: sceneId, + color: 'default', + isHidden: false, + generateOptions: true, + readPreviousOptions: false, + card: { + title: 'Room', + text: 'You enter a room.', + image: { + smallImageUrl: null, + largeImageUrl: null + } + }, + voice: { + intro: 'You enter a room. What would you like to do?', + prompt: '' + }, + options: [] + }; + + parentScene.options.push(option); + opts.scenes.push(scene); riot.route('/scene:' + parentScene.id + '/option:' + (parentScene.options.length - 1)); }; diff --git a/src/tags/panel-edit-option.tag b/src/tags/panel-edit-option.tag index e9fe947..cd7f47a 100644 --- a/src/tags/panel-edit-option.tag +++ b/src/tags/panel-edit-option.tag @@ -40,6 +40,11 @@ data-target="#optionNotice"> + + + + + --> - +
Date: Wed, 24 Aug 2016 13:31:16 +1200 Subject: [PATCH 05/15] Can now set multiple session flags on entry/exit --- src/tags/js/panel-edit-scene.js | 7 ++++++- src/tags/js/scene.js | 2 ++ src/tags/panel-edit-scene.tag | 29 ++++++++++++++++++++++++++--- src/tags/panel-home.tag | 2 -- src/tags/scene.tag | 2 ++ 5 files changed, 36 insertions(+), 6 deletions(-) diff --git a/src/tags/js/panel-edit-scene.js b/src/tags/js/panel-edit-scene.js index 243bc2e..656426e 100644 --- a/src/tags/js/panel-edit-scene.js +++ b/src/tags/js/panel-edit-scene.js @@ -7,7 +7,7 @@ tagger(window.riot); } })(function(riot) { -riot.tag2('panel-edit-scene', '

{title} - {subtitle}

Small Card Image
Large Card Image



', '', '', function(opts) { +riot.tag2('panel-edit-scene', '

{title} - {subtitle}

Small Card Image
Large Card Image



', '', '', function(opts) { var _this = this; this.title = null; @@ -64,6 +64,11 @@ this.save = function (e) { return x.checked; }); + _this.scene.setSessionFlagsOnEnter = $advanced.$setSessionFlagsOnEnter.value || ''; + _this.scene.setSessionFlagsOnExit = $advanced.$setSessionFlagsOnExit.value || ''; + + console.log('sessionFlagValue', _this.scene.setSessionFlagsOnEnter); + _this.scene.color = $colorSelection ? $colorSelection.value : 'default'; _this.scene.isHidden = $advanced.$inputIsHiddenTrue.checked; _this.scene.readPreviousOptions = $advanced.$inputReadPreviousOptionsTrue.checked; diff --git a/src/tags/js/scene.js b/src/tags/js/scene.js index ee68b55..d3b1bcd 100644 --- a/src/tags/js/scene.js +++ b/src/tags/js/scene.js @@ -100,6 +100,8 @@ this.onClickAddOption = function (e) { isHidden: false, generateOptions: true, readPreviousOptions: false, + setSessionFlagsOnEnter: '', + setSessionFlagsOnExit: '', card: { title: 'Room', text: 'You enter a room.', diff --git a/src/tags/panel-edit-scene.tag b/src/tags/panel-edit-scene.tag index 07863c4..f3e9a30 100644 --- a/src/tags/panel-edit-scene.tag +++ b/src/tags/panel-edit-scene.tag @@ -126,6 +126,28 @@
+ + +
+ + +
+ +
+ + +
+
@@ -396,9 +418,10 @@ $advanced.$inputColorRed, $advanced.$inputColorYellow ].find( x => x.checked ) - //TODO: add support for saving selected item into scene as an item reference. also handle if item is changed / removed - //follow the format of this.onClickDestroyOption() in scene.tag to see how to update the scene options to save the - //item reference + this.scene.setSessionFlagsOnEnter = $advanced.$setSessionFlagsOnEnter.value || ''; + this.scene.setSessionFlagsOnExit = $advanced.$setSessionFlagsOnExit.value || ''; + + console.log('sessionFlagValue',this.scene.setSessionFlagsOnEnter); this.scene.color = $colorSelection ? $colorSelection.value : 'default' this.scene.isHidden = ( $advanced.$inputIsHiddenTrue.checked ) diff --git a/src/tags/panel-home.tag b/src/tags/panel-home.tag index 2ba5b73..3c6ffe0 100644 --- a/src/tags/panel-home.tag +++ b/src/tags/panel-home.tag @@ -18,8 +18,6 @@
--> - -
diff --git a/src/tags/scene.tag b/src/tags/scene.tag index 9f6f845..3ec1bd4 100644 --- a/src/tags/scene.tag +++ b/src/tags/scene.tag @@ -117,6 +117,8 @@ isHidden: false, generateOptions: true, readPreviousOptions: false, + setSessionFlagsOnEnter: '', + setSessionFlagsOnExit: '', card: { title: 'Room', text: 'You enter a room.', From 4ecfaeac5541395275073863f49b8e15b10ba658 Mon Sep 17 00:00:00 2001 From: Michael Andrew Date: Wed, 24 Aug 2016 13:49:53 +1200 Subject: [PATCH 06/15] Now correctly updates dynamoDB with session flags --- src/skill/handlers/dynamoDB.js | 6 ++++-- src/skill/handlers/processUtterance.js | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/skill/handlers/dynamoDB.js b/src/skill/handlers/dynamoDB.js index 449082a..b7048d1 100644 --- a/src/skill/handlers/dynamoDB.js +++ b/src/skill/handlers/dynamoDB.js @@ -28,7 +28,8 @@ function putUserState ( session, cb ) { "Item": { "userId": session.user.userId, "breadcrumbs": session.attributes.breadcrumbs, - "currentSceneId": session.attributes.currentSceneId + "currentSceneId": session.attributes.currentSceneId, + "flags": session.attributes.flags } } @@ -46,7 +47,8 @@ function getUserState ( session, cb ) { }, "AttributesToGet": [ "currentSceneId", - "breadcrumbs" + "breadcrumbs", + "flags" ], } diff --git a/src/skill/handlers/processUtterance.js b/src/skill/handlers/processUtterance.js index 079f281..cd3d249 100644 --- a/src/skill/handlers/processUtterance.js +++ b/src/skill/handlers/processUtterance.js @@ -40,6 +40,31 @@ function processUtterance ( intent, session, request, response, utterance ) { var nextScene = utils.findNextScene( currentScene, option ); session.attributes.breadcrumbs.push( currentScene.id ) session.attributes.currentSceneId = nextScene.id + + //set session flags on exit if the current scene specifies their values + if(currentScene.setSessionFlagsOnExit && currentScene.setSessionFlagsOnExit !== ''){ + var flags = currentScene.setSessionFlagsOnExit.split("\n"); + flags.forEach(function(flag){ + var flagArray = flag.split('='); + var flagKey = flagArray[0]; + var flagValue = flagArray[1]; + + session.attributes.flags[flagKey] = flagValue; + }); + } + + //set session flags on enter if the next scene specifies their values + if(nextScene.setSessionFlagsOnEnter && nextScene.setSessionFlagsOnEnter !== ''){ + var flags = nextScene.setSessionFlagsOnEnter.split("\n"); + flags.forEach(function(flag){ + var flagArray = flag.split('='); + var flagKey = flagArray[0]; + var flagValue = flagArray[1]; + + session.attributes.flags[flagKey] = flagValue; + }); + } + respond.readSceneWithCard( nextScene, session, response ) } From aac33aba152b31d8bbbcad357be87bc6594f2a99 Mon Sep 17 00:00:00 2001 From: Michael Andrew Date: Wed, 24 Aug 2016 20:28:07 +1200 Subject: [PATCH 07/15] Can now set conditions for scene entry Also includes UI for setting the reject card and voice message that is presented to the user if scene entry fails due to unsatisfied entry conditions. Entry conditions have basic logic supporting `AND`, `OR`, `NOT`, `GROUPSTART` and `GROUPEND` which can be used to replicate complicated logic. e.g. ``` player.poisoned=0 AND GROUPSTART inventory.redKey=1 OR inventory.skeletonKey=1 GROUPEND ``` equates to: ``` if(session.attributes.flags['player.poisoned'] === "0" && (session.attributes.flags.['inventory.redKey'] === "1" || session.attributes.flags.['inventory.skeletonKey']) ``` --- src/skill/handlers/utils.js | 2 + src/tags/js/panel-edit-scene.js | 24 ++- src/tags/js/scene.js | 13 ++ src/tags/panel-edit-scene.tag | 290 ++++++++++++++++++++++++++++---- src/tags/scene.tag | 13 ++ 5 files changed, 304 insertions(+), 38 deletions(-) diff --git a/src/skill/handlers/utils.js b/src/skill/handlers/utils.js index aa8a6a9..51bb70e 100644 --- a/src/skill/handlers/utils.js +++ b/src/skill/handlers/utils.js @@ -50,7 +50,9 @@ module.exports = utils function cloneScene ( scene ) { var scene = Object.assign( {}, scene ) scene.card = Object.assign( {}, scene.card ) + scene.rejectCard = Object.assign( {}, scene.rejectCard ) scene.voice = Object.assign( {}, scene.voice ) + scene.rejectVoice = Object.assign( {}, scene.rejectVoice ) if ( 'options' in scene ) scene.options = scene.options.slice() return scene } diff --git a/src/tags/js/panel-edit-scene.js b/src/tags/js/panel-edit-scene.js index 656426e..d091778 100644 --- a/src/tags/js/panel-edit-scene.js +++ b/src/tags/js/panel-edit-scene.js @@ -7,7 +7,7 @@ tagger(window.riot); } })(function(riot) { -riot.tag2('panel-edit-scene', '

{title} - {subtitle}

Small Card Image
Large Card Image



', '', '', function(opts) { +riot.tag2('panel-edit-scene', '

{title} - {subtitle}









Small Card Image
Large Card Image

Small Card Image
Large Card Image




', '', '', function(opts) { var _this = this; this.title = null; @@ -66,8 +66,7 @@ this.save = function (e) { _this.scene.setSessionFlagsOnEnter = $advanced.$setSessionFlagsOnEnter.value || ''; _this.scene.setSessionFlagsOnExit = $advanced.$setSessionFlagsOnExit.value || ''; - - console.log('sessionFlagValue', _this.scene.setSessionFlagsOnEnter); + _this.scene.entryConditions = $advanced.$entryConditions.value || ''; _this.scene.color = $colorSelection ? $colorSelection.value : 'default'; _this.scene.isHidden = $advanced.$inputIsHiddenTrue.checked; @@ -78,6 +77,13 @@ this.save = function (e) { prompt: _this.$voicePrompt.value.trim() }; + var $rejectVoice = _this.$collapsibleRejectVoice._tag; + + _this.scene.rejectVoice = { + intro: $rejectVoice.$rejectIntro.value.trim(), + prompt: $rejectVoice.$rejectVoicePrompt.value.trim() + }; + var $cardImage = _this.$collapsibleCardImage._tag; _this.scene.card = { title: _this.$title.value.trim(), @@ -89,6 +95,18 @@ this.save = function (e) { } }; + var $rejectCard = _this.$collapsibleRejectCard._tag; + var $rejectCardImage = $rejectCard.$collapsibleRejectImage._tag; + _this.scene.rejectCard = { + title: $rejectCard.$rejectTitle.value.trim(), + text: $rejectCard.$rejectText.value.trim(), + prompt: $rejectCard.$rejectCardPrompt.value.trim(), + image: { + largeImageUrl: $inputRejectLargeImageUrl.value.trim() || null, + smallImageUrl: $inputRejectSmallImageUrl.value.trim() || null + } + }; + _this.subtitle = _this.scene.card.title; riot.update(); diff --git a/src/tags/js/scene.js b/src/tags/js/scene.js index d3b1bcd..2566135 100644 --- a/src/tags/js/scene.js +++ b/src/tags/js/scene.js @@ -102,6 +102,7 @@ this.onClickAddOption = function (e) { readPreviousOptions: false, setSessionFlagsOnEnter: '', setSessionFlagsOnExit: '', + entryConditions: '', card: { title: 'Room', text: 'You enter a room.', @@ -110,10 +111,22 @@ this.onClickAddOption = function (e) { largeImageUrl: null } }, + rejectCard: { + title: '', + text: '', + image: { + smallImageUrl: null, + largeImageUrl: null + } + }, voice: { intro: 'You enter a room. What would you like to do?', prompt: '' }, + rejectVoice: { + intro: '', + prompt: '' + }, options: [] }; diff --git a/src/tags/panel-edit-scene.tag b/src/tags/panel-edit-scene.tag index f3e9a30..ae23882 100644 --- a/src/tags/panel-edit-scene.tag +++ b/src/tags/panel-edit-scene.tag @@ -138,6 +138,29 @@ value={ parent.scene.setSessionFlagsOnEnter }>
+
+ + + + + + +
+
+
+ + + + + + +
+ +
+ + +
+ +
+ + + + + + +
+
@@ -209,6 +300,35 @@ value={ scene.card.prompt }>
+
+ + + + + + +
+ -
+ - - - - +
+ + +
+ +
+ + +
+ + + + Small Card Image +
+ + +
+ + Large Card Image +
+ + +
+ +
+ + + + + + +
+
+
@@ -361,6 +537,32 @@

+
+ + +
+ + +
+ +
+ + +
+ +
+