added a hacky way to reset the queue of actions.

This commit is contained in:
=
2014-09-15 16:29:35 -07:00
parent a9b5876d1f
commit fd91c7cc55

View File

@@ -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))