From fd91c7cc559feb8280976052fd13b42b65f98d2a Mon Sep 17 00:00:00 2001 From: = Date: Mon, 15 Sep 2014 16:29:35 -0700 Subject: [PATCH] added a hacky way to reset the queue of actions. --- desktop/src-common/advent/screens/scene.clj | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index 98fd4b14..3c6b55fd 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -73,14 +73,16 @@ (get-in entities [:background :interactions]))) current-cursor (get-in entities [:cursor :current]) cursor-override (get-in entities [:cursor :override]) + ;; TODO - hacky way of resetting queue + entities (if-let [current-action (get-in entities [:actions :current])] + (assoc (actions/terminate current-action screen entities) + :actions {:channel (chan) :current nil :started? false}) + entities) script (or (when cursor-override (interact cursor-override screen entities current-cursor [x y])) (when interaction (interact interaction screen entities current-cursor [x y])) - (interact default-interaction screen entities current-cursor [x y])) - entities (if-let [current-action (get-in entities [:actions :current])] - (actions/terminate current-action screen entities) - entities)] + (interact default-interaction screen entities current-cursor [x y]))] (script (get-in entities [:actions :channel])) entities))