openable chest.

This commit is contained in:
2015-07-27 23:02:00 -07:00
parent 81acc4f229
commit 3148689156
7 changed files with 28 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -33,12 +33,19 @@
(cond
(not (chest-full? entities))
(do (actions/walk-to entities :ego [192 66] :face :right)
(actions/play-animation entities :ego :reach)
(actions/do-dialogue entities :ego "It's empty now."))
(actions/play-animation entities :ego :reach-start :stop? false)
(actions/play-animation entities :chest-top :open)
(actions/play-animation entities :ego :reach-stop)
(actions/do-dialogue entities :ego "It's empty now.")
(actions/play-animation entities :ego :reach-start :stop? false)
(actions/play-animation entities :chest-top :close)
(actions/play-animation entities :ego :reach-stop))
(get-in @entities [:state :opened-bars?])
(do (actions/walk-to entities :ego [192 66] :face :right)
(actions/play-animation entities :ego :reach)
(actions/play-animation entities :ego :reach-start :stop? false)
(actions/play-animation entities :chest-top :open)
(actions/play-animation entities :ego :reach-stop)
(actions/do-dialogue entities
:ego "Hey!"
:ego "All my possessions are in here!")
@@ -47,7 +54,11 @@
(assoc :chest-contents [])))
(when (not (actions/has-obtained? entities :rope))
(actions/give entities :rope)
(actions/do-dialogue entities :ego "Looks like there's some rope in here too.")))
(actions/do-dialogue entities :ego "Looks like there's some rope in here too."))
(actions/play-animation entities :ego :reach-start :stop? false)
(actions/play-animation entities :chest-top :close)
(actions/play-animation entities :ego :reach-stop)
)
:else
(do (actions/walk-to entities :ego [179 81] :face :right)
@@ -156,6 +167,7 @@
(do (actions/talk entities :ego "One more try.")
(actions/play-animation entities :ego :squat)
(actions/play-animation entities :ego :sigh)
(actions/do-dialogue entities
:ego "You know, in some games, you have to try multiple times."
:ego "But I have a feeling each time you click on this hay, I'm going to find nothing."
@@ -169,12 +181,14 @@
(actions/walk-to entities :ego [279 57])
(if (chest-full? entities)
(actions/talk entities :ego "I probably shouldn't leave without my belongings.")
(do (actions/transition-background entities :outside-jail [50 46] )
(do (actions/transition-background entities :outside-jail [50 46] :face :right)
(when (not (get-in @entities [:state :dropped-ball?]))
(actions/do-dialogue entities :ego "Yes I made it!"
:guard "Hmm?"
:guard "Halt! Thou art under arrest!"
:guard "Thou wilst be putteth back into thy cell.")
(actions/play-animation entities :ego :sigh)
(common/go-to-jail entities)
(actions/do-dialogue entities :ego "Dang! I was so close to freedom, I could taste it!")))))
(actions/talk entities :ego "Do you really think I can walk down those steps while I'm locked up?")))
@@ -207,7 +221,9 @@
(actions/walk-to entities :ego [102 88] :face :right)
(actions/do-dialogue entities
:ego "What a peaceful night."
:ego "Oh my sweet Georgia McGorgeous. How will I ever save you now?"
:ego "Oh my sweet Georgia McGorgeous. How will I ever save you now?")
(actions/in-love entities)
(actions/do-dialogue entities
:ego "I have to find a way out of here!"))
:scripts {:crowbar (actions/get-script entities
(if (get-in @entities [:state :bent-bars?])
@@ -305,6 +321,12 @@
:ego "That's pretty gruesome."
:ego "I can't kill him just for doing his job."))
:rope (actions/get-script entities (tie-up-warden entities))})
:chest-top (assoc (texture "inside-jail/chest-top.png")
:x 193 :y (- 240 165) :baseline 166
:origin-x 0 :origin-y 0
:night-profile :none
:open (animation 0.8 [(texture "inside-jail/chest-top-open.png")])
:close (animation 0.8 [(texture "inside-jail/chest-top.png")]))
:ball-n-chain (assoc (texture "inside-jail/ball-n-chain.png")
:x 80 :y 80 :baseline 160
:night-profile :none