nicer ux when getting flask.
This commit is contained in:
@@ -274,6 +274,20 @@
|
|||||||
(can-skip? [this screen entities]
|
(can-skip? [this screen entities]
|
||||||
false)))
|
false)))
|
||||||
|
|
||||||
|
(defn remove-entity [entities entity]
|
||||||
|
(run-action entities
|
||||||
|
(begin [this screen entities]
|
||||||
|
(update-in entities [:room :entities] #(dissoc % entity)))
|
||||||
|
|
||||||
|
(continue [this screen entities] entities)
|
||||||
|
|
||||||
|
(done? [this screen entities] true)
|
||||||
|
|
||||||
|
(terminate [this screen entities] entities)
|
||||||
|
|
||||||
|
(can-skip? [this screen entities]
|
||||||
|
false)))
|
||||||
|
|
||||||
(defn transition-background [entities new-background [x y]]
|
(defn transition-background [entities new-background [x y]]
|
||||||
(run-action entities
|
(run-action entities
|
||||||
(begin [this screen entities]
|
(begin [this screen entities]
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
:flask (assoc (texture "inside-house/flask.png")
|
:flask (assoc (texture "inside-house/flask.png")
|
||||||
:x 265 :y 80 :baseline 240
|
:x 265 :y 80 :baseline 240
|
||||||
:script (actions/get-script entities
|
:script (actions/get-script entities
|
||||||
|
(actions/remove-entity entities :flask)
|
||||||
(actions/give entities :flask)
|
(actions/give entities :flask)
|
||||||
(actions/do-dialogue entities :ego "Hey you think I could have this flask?"
|
(actions/do-dialogue entities :ego "Hey you think I could have this flask?"
|
||||||
:wizard "Sure.")))}
|
:wizard "Sure.")))}
|
||||||
|
|||||||
Reference in New Issue
Block a user