implemented library of items.

This commit is contained in:
2014-10-14 12:57:12 -07:00
parent de2a4f8c7c
commit 2c046134f8
7 changed files with 26 additions and 20 deletions

View File

@@ -23,6 +23,8 @@
(can-skip? [this screen entities])
(get-channel [this]))
(defn has-item? [entities item]
((set (get-in entities [:state :inventory])) item))
(defmacro get-script [entities & forms]
`(fn [starting-entities#]
@@ -260,7 +262,7 @@
(-> entities
(update-in [:state :inventory] #(conj % item))
(assoc-in [:cursor :current] item)))
(assoc-in [:cursor :current] (:cursor item))))
(continue [this screen entities] entities)