progress
This commit is contained in:
@@ -538,10 +538,11 @@
|
||||
(defn update-state [entities f]
|
||||
(update-entities entities #(update-in % [:state] f)))
|
||||
|
||||
(defn remove-item [entities item]
|
||||
(defn remove-item [entities item & {:keys [quiet?] :or {quiet? false}}]
|
||||
(run-action entities
|
||||
(begin [this screen entities]
|
||||
(screen! @(resolve 'advent.screens.scene/hud) :on-remove-item :item ((:all-items entities) item))
|
||||
(when-not quiet?
|
||||
(screen! @(resolve 'advent.screens.scene/hud) :on-remove-item :item ((:all-items entities) item)))
|
||||
(-> entities
|
||||
(update-in [:state :inventory] #(remove (partial = item) %))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user