diff --git a/desktop/resources/behindhouse/background.png b/desktop/resources/behindhouse/background.png index 8e695081..3bcc00ee 100644 Binary files a/desktop/resources/behindhouse/background.png and b/desktop/resources/behindhouse/background.png differ diff --git a/desktop/resources/behindhouse/stick.png b/desktop/resources/behindhouse/stick.png new file mode 100644 index 00000000..9513670b Binary files /dev/null and b/desktop/resources/behindhouse/stick.png differ diff --git a/desktop/resources/cursor.png b/desktop/resources/cursor.png index 4a9a8677..42c939be 100644 Binary files a/desktop/resources/cursor.png and b/desktop/resources/cursor.png differ diff --git a/desktop/src-common/advent/screens/items.clj b/desktop/src-common/advent/screens/items.clj index d03df304..c033ae5c 100644 --- a/desktop/src-common/advent/screens/items.clj +++ b/desktop/src-common/advent/screens/items.clj @@ -27,3 +27,4 @@ (def cards {:name "Warlock's Tower cards" :value :cards :cursor :cards}) (def cheat-deck {:name "Warlock's Tower cheat deck" :value :cheat-deck :cursor :cheat-deck}) +(def stick {:name "Stick" :value :stick :cursor :stick}) diff --git a/desktop/src-common/advent/screens/rooms/behind_house.clj b/desktop/src-common/advent/screens/rooms/behind_house.clj index e51586f0..5d333e51 100644 --- a/desktop/src-common/advent/screens/rooms/behind_house.clj +++ b/desktop/src-common/advent/screens/rooms/behind_house.clj @@ -49,6 +49,14 @@ :layers [(assoc (texture "behindhouse/background.png") :x 0 :y 0 :baseline 0) (assoc (texture "behindhouse/house.png") :x 0 :y 0 :baseline 122) (assoc (texture "behindhouse/brush.png") :x 0 :y 0 :baseline 240)] - :entities {} + :entities {:stick (assoc (texture "behindhouse/stick.png") + :x 26 :y 80 :baseline 160 + :script (actions/get-script entities + (actions/walk-to entities :ego [50 80]) + (actions/play-animation entities :ego :reach) + (actions/remove-entity entities :stick) + (actions/give entities items/stick) + (actions/talk entities :ego "This stick might be useful.") + ))} :collision "behindhouse/collision.png" :scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00))) diff --git a/desktop/src-common/advent/utils.clj b/desktop/src-common/advent/utils.clj index b13f9cd0..14201302 100644 --- a/desktop/src-common/advent/utils.clj +++ b/desktop/src-common/advent/utils.clj @@ -11,7 +11,7 @@ (let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})] (println (:input-x screen) (:input-y screen) "->" x y))) -(def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :cards :cheat-deck]) +(def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :cards :cheat-deck :stick]) (defn cursor [filename which] (let [scale 2