diff --git a/desktop/resources/inside-antique/desk.png b/desktop/resources/inside-antique/desk.png index fd012de8..431bab29 100644 Binary files a/desktop/resources/inside-antique/desk.png and b/desktop/resources/inside-antique/desk.png differ diff --git a/desktop/src-common/advent/screens/rooms/inside_antique.clj b/desktop/src-common/advent/screens/rooms/inside_antique.clj index c8547340..534e958b 100644 --- a/desktop/src-common/advent/screens/rooms/inside_antique.clj +++ b/desktop/src-common/advent/screens/rooms/inside_antique.clj @@ -40,17 +40,27 @@ "Something else." {:choices actions/something-else}]] (actions/present-choices entities - {:choices ["I can barely see anything!" + {:choices [(when-not (get-in @entities [:state :opened-blinds?]) + "I can barely see anything!") {:run #(actions/respond entities % :shopkeep "Sorry about that, sonny." :shopkeep "My son will be back any minute with some candles.") :choices son-choices} + (when (get-in @entities [:state :opened-blinds?]) + "I let some light in. Will you open up shop?") + {:run #(actions/respond entities % + :shopkeep "It's still too dark in here." + :shopkeep "Don't worry." + :shopkeep "My son will be back any minute with those candles.") + :choices son-choices} + "What do you have for sale here?" {:run #(actions/respond entities % :shopkeep "We're not open for business right now." :shopkeep "Can't you see the lights are out?" :shopkeep "We'll be open again when my son comes back with some candles.") - :choices ["Why don't you just open the curtains?" + :choices [(when-not (get-in @entities [:state :opened-blinds?]) + "Why don't you just open the curtains?") {:run #(actions/respond entities % :shopkeep "That window doesn't let much light in anyhow." :shopkeep "Plus, my son should be back any minute now.") @@ -59,12 +69,14 @@ {:run #(actions/respond entities % :shopkeep "No, not until my son returns.") :choices #(-> % zip/left zip/left)} - "If I get some light in here, will you open up shop?" + (if (get-in @entities [:state :opened-blinds?]) + "Since I got some light in here, will you open up shop?" + "If I get some light in here, will you open up shop?") {:run #(actions/respond entities % :shopkeep "No." :shopkeep "I need my son to help around the shop anyways." :shopkeep "And there's a lot to fix up before we're ready to open shop again.") - :choices #(-> % zip/left zip/left zip/left zip/left)} + :choices son-choices} "Something else." {:choices actions/something-else}]} "Are those lava mints on the desk?" @@ -229,10 +241,14 @@ (tween/tween :fade-glow-out screen [:room :entities :glow :opacity] 0.3 0.0 0.75 :ease tween/ease-out-quadratic))))) :use-screen? true)) :scripts {:portrait (actions/get-script entities - (actions/walk-to entities :ego [142 49] :face :left) - (actions/play-animation entities :ego :hold-up-to-window) - (actions/talk entities :ego "The portrait says 'Herb' on the back.") - (actions/update-state entities (fn [state] (update-in state [:clues] #(conj % :name)) )))}} + (if (get-in @entities [:state :opened-blinds?]) + (do (actions/walk-to entities :ego [142 49] :face :left) + (actions/play-animation entities :ego :hold-up-to-window) + (actions/talk entities :ego "The portrait says 'Herb' on the back.") + (actions/update-state entities (fn [state] (update-in state [:clues] #(conj % :name)) ))) + (do (actions/walk-to entities :ego [142 49] :face :left) + (actions/play-animation entities :ego :hold-up-to-window) + (actions/talk entities :ego "It's just too dim."))))}} :grandfather-clock {:box [55 70 103 185] :script (actions/get-script entities (actions/do-dialogue entities :ego "Cool grandfather clock!" diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index d005d354..2ffa653f 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -1145,7 +1145,7 @@ void main() :on-render (fn [{:keys [^FitViewport viewport] :as screen} [entities]] (.apply viewport) - #_(render! screen [(:label entities)]) + (render! screen [(:label entities)]) entities) :on-resize