diff --git a/desktop/src-common/advent/actions.clj b/desktop/src-common/advent/actions.clj index 781499fe..527d116b 100644 --- a/desktop/src-common/advent/actions.clj +++ b/desktop/src-common/advent/actions.clj @@ -274,6 +274,20 @@ (can-skip? [this screen entities] 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]] (run-action entities (begin [this screen entities] diff --git a/desktop/src-common/advent/screens/rooms/inside_house.clj b/desktop/src-common/advent/screens/rooms/inside_house.clj index 14e63c76..fd708c19 100644 --- a/desktop/src-common/advent/screens/rooms/inside_house.clj +++ b/desktop/src-common/advent/screens/rooms/inside_house.clj @@ -33,6 +33,7 @@ :flask (assoc (texture "inside-house/flask.png") :x 265 :y 80 :baseline 240 :script (actions/get-script entities + (actions/remove-entity entities :flask) (actions/give entities :flask) (actions/do-dialogue entities :ego "Hey you think I could have this flask?" :wizard "Sure.")))}