From 9902d45faa69fd56312e4a4b891b58872f65cfda Mon Sep 17 00:00:00 2001
From: Tim Repke <timmothey@gmx.de>
Date: Sat, 19 Sep 2015 23:54:46 +0200
Subject: [PATCH] added fast talk option

---
 registration-system/view/signups/game1/js/events.js | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/registration-system/view/signups/game1/js/events.js b/registration-system/view/signups/game1/js/events.js
index 9dfc10a..f19b4d9 100644
--- a/registration-system/view/signups/game1/js/events.js
+++ b/registration-system/view/signups/game1/js/events.js
@@ -162,6 +162,12 @@ EventHandler.actions = {
 };
 
 function dialogueHelper(dialogue, done) {
+
+    var speed = {
+        talk: UrlComponents.isSet('fastTalk') ? 1 : 40,
+        pause: UrlComponents.isSet('fastTalk') ? 50 : 1000
+    };
+
     Game.actionsBlocked = true;
     var dialogueBox = $('#gameDialogue');
     dialogueBox.html('');
@@ -193,11 +199,11 @@ function dialogueHelper(dialogue, done) {
                 setTimeout(function() {
                     Game.char.svg.select(bubble).style('display', 'none');
                     plotDone();
-                }, 1000)
+                }, speed.pause)
             } else {
                 Game.char.svg.select(bubble).style('display', (i % 2) ? 'none' : 'block');
                 dialogueBox.text(message.substring(0, i));
             }
-        }, 40);
+        }, speed.talk);
     }
 }
\ No newline at end of file
-- 
GitLab