diff --git a/desktop/resources/castle-gate/throw-walkie.png b/desktop/resources/castle-gate/throw-walkie.png index 50e84f01..563b412e 100644 Binary files a/desktop/resources/castle-gate/throw-walkie.png and b/desktop/resources/castle-gate/throw-walkie.png differ diff --git a/desktop/resources/castle-gate/throw-walkie.pxa/2.pxi b/desktop/resources/castle-gate/throw-walkie.pxa/2.pxi index 364324e2..3f0befa9 100644 Binary files a/desktop/resources/castle-gate/throw-walkie.pxa/2.pxi and b/desktop/resources/castle-gate/throw-walkie.pxa/2.pxi differ diff --git a/desktop/resources/castle-gate/throw-walkie.pxa/3.pxi b/desktop/resources/castle-gate/throw-walkie.pxa/3.pxi index 8906131e..4011627d 100644 Binary files a/desktop/resources/castle-gate/throw-walkie.pxa/3.pxi and b/desktop/resources/castle-gate/throw-walkie.pxa/3.pxi differ diff --git a/desktop/resources/castle-gate/throw-walkie.pxa/4.pxi b/desktop/resources/castle-gate/throw-walkie.pxa/4.pxi index 347741b1..ecf7a2d7 100644 Binary files a/desktop/resources/castle-gate/throw-walkie.pxa/4.pxi and b/desktop/resources/castle-gate/throw-walkie.pxa/4.pxi differ diff --git a/desktop/resources/castle-gate/throw-walkie.pxa/5.pxi b/desktop/resources/castle-gate/throw-walkie.pxa/5.pxi index 915ffdd1..7978709e 100644 Binary files a/desktop/resources/castle-gate/throw-walkie.pxa/5.pxi and b/desktop/resources/castle-gate/throw-walkie.pxa/5.pxi differ diff --git a/desktop/resources/castle-gate/throw-walkie.pxa/6.pxi b/desktop/resources/castle-gate/throw-walkie.pxa/6.pxi index f9195b36..a760bc71 100644 Binary files a/desktop/resources/castle-gate/throw-walkie.pxa/6.pxi and b/desktop/resources/castle-gate/throw-walkie.pxa/6.pxi differ diff --git a/desktop/resources/castle-gate/throw-walkie.pxa/7.pxi b/desktop/resources/castle-gate/throw-walkie.pxa/7.pxi index 0af10c18..10b27615 100644 Binary files a/desktop/resources/castle-gate/throw-walkie.pxa/7.pxi and b/desktop/resources/castle-gate/throw-walkie.pxa/7.pxi differ diff --git a/desktop/resources/castle-gate/throw-walkie.pxa/8.pxi b/desktop/resources/castle-gate/throw-walkie.pxa/8.pxi index f77268c2..002ca0fc 100644 Binary files a/desktop/resources/castle-gate/throw-walkie.pxa/8.pxi and b/desktop/resources/castle-gate/throw-walkie.pxa/8.pxi differ diff --git a/desktop/settings.edn b/desktop/settings.edn index 1b3600d2..61ad08f4 100644 --- a/desktop/settings.edn +++ b/desktop/settings.edn @@ -1 +1 @@ -{:sound-volume 44.0, :music-volume 39.0} \ No newline at end of file +{:sound-volume 0.0, :music-volume 0.0} \ No newline at end of file diff --git a/desktop/src-common/advent/screens/rooms/castle_gate.clj b/desktop/src-common/advent/screens/rooms/castle_gate.clj index 927fd9bf..3f73dea8 100644 --- a/desktop/src-common/advent/screens/rooms/castle_gate.clj +++ b/desktop/src-common/advent/screens/rooms/castle_gate.clj @@ -88,7 +88,10 @@ :script (actions/get-script entities (walk-to-frankie entities) (actions/talk entities :ego "Listen, Frankie...") - (present-frankie-choices entities))))) + (present-frankie-choices entities)) + + :scripts {:walkie-talkies (actions/get-script entities + (actions/do-dialogue entities :frankie "Tin cans? What do I need walkie talkies for?"))}))) (defn make-goon-1 [screen] (let [stand (utils/make-anim "castle-gate/goon-1.png" [12 33] 0.21 [0 0 0 0 0 0 0 0 0 1])] @@ -121,7 +124,8 @@ (defn make [screen] (let [throw-walkie (utils/make-anim "castle-gate/throw-walkie.png" [205 136] 0.1 (flatten [(repeat 55 0) (range 9) (repeat 55 8)])) - walkie-base (animation 1.0 [(last (utils/split-texture "castle-gate/throw-walkie.png" [205 136] (range 9)))])] + walkie-visible (animation 1.0 [(last (utils/split-texture "castle-gate/throw-walkie.png" [205 136] (range 9)))]) + walkie-invisible (animation 1.0 [(first (utils/split-texture "castle-gate/throw-walkie.png" [205 136] (range 9)))])] (rooms/make :music {:day :town-2 :night :night} :interactions {:right-dir {:box [300 40 320 83] :script (actions/get-script entities @@ -138,20 +142,16 @@ :scripts {:walkie-talkies (actions/get-script entities (drop-walkie-talkie entities))}} :window {:box [192 157 215 215] :script (actions/get-script entities - (actions/walk-to entities :ego [285 71]) - (actions/walk-straight-to entities :ego [308 105] :face :left) - (actions/begin-animation entities :throw-walkie :throw-walkie) - (actions/play-animation entities :ego :throw) - (actions/begin-animation entities :throw-walkie :stand) - (Thread/sleep 2000) - (actions/walk-straight-to entities :ego [285 71])) + (actions/talk entities :ego "That's a big window!")) :scripts {:walkie-talkies (actions/get-script entities (actions/walk-to entities :ego [285 71]) (actions/walk-straight-to entities :ego [308 105] :face :left) - (actions/begin-animation entities :throw-walkie :throw-walkie) + (actions/add-entity entities :walkie-talkies (actions/start-animation (get-in @entities [:room :walkie-talkies]) + :walkie-invisible)) + (actions/begin-animation entities :walkie-talkies :throw-walkie) (actions/play-animation entities :ego :throw) (actions/remove-item entities :walkie-talkies) - (actions/begin-animation entities :throw-walkie :stand) + (actions/begin-animation entities :walkie-talkies :stand) (Thread/sleep 2000) (actions/walk-straight-to entities :ego [285 71]))}}} @@ -160,14 +160,17 @@ :entities {:frankie (make-frankie screen) :goon-1 (make-goon-1 screen) :goon-2 (make-goon-2 screen) - :throw-walkie (assoc (animation->texture screen walkie-base) - :x 104 :y 88 - :baseline 130 - - :throw-walkie throw-walkie - :stand walkie-base - :anim-start 0 - :anim walkie-base)} + } + :walkie-talkies (rooms/make-entity :walkie-talkies + (assoc (animation->texture screen walkie-visible) + :x 104 :y 88 + :baseline 130 + :night-profile :sprite + :throw-walkie throw-walkie + :stand walkie-visible + :walkie-invisible walkie-invisible + :anim-start 0 + :anim walkie-visible)) :collision "castle-gate/collision.png" :scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.30) @@ -175,5 +178,10 @@ (as-> entities entities (if (= :night (get-in entities [:state :time])) (make-night entities) + entities) + (if (and (not (actions/has-item? entities :walkie-talkies)) + (actions/has-obtained? entities :walkie-talkies)) + (assoc-in entities [:room :entities :walkie-talkies] + (get-in entities [:room :walkie-talkies])) entities))) :start-pos [300 45]))) diff --git a/desktop/src-common/advent/screens/rooms/inside_castle.clj b/desktop/src-common/advent/screens/rooms/inside_castle.clj index 6520c791..551ff1c1 100644 --- a/desktop/src-common/advent/screens/rooms/inside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/inside_castle.clj @@ -374,6 +374,7 @@ :x 257 :y 135 :baseline 0 + :night-profile :sprite :script (actions/get-script entities (actions/talk entities :ego "Let's give it a listen.") (actions/walk-to entities :ego [272 136] :face :left)