From f2fcfa89639dd9a5d844c40b44f7fb4f4f823f59 Mon Sep 17 00:00:00 2001 From: Remington Covert Date: Fri, 26 Dec 2014 20:05:26 -0800 Subject: [PATCH] filling out jail. --- .../src-common/advent/screens/rooms/inside_jail.clj | 13 ++++++++++++- desktop/src-common/advent/screens/scene.clj | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/desktop/src-common/advent/screens/rooms/inside_jail.clj b/desktop/src-common/advent/screens/rooms/inside_jail.clj index cf229434..15383a0e 100644 --- a/desktop/src-common/advent/screens/rooms/inside_jail.clj +++ b/desktop/src-common/advent/screens/rooms/inside_jail.clj @@ -12,7 +12,18 @@ (defn make [screen] (rooms/make :music :inside-antique - :interactions {} + :interactions { + :lock {:box [178 102 184 124] + :script (actions/get-script entities + (actions/walk-to entities :ego [174 80] :face :right) + (actions/play-animation entities :ego :reach) + (actions/talk entities :ego "There's no helping it. It's locked."))} + :hay {:box [130 86 177 102] + :script (actions/get-script entities + (actions/walk-to entities :ego [144 86] :face :right) + (actions/talk entities :ego "Maybe there's a needle or something in here.") + (actions/play-animation entities :ego :squat) + (actions/talk entities :ego "No. Nothing at all!"))}} :layers [(assoc (texture "inside-jail/background.png") :x 0 :y 0 :baseline 0) (assoc (texture "inside-jail/bars.png") :x 0 :y 0 :baseline 165) (assoc (texture "inside-jail/glow.png") :x 0 :y 0 :baseline 240)] diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index 93647ca0..bbafefaa 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -55,6 +55,7 @@ (defn left-click [screen entities] (let [{:keys [x y]} (input->screen screen {:x (:input-x screen) :y (:input-y screen)})] + (println "clicked " [x y]) (if ((:mouse-in? (:inventory entities)) x y) (click-inventory screen entities) (let [interaction (first (filter #((:mouse-in? %) entities x y)