more updates.

This commit is contained in:
Bryce Covert
2016-08-15 07:56:39 -07:00
parent d1106b5903
commit 2a0d6bcb28
25 changed files with 579 additions and 298 deletions

View File

@@ -121,6 +121,7 @@
:warden "Be a good chap and let me rest.")
(actions/play-animation entities :warden :fall-asleep :stop? false)
(actions/begin-animation entities :warden :sleep)
(actions/update-state entities (fn [s] (assoc s :warden-sleeping? true))))}]}))
(defn get-key [ entities]
@@ -236,12 +237,16 @@
}
:interactions {
:lock {:box [172 102 190 124]
:label "Lock"
:cursor :hand
:script (actions/get-script entities
(actions/walk-to entities :ego [174 80] :face :right)
(actions/play-animation entities :ego :reach)
(actions/talk entities :ego "There's no helping it. It's locked."))
:scripts {:key (actions/get-script entities (open-lock entities))}}
:window {:box [98 110 118 140]
:label "Window"
:cursor :look
:script (actions/get-script entities
(actions/walk-to entities :ego [102 88] :face :right)
(actions/do-dialogue entities
@@ -318,6 +323,8 @@
:ego "The door locks without a key."
:ego "If I get caught, I won't be able to get out."))}}
:hay {:box [130 86 177 102]
:label "Hay"
:cursor :hand
:script (actions/get-script entities
(search-hay entities))
:scripts {:default (actions/get-script entities
@@ -327,6 +334,8 @@
(actions/do-dialogue entities :ego "I'm trying to escape."
:ego "Not help the next bloke who gets trapped here."))}}
:chest {:box [194 62 228 99]
:label "Chest"
:cursor :hand
:script (actions/get-script entities (touch-chest entities))
:scripts {:key (actions/get-script entities
(if (get-in @entities [:state :opened-bars?])
@@ -338,7 +347,7 @@
(actions/talk entities :ego "Not while I'm in this cell.")))}}
:door {:box [257 62 301 152]
:cursor :down
:script (actions/get-script entities (leave entities))}
:only-script (actions/get-script entities (leave entities))}
}
:layers [(assoc (utils/get-texture "inside-jail/background.png") :x 0 :y 0 :baseline 0 :night-profile :none)
@@ -383,6 +392,8 @@
18 [:blink 0.15]}
warden-sleep {0 [:inhale 0.1]
10 [:exhale 0.1]}}
:label "Warden"
:cursor :talk
:script (actions/get-script entities
(cond
(actions/has-item? entities :key) (actions/talk entities :ego "Shh! It's best not to wake him now.")
@@ -391,6 +402,7 @@
(actions/do-dialogue entities
:ego "Yoo-hoo! Mr. Warden?"
:ego "I guess he's really fast asleep!")
(actions/update-entities entities (fn [e] (assoc-in e [:room :entities :warden :cursor] :hand)))
(actions/update-state entities #(assoc % :warden-fast-asleep? true)))
:else (do (actions/walk-to entities :ego [103 82])
@@ -409,6 +421,8 @@
:ball-n-chain (assoc (utils/get-texture "inside-jail/ball-n-chain.png")
:x 80 :y 80 :baseline 160
:night-profile :none
:label "Ball-n-chain"
:cursor :hand
:script (actions/get-script entities
(actions/walk-to entities :ego [103 83] :face :left)
(actions/play-animation entities :ego :squat)
@@ -424,6 +438,8 @@
:night-profile :none)
:candle-aura (assoc (animation->texture screen candle-aura) :x 215 :y 130 :baseline 2
:additive? true :origin-x 13 :origin-y 13 :opacity 0.5 :anim candle-aura :anim-start 0 :night-profile :none
:label "Candle"
:cursor :look
:script (actions/get-script entities (actions/talk entities :ego "Just a candle."))
:scripts {:default (actions/get-script entities (actions/talk entities :ego "I might catch the place on fire."))})
:candle-smoke (doto (assoc (particle-effect "particles/candle") :x 215 :y 130
@@ -435,6 +451,8 @@
:x 300 :y 60 :baseline 175
:night-profile :none
:label "Crowbar"
:cursor :hand
:script (actions/get-script entities
(if (get-in @entities [:state :opened-bars?])
(do (actions/walk-to entities :ego [295 55] :face :right)
@@ -460,8 +478,10 @@
(if (actions/has-obtained? entities :crowbar)
(update-in entities [:room :entities] #(dissoc % :crowbar))
entities)
(if (get-in entities [:state :warden-sleeping?])
(update-in entities [:room :entities :warden] #(actions/start-animation % :sleep))
(if (get-in entities [:state :warden-fast-asleep?])
(-> entities
(update-in [:room :entities :warden] #(actions/start-animation % :sleep))
(update-in [:room :entities :warden] assoc :cursor :hand))
entities)
(if (get-in entities [:state :opened-bars?])
(update-in (remove-lock entities)