Skip to content
Snippets Groups Projects
Commit b135827b authored by Tim Repke's avatar Tim Repke
Browse files

made some testing and fixed found bugs in fs

parent fa42c923
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,9 @@ Story.actions = {
successful: false // all done with this action (equivalent to Environment.progress.fs_firstApproach)
},
possible: function () {
return (!Story.actions.fs_firstApproach.state.successful && !Story.actions.fs_firstApproach.state.failed) ||
(!Environment.progress.fs_firstApproach && Environment.progress.inventory_money);
var state = Story.actions.fs_firstApproach.state;
return (!state.successful && !state.failed) ||
(!state.successful && state.failed && Environment.progress.inventory_money);
},
action: function () {
var state = Story.actions.fs_firstApproach.state;
......@@ -48,7 +49,8 @@ Story.actions = {
state.studityp = true;
Environment.fapi.data.setValue('studityp', 'ERSTI');
}
}]
}],
condition: !state.studityp
},{
bubble: '#tim_speech',
message: state.failed ?
......@@ -263,7 +265,7 @@ Story.dialogueHelper = function (dialogue, context, done) {
function answerSelection(answers) {
var possibleAnswers = answers.map(function (answer, i) {
if ('condition' in answer && answer.condition)
if (!('condition' in answer) || answer.condition)
return '<li gameDialogueAnswer="' + i + '">' + answer.message + '</li>';
else return null;
}).filter(function (answer) {
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment