From 80a1396bcc0badf0849a08649ec1c867bc846eba Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Wed, 15 Jun 2016 20:10:47 -0700 Subject: [PATCH] Added window treatment. --- .../advent/screens/rooms/behind_house.clj | 25 +++++++++++++++---- desktop/src-common/advent/screens/scene.clj | 2 +- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/desktop/src-common/advent/screens/rooms/behind_house.clj b/desktop/src-common/advent/screens/rooms/behind_house.clj index 979e1411..37a4e515 100644 --- a/desktop/src-common/advent/screens/rooms/behind_house.clj +++ b/desktop/src-common/advent/screens/rooms/behind_house.clj @@ -55,11 +55,26 @@ :script (actions/get-script entities (actions/walk-to entities :ego [128 100] :face :left) - (if (= :night (get-in @entities [:state :time])) - (actions/do-dialogue entities :ego "The house is dark and empty.") - (actions/do-dialogue entities - :ego "I can see Gandarf moving around in the corner of the room." - :ego "It's hard to make out from this angle.")))}} + (cond + (= :night (get-in @entities [:state :time])) + (actions/do-dialogue entities :ego "The house is dark and empty.") + + (actions/has-obtained? entities :tune) + (actions/do-dialogue entities + :ego "Gandarf's just working on one of his spells.") + + (get-in @entities [:state :peeked-in-window?]) + (actions/do-dialogue entities + :ego "Gandarf is moving around in the corner of the room." + :ego "I think he's opening his MagiSafe!" + :ego "I'll need a better spying angle if I hope to crack the safe.") + + :else + (do + (actions/do-dialogue entities + :ego "I can see Gandarf moving around in the corner of the room." + :ego "It's hard to make out from this angle.") + (actions/update-state entities #(assoc % :peeked-in-window? true)))))}} :layers {:day [(assoc (utils/get-texture "behindhouse/background.png") :x 0 :y 0 :baseline 0) (assoc (utils/get-texture "behindhouse/house.png") :x 0 :y 0 :baseline 122) (assoc (utils/get-texture "behindhouse/brush.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 6e0c5954..de437586 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -336,7 +336,7 @@ void main () (steam/set-achievement "FOOLISH_LULLABY")) :else (do - (actions/talk entities :ego "Ugh! I have Gandarf's MagicSafe 2000 tune stuck in my head.") + (actions/talk entities :ego "Ugh! I have Gandarf's MagiSafe 2000 tune stuck in my head.") (actions/play-safe entities)))) :alarm-clock