From f496f610031131be279e929f1c8a82f7f6d27d82 Mon Sep 17 00:00:00 2001 From: Remington Covert Date: Sat, 1 Nov 2014 12:20:13 -0700 Subject: [PATCH] consuming item when used. --- desktop/src-common/advent/actions.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/desktop/src-common/advent/actions.clj b/desktop/src-common/advent/actions.clj index 2019b8b1..230046b3 100644 --- a/desktop/src-common/advent/actions.clj +++ b/desktop/src-common/advent/actions.clj @@ -290,7 +290,9 @@ (defn remove-item [entities item] (run-action entities (begin [this screen entities] - (update-in entities [:state :inventory] #(remove (partial = item) %))) + (-> entities + (update-in [:state :inventory] #(remove (partial = item) %)) + (assoc-in [:cursor :current] :main))) (continue [this screen entities] entities)