consuming item when used.

This commit is contained in:
2014-11-01 12:20:13 -07:00
parent bfecb62355
commit f496f61003

View File

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