Autosaving
This commit is contained in:
@@ -25,7 +25,9 @@
|
||||
(get-channel [this]))
|
||||
|
||||
(defn has-item? [entities item]
|
||||
((set (get-in entities [:state :inventory])) item))
|
||||
(if (map? entities)
|
||||
((set (get-in entities [:state :inventory])) item)
|
||||
((set (get-in @entities [:state :inventory])) item)))
|
||||
|
||||
(defn has-one-of? [entities items]
|
||||
(seq (set/intersection (set (get-in entities [:state :inventory])) (set items))))
|
||||
@@ -339,7 +341,7 @@
|
||||
|
||||
(-> entities
|
||||
(update-in [:state :inventory] #(conj % item))
|
||||
(assoc-in [:cursor :current] (:cursor item))))
|
||||
(assoc-in [:cursor :current] ((:all-items entities) item))))
|
||||
|
||||
(continue [this screen entities] entities)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user