state updates screens.

This commit is contained in:
2014-11-20 18:23:30 -08:00
parent 8e54c82979
commit 64e0176e76
6 changed files with 35 additions and 7 deletions

View File

@@ -82,4 +82,9 @@
(actions/do-dialogue entities :ego "Hey you think I could have this flask?"
:wizard "Sure.")))}
:collision "inside-house/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.75))))
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.75)
:apply-state (fn [entities]
(as-> entities entities
(if (actions/has-one-of? entities [items/flask-1 items/flask-1-with-cream-of-mushroom items/flask-1-strength items/flask-1-with-mushrooms items/flask-1-with-milk])
(update-in entities [:room :entities] #(dissoc % :flask))
entities))))))