From b135827bf1b29fb89485c88347aa3b86a459d807 Mon Sep 17 00:00:00 2001
From: Tim Repke <timmothey@gmx.de>
Date: Mon, 21 Sep 2015 03:17:28 +0200
Subject: [PATCH] made some testing and fixed found bugs in fs

---
 .../view/signups/game1/js/story.js            |  10 ++++++----
 .../view/signups/game1/maps/castle_fs.svg     | Bin 1083865 -> 1083864 bytes
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/registration-system/view/signups/game1/js/story.js b/registration-system/view/signups/game1/js/story.js
index 26ae606..1a84041 100644
--- a/registration-system/view/signups/game1/js/story.js
+++ b/registration-system/view/signups/game1/js/story.js
@@ -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) {
diff --git a/registration-system/view/signups/game1/maps/castle_fs.svg b/registration-system/view/signups/game1/maps/castle_fs.svg
index 54252caa018a4bea94aa103500df38daca5dba86..8be76739d29a4e322bcdb78cc91892e2d5dd81b1 100644
GIT binary patch
delta 47
zcmcaP+3Ch)r-l~B7N!>F7M2#)7Pc1l7LFFq7OocV7M>Q~7QPn#Edtw`w{LG2P+|iB
DnH~@}

delta 49
zcmcaH+3DtFr-l~B7N!>F7M2#)7Pc1l7LFFq7OocV7M>Q~7QPn#Edtw`8H=}XYZg#q
F0|2;P5UBtF

-- 
GitLab