diff --git a/desktop/src-common/advent/screens/dialogue.clj b/desktop/src-common/advent/screens/dialogue.clj index ef03a484..3b27e159 100644 --- a/desktop/src-common/advent/screens/dialogue.clj +++ b/desktop/src-common/advent/screens/dialogue.clj @@ -85,13 +85,13 @@ {})))) :on-mouse-moved (fn [screen [entities]] - (let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)}) - font (bitmap-font "ego/font.fnt" )] - (when (seq entities) - (doseq [index (range (dec (count entities)))] - (if (< (* index 30) y (* (inc index) 30)) - (label! (entities index) :set-style (style :label font (color :yellow))) - (label! (entities index) :set-style (style :label font (color :white)))))))) + (when (seq entities) + (let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)}) + font (bitmap-font "ego/font.fnt" )] + (doseq [index (range (dec (count entities)))] + (if (< (* index 30) y (* (inc index) 30)) + (label! (entities index) :set-style (style :label font (color :yellow))) + (label! (entities index) :set-style (style :label font (color :white)))))))) :on-resize (fn [screen entities] (size! screen 1280 960))) diff --git a/desktop/src-common/advent/screens/items.clj b/desktop/src-common/advent/screens/items.clj index 5ceb29a1..04fbf841 100644 --- a/desktop/src-common/advent/screens/items.clj +++ b/desktop/src-common/advent/screens/items.clj @@ -49,7 +49,7 @@ (def stick {:name "Stick" :value :stick :cursor :stick :scripts {:wool make-cat-toy}}) (def balloon {:name "Choicest of balloons" :value :balloon :cursor :balloon}) (def frog-legs {:name "Frog legs" :value :frog-legs :cursor :frog-legs}) -(def stool {:name "Stool" :value :stool :cursor :stool}) +(def ladder {:name "ladder" :value :ladder :cursor :ladder}) (def teddy {:name "Teddy Bear" :value :teddy :cursor :teddy}) (def portrait {:name "Portrait" :value :portrait :cursor :portrait}) (def recipe {:name "Strength potion recipe" :value :recipe :cursor :recipe}) diff --git a/desktop/src-common/advent/screens/rooms/inside_cafeteria.clj b/desktop/src-common/advent/screens/rooms/inside_cafeteria.clj index 708f57e4..03654971 100644 --- a/desktop/src-common/advent/screens/rooms/inside_cafeteria.clj +++ b/desktop/src-common/advent/screens/rooms/inside_cafeteria.clj @@ -74,12 +74,18 @@ {:run #(actions/respond entities % :ladder-guard "No.") :choices ["Pretty pretty please?" - {:run #(do (actions/respond entities % - :ladder-guard "Well, okay." - :ladder-guard "Do not darest telleth a soul, or the Duke will haveth my head!") - (actions/walk-to entities :ego [245 75] :face :right) - (actions/play-animation entities :ego :reach) - (actions/remove-entity entities :ladder))} + {:run #(actions/respond entities % + :ladder-guard "No.") + :choices ["Pretty pretty pretty please?" + {:run #(do (actions/respond entities % + :ladder-guard "Well, okay." + :ladder-guard "Do not darest telleth a soul, or the Duke will haveth my head!") + (actions/walk-to entities :ego [245 75] :face :right) + (actions/play-animation entities :ego :reach) + (actions/remove-entity entities :ladder) + (actions/give entities items/ladder))} + "Nevermind." + {:run #(actions/respond entities %)}]} "Nevermind." {:run #(actions/respond entities %)}]} "Nevermind." diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index b0def159..1a1046b2 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -264,7 +264,7 @@ :on-mouse-moved (fn [screen [entities]] - (when (get-in entities [:state :active?]) + #_(when (get-in entities [:state :active?]) (let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})] (if-let [mouse-override (find-override screen entities [x y])] (assoc-in entities [:cursor :override] (:cursor mouse-override)) diff --git a/desktop/src-common/advent/utils.clj b/desktop/src-common/advent/utils.clj index 270d14b2..32a47d84 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 :trophy :stool :stick :cat-toy :balloon :frog-legs :teddy :portrait :recipe :glass-eye :motivational-tapes :used-earplugs :grass :slobber :flask-with-strength :medal]) +(def +all-cursors+ [:main :wool :mushrooms :carrot :right :down :left :up :flask :flask-with-contents :trophy :ladder :stick :cat-toy :balloon :frog-legs :teddy :portrait :recipe :glass-eye :motivational-tapes :used-earplugs :grass :slobber :flask-with-strength :medal]) (defn cursor [filename which] (let [scale 2