hourglass when script cannot be ended.
This commit is contained in:
@@ -16,12 +16,12 @@
|
||||
(defn make [screen]
|
||||
(rooms/make :music {:day :town-2 :night :night}
|
||||
:interactions
|
||||
{:left-dir {:box [0 131 127 224]
|
||||
{:left-dir {:box [0 131 154 224]
|
||||
:script (actions/get-script
|
||||
entities
|
||||
(actions/walk-to entities :ego [122 140])
|
||||
(actions/walk-to entities :ego [122 140] :skip-type :end)
|
||||
(actions/transition-background entities :outside-house [244 150])
|
||||
(actions/walk-to entities :ego [195 140]))
|
||||
(actions/walk-to entities :ego [158 110]))
|
||||
:cursor :left}
|
||||
#_:crack #_{:box [68 100 73 114]
|
||||
:script (actions/get-script
|
||||
|
||||
@@ -192,9 +192,9 @@
|
||||
|
||||
|
||||
(defn attempt-walking-through-gate [entities]
|
||||
(actions/walk-to entities :ego [157 83])
|
||||
(actions/walk-to entities :ego [157 83] :skip-type :end)
|
||||
(actions/transition-background entities :inside-castle [280 145])
|
||||
(actions/walk-to entities :ego [245 90]))
|
||||
(actions/walk-to entities :ego [245 90] :skip-type :end))
|
||||
|
||||
(defn flip-coin [screen entities]
|
||||
(if (and (= 0 (rand-int 2))
|
||||
@@ -217,12 +217,12 @@
|
||||
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}
|
||||
:timers {:taunt [1.0 6.0 flip-coin]}
|
||||
:interactions {:right-dir {:box [300 40 320 83]
|
||||
:interactions {:right-dir {:box [280 40 320 83]
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [301 46] :face :right)
|
||||
(actions/walk-to entities :ego [301 46] :face :right :skip-type :end)
|
||||
(actions/walk-straight-to entities :ego [340 40])
|
||||
(actions/transition-background entities :outside-castle [82 180])
|
||||
(actions/walk-to entities :ego [129 148]))
|
||||
(actions/walk-to entities :ego [129 148] :skip-type :end))
|
||||
:cursor :right}
|
||||
:left-dir {:box [105 93 169 212]
|
||||
:script (actions/get-script entities (attempt-walking-through-gate entities))
|
||||
|
||||
@@ -210,10 +210,10 @@
|
||||
:interactions
|
||||
{:down-dir {:box [150 0 270 20]
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [200 10])
|
||||
(actions/walk-to entities :ego [200 10] :skip-type :end :stop? false)
|
||||
(actions/walk-straight-to entities :ego [223 -51])
|
||||
(actions/transition-background entities :outside-house [137 204])
|
||||
(actions/walk-to entities :ego [195 140]))
|
||||
(actions/walk-to entities :ego [158 110] :skip-type :end))
|
||||
:cursor :down}
|
||||
:ladder-area {:box [134 40 265 190]
|
||||
:scripts {:ladder (actions/get-unsaved-script entities
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
(actions/add-entity entities :teddy teddy)
|
||||
(actions/remove-item entities :teddy)))
|
||||
|
||||
(actions/walk-to entities :ego [235 15])
|
||||
(actions/walk-to entities :ego [235 15] :stop? false :skip-type :end)
|
||||
(actions/walk-straight-to entities :ego [320 -5])
|
||||
(actions/transition-background entities :inside-castle [182 90])
|
||||
(actions/walk-to entities :ego [187 75]))}
|
||||
|
||||
@@ -162,9 +162,9 @@
|
||||
{:right-dir {:box [272 45 320 120]
|
||||
:script (actions/get-script
|
||||
entities
|
||||
(actions/walk-to entities :ego [319 50])
|
||||
(actions/walk-to entities :ego [319 50] :skip-type :end)
|
||||
(actions/transition-background entities :inside-castle [65 150])
|
||||
(actions/walk-to entities :ego [126 80]))
|
||||
(actions/walk-to entities :ego [126 80] :skip-type :end))
|
||||
:cursor :right}
|
||||
}
|
||||
:layers [(assoc (texture "inside-cafeteria/background.png") :x 0 :y 0 :baseline 0)
|
||||
|
||||
@@ -359,14 +359,14 @@
|
||||
{:right-door {:box [286 140 306 160]
|
||||
:cursor :right
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [284 145])
|
||||
(actions/walk-to entities :ego [284 145] :skip-type :end)
|
||||
(actions/walk-straight-to entities :ego [295 145])
|
||||
(actions/transition-background entities :outside-castle [61 182])
|
||||
(actions/walk-straight-to entities :ego [82 180])
|
||||
(actions/walk-to entities :ego [129 148]))}
|
||||
(actions/walk-to entities :ego [129 148] :skip-type :end))}
|
||||
:up-door {:box [50 150 70 170]
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [65 155])
|
||||
(actions/walk-to entities :ego [65 155] :skip-type :end)
|
||||
(if (= :night (get-in @entities [:state :time]))
|
||||
(actions/talk entities :ego "It's locked.")
|
||||
(do (actions/transition-background entities :inside-cafeteria [319 55])
|
||||
@@ -375,7 +375,7 @@
|
||||
:antique-door {:box [154 90 189 150]
|
||||
:cursor :up
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [182 90] :face :left)
|
||||
(actions/walk-to entities :ego [182 90] :face :left :skip-type :end)
|
||||
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(if (= :night (get-in @entities [:state :time]))
|
||||
@@ -407,7 +407,7 @@
|
||||
(actions/talk entities :ego "Ye Ol' Antique Shoppe."))}
|
||||
:background-houses {:box [84 145 126 180]
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [79 145] :face :right :stop? false)
|
||||
(actions/walk-to entities :ego [79 145] :face :right :stop? false :skip-type :end)
|
||||
(actions/walk-straight-to entities :ego [92 150] :face :right)
|
||||
(actions/transition-background entities :outside-jail [159 -20])
|
||||
(actions/walk-straight-to entities :ego [159 20]))
|
||||
|
||||
@@ -133,10 +133,10 @@
|
||||
candle-aura (utils/make-anim (texture "inside-house/candle-aura.png") [27 27] 0.2 [0 1 2 3 2 1] )
|
||||
experiment-left (utils/flip (utils/make-anim (texture "wizard/experiment.png" ) [45 55] 0.075 [0 0 0 0 0 0 0 0 0 0 1 1 2 2 2 2 3 3 3 4 4 5 5 6 6 6 6 6 6 7 8 9 9 10 10 11 11 12 12 12 12 12 12 12 12 12 12 12 13 13 14 14 14 14 14 15 15 16 16 17 17 18 18 18 18 19 20 21 21 21 21 21 21 22 23 22 23 22 23 22 23 23 23 23 23 23 23 23 24 24 24 24 24 24 24 24 24 25 26 27 37 38 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 29 29 29 28 28 28 28 29 29 28 28 28 28 28 28 28 28 30 30 30 30 31 32 33 31 31 31 31 31 31 31 31 34 35 36 36 36 36 36 36 36 36 36] ))]
|
||||
(rooms/make :music :inside-fangald
|
||||
:interactions {:down-dir {:box [151 0 320 20]
|
||||
:interactions {:down-dir {:box [151 0 320 40]
|
||||
:script (actions/get-script entities
|
||||
(actions/update-state entities #(assoc % :wizard-left? false))
|
||||
(actions/walk-to entities :ego [237 1])
|
||||
(actions/walk-to entities :ego [237 1] :stop? false :skip-type :end)
|
||||
(actions/walk-straight-to entities :ego [245 -60])
|
||||
(actions/transition-background entities :outside-house [257 90] :face :left))
|
||||
:cursor :down}
|
||||
|
||||
@@ -241,13 +241,13 @@
|
||||
(defn go-through-gate [entities]
|
||||
(if (should-block? entities)
|
||||
(do
|
||||
(actions/walk-to entities :ego [82 180] :face :left)
|
||||
(actions/walk-to entities :ego [82 180] :face :left :skip-type :end)
|
||||
(block-entrance entities))
|
||||
(do
|
||||
(actions/walk-to entities :ego [82 180])
|
||||
(actions/walk-to entities :ego [82 180] :skip-type :end :stop? false)
|
||||
(actions/walk-straight-to entities :ego [61 182])
|
||||
(actions/transition-background entities :inside-castle [295 145])
|
||||
(actions/walk-to entities :ego [245 90]))))
|
||||
(actions/walk-to entities :ego [245 90] :skip-type :end))))
|
||||
|
||||
|
||||
(defn add-note-if-necessary [entities]
|
||||
@@ -280,12 +280,12 @@
|
||||
flies-stand (utils/make-anim "outside-castle/flies.png" [15 15] 0.075 (flatten (repeat 2 [0 1 2 1])))]
|
||||
(rooms/make :music {:day :town-2 :night :night :sunrise :night}
|
||||
:interactions
|
||||
{:right-dir {:box [300 40 320 140]
|
||||
{:right-dir {:box [280 40 320 140]
|
||||
:script (actions/get-script
|
||||
entities
|
||||
(actions/walk-to entities :ego [310 80])
|
||||
(actions/walk-to entities :ego [310 80] :stop? false :skip-type :end)
|
||||
(actions/walk-straight-to entities :ego [340 80])
|
||||
(actions/transition-background entities :outside-house [0 80])
|
||||
(actions/transition-background entities :outside-house [-10 80])
|
||||
(actions/walk-straight-to entities :ego [30 80]))
|
||||
:cursor :right}
|
||||
:door {:box [66 180 85 195]
|
||||
|
||||
@@ -42,13 +42,12 @@
|
||||
|
||||
|
||||
|
||||
(defn walk-to-castle [entities dawn?]
|
||||
(actions/walk-to entities :ego [0 80])
|
||||
(defn walk-to-castle [entities]
|
||||
(actions/walk-to entities :ego [0 80] :skip-type :end)
|
||||
(actions/walk-straight-to entities :ego [-20 80])
|
||||
(if dawn?
|
||||
(actions/transition-background entities :outside-castle [330 80])
|
||||
(actions/transition-background entities :outside-castle [330 80]))
|
||||
(actions/walk-straight-to entities :ego [310 80]))
|
||||
(actions/transition-background entities :outside-castle [330 80])
|
||||
(actions/walk-straight-to entities :ego [319 80] :stop? false)
|
||||
(actions/walk-to entities :ego [273 81] :skip-type :end))
|
||||
|
||||
(def ego-sheep-loc
|
||||
[132 140])
|
||||
@@ -67,7 +66,7 @@
|
||||
(not (actions/has-item? entities :money))))
|
||||
|
||||
(defn walk-to-sheep [entities]
|
||||
(actions/walk-to entities :ego [154 133])
|
||||
(actions/walk-to entities :ego [154 133] :skip-type :end)
|
||||
(actions/walk-straight-to entities :ego [119 134] :update-baseline? false))
|
||||
|
||||
(defn leave-sheep [entities]
|
||||
@@ -118,7 +117,7 @@
|
||||
:ego "And just in time, too. It's getting light.")
|
||||
|
||||
(actions/update-state entities #(assoc % :next-time :sunrise :seen-bloodclot? false))
|
||||
(walk-to-castle entities true)
|
||||
(walk-to-castle entities)
|
||||
(outside-castle/go-through-gate entities)
|
||||
(actions/update-state entities #(assoc % :next-time :day))
|
||||
(inside-castle/walk-to-blergh entities)
|
||||
@@ -557,7 +556,7 @@
|
||||
:script
|
||||
(actions/get-script
|
||||
entities
|
||||
(actions/walk-to entities :ego [257 90] :face :right)
|
||||
(actions/walk-to entities :ego [257 90] :face :right :skip-type :end)
|
||||
(actions/talk entities :ego (str "Anyone home?"))
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(if (= :night (get-in @entities [:state :time]))
|
||||
@@ -580,21 +579,21 @@
|
||||
:right-dir {:box [220 141 320 204]
|
||||
:script (actions/get-script
|
||||
entities
|
||||
(actions/walk-to entities :ego [244 150])
|
||||
(actions/walk-to entities :ego [244 150] :skip-type :end)
|
||||
(actions/transition-background entities :behind-house [122 140])
|
||||
(actions/walk-to entities :ego [172 122]))
|
||||
:cursor :right}
|
||||
:up-dir {:box [105 180 203 240]
|
||||
:script (actions/get-script
|
||||
entities
|
||||
(actions/walk-to entities :ego [137 204])
|
||||
(actions/walk-to entities :ego [137 204] :skip-type :end)
|
||||
(actions/transition-background entities :cat-tree [223 -51])
|
||||
(actions/walk-straight-to entities :ego [200 10]))
|
||||
:cursor :up}
|
||||
:left-dir {:box [0 40 20 140]
|
||||
:left-dir {:box [0 40 40 140]
|
||||
:script (actions/get-script
|
||||
entities
|
||||
(walk-to-castle entities false))
|
||||
(walk-to-castle entities))
|
||||
:cursor :left}}
|
||||
:layers {:day [(assoc (texture "outsidehouse/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "outsidehouse/house.png") :x 0 :y 0 :baseline 122)
|
||||
|
||||
@@ -108,18 +108,17 @@
|
||||
(rooms/make :music {:day :town-1 :night :night}
|
||||
:interactions {:down-dir {:box [30 0 227 20]
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [159 5])
|
||||
(actions/walk-to entities :ego [159 5] :skip-type :end :stop? false)
|
||||
(actions/walk-straight-to entities :ego [159 -20])
|
||||
(actions/transition-background entities :inside-castle [92 150])
|
||||
(actions/walk-straight-to entities :ego [79 145] :stop? false)
|
||||
(actions/walk-to entities :ego [159 74]))
|
||||
(actions/walk-to entities :ego [159 74] :skip-type :end))
|
||||
:cursor :down}
|
||||
:door {:box [22 42 46 124]
|
||||
:script (actions/get-script entities
|
||||
(if (= :night (get-in @entities [:state :time]))
|
||||
(actions/talk entities :ego "I do NOT want to go back in there!")
|
||||
(do (actions/walk-to entities :ego [50 46])
|
||||
(actions/play-animation entities :ego :idea)
|
||||
(actions/talk entities :warden "NO VISITORS!"))))}
|
||||
:window {:box [62 175 80 212]
|
||||
:script (actions/get-script entities
|
||||
|
||||
Reference in New Issue
Block a user