can open jail.
This commit is contained in:
@@ -1 +0,0 @@
|
||||
2000
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 21 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 19 KiB |
@@ -22,7 +22,8 @@
|
||||
(if (= :main cursor)
|
||||
(:script spec)
|
||||
(when-let [scripts (:scripts spec)]
|
||||
(scripts (:value cursor)))))}))
|
||||
(scripts (:value cursor)))))
|
||||
:id id}))
|
||||
entities (into {} (for [[id entity] entities]
|
||||
[id (make-entity id entity)]))]
|
||||
(merge params {:collision (advent.pathfind/map-from-resource collision)
|
||||
|
||||
@@ -90,6 +90,10 @@
|
||||
:ego "Maybe you should give it a rest.")))
|
||||
(actions/update-state entities #(assoc % :hay-searches (inc hay-searches)))))
|
||||
|
||||
(defn remove-lock [entities]
|
||||
(update-in entities [:room :interactions]
|
||||
(fn [i] (remove #(= :lock (:id %)) i))))
|
||||
|
||||
(defn make [screen]
|
||||
(let [warden-sheet (texture! (texture "inside-jail/warden.png") :split 43 58)
|
||||
warden-talk (animation 0.2 (for [i [1 0 1 0 1 0 1 0 0 0 2 0]]
|
||||
@@ -110,7 +114,10 @@
|
||||
:scripts {:key (actions/get-script entities
|
||||
(actions/walk-to entities :ego [174 80] :face :right)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/talk entities :ego "Yes, that's it!"))}}
|
||||
(actions/talk entities :ego "Yes, that's it!")
|
||||
(actions/walk-straight-to entities :moveable-bars [60 77])
|
||||
(actions/update-entities entities #(remove-lock %))
|
||||
(actions/update-state entities #(assoc % :opened-bars? true)))}}
|
||||
:window {:box [98 110 118 140]
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [102 88] :face :right)
|
||||
@@ -120,8 +127,7 @@
|
||||
:ego "I have to find a way out of here!"))}
|
||||
:hay {:box [130 86 177 102]
|
||||
:script (actions/get-script entities
|
||||
(search-hay entities)
|
||||
)}}
|
||||
(search-hay entities))}}
|
||||
: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)]
|
||||
@@ -152,7 +158,9 @@
|
||||
(actions/walk-to entities :ego [103 83] :face :left)
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/remove-entity entities :ball-n-chain)
|
||||
(actions/give entities :ball-n-chain)))}
|
||||
(actions/give entities :ball-n-chain)))
|
||||
:moveable-bars (assoc (texture "inside-jail/moveable-bars.png")
|
||||
:x 132 :y 77 :baseline 163)}
|
||||
:collision "inside-jail/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 0 0.50 1.5)
|
||||
:start-pos [130 85]
|
||||
@@ -163,4 +171,7 @@
|
||||
entities)
|
||||
(if (get-in entities [:state :warden-sleeping?])
|
||||
(update-in entities [:room :entities :warden] #(actions/start-animation % :sleep))
|
||||
entities)
|
||||
(if (get-in entities [:state :opened-bars?])
|
||||
(remove-lock entities)
|
||||
entities))))))
|
||||
|
||||
Reference in New Issue
Block a user