adding cursors everywhere!

This commit is contained in:
Bryce Covert
2016-08-11 21:28:56 -07:00
parent 626eb12f98
commit 6f24840998

View File

@@ -224,6 +224,7 @@
:ego "Thanks, I guess."))
(defn make-ladder-area [box]
{:box box
:cursor :hand
:script (actions/get-script entities
(actions/walk-to entities :ego [144 58] )
(actions/talk entities :ego "Maybe I can climb it!")
@@ -275,22 +276,23 @@
(get-down entities)))})
:interactions
{:down-dir {:box [150 0 270 20]
:script (actions/get-script entities
(if (get-in @entities [:room :entities :ladder])
(do
(actions/talk entities :ego "I'll get down.")
(get-down entities)))
(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 [158 110] :skip-type :end))
:only-script (actions/get-script entities
(if (get-in @entities [:room :entities :ladder])
(do
(actions/talk entities :ego "I'll get down.")
(get-down entities)))
(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 [158 110] :skip-type :end))
:cursor :down}
:ladder-area-1 (make-ladder-area [123 100 167 199])
:ladder-area-2 (make-ladder-area [87 151 227 212])
:ladder-area-3 (make-ladder-area [133 69 205 92])
:rock {:box [62 83 101 103]
:cursor :hand
:script (actions/get-script entities
(when (and (actions/has-obtained? entities :note-1)
(not (actions/has-obtained? entities :walkie-talkies)))
@@ -310,6 +312,7 @@
(actions/talk entities :ego "Tin cans connected with string?")
(actions/do-dialogue entities :ego "I wonder what all of these magic devices do.")))}
:grass {:box [26 105 60 160]
:cursor :hand
:script (actions/get-script entities
(if (not (actions/has-obtained? entities :grass))
(do
@@ -320,6 +323,7 @@
:ego "It's a high protein variety."))
(actions/talk entities :ego "I don't really need any more grass.")))}
:grandma {:box [109 33 132 98]
:cursor :talk
:script (actions/get-script entities (do-grandma-dialogue entities))
:scripts #(condp = %
:kiss
@@ -330,71 +334,72 @@
(actions/do-dialogue entities :grandma "No thank you, handsome.")
(if (get-in @entities [:room :entities :ladder])
(actions/do-stop entities :ego :face :right))))
}}
}}
:layers {:day [(assoc (utils/get-texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
(assoc (utils/get-texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
(assoc (utils/get-texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
(assoc (utils/get-texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]
:night [(assoc (utils/get-texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
(assoc (utils/get-texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
(assoc (utils/get-texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
(assoc (utils/get-texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]}
(assoc (utils/get-texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
(assoc (utils/get-texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
(assoc (utils/get-texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]}
:entities {
:outside-particles (common/make-outside-particles)
:cat (actions/start-animation screen
(assoc (animation->texture screen cat-stand)
:x 184 :y 173 :baseline 1000
:walk cat-walk
:stand cat-stand
:script (actions/get-script entities
(actions/talk entities :ego "Here kitty, kitty, kitty.")
(actions/talk entities :ego "Kitty's so bored, he doesn't even notice me."))
:scripts {:cat-toy (actions/get-script entities
(actions/play-animation entities :ego :cat-toy)
(if (get-in @entities [:room :entities :ladder])
(do (actions/talk entities :ego "I think he's going for it!")
(actions/play-animation entities :ego :cat-toy-first-half :stop? false)
(actions/play-sound entities :cat 0.5)
(actions/walk-straight-to entities :cat [138 40] :update-baseline? false :speed 3)
(actions/play-animation entities :ego :cat-toy-last-half)
(actions/play-animation entities :grandma :squat-1 :stop? false)
(actions/remove-entity entities :cat)
(actions/play-animation entities :grandma :squat-2)
(actions/do-dialogue entities :grandma "Thank you for rescuing my furry friend, young man!")
(get-down entities true)
(actions/walk-straight-to entities :ego [165 45] :face :left)
(actions/do-dialogue entities
:ego "It's no big deal."
:grandma "You won't go unrewarded!"
:grandma "Come here, young man.")
(actions/walk-straight-to entities :ego [133 35])
(actions/talk entities :grandma "For your impressive display of courage and bravery, I give you this. ")
(assoc (animation->texture screen cat-stand)
:x 184 :y 173 :baseline 1000
:cursor :talk
:walk cat-walk
:stand cat-stand
:script (actions/get-script entities
(actions/talk entities :ego "Here kitty, kitty, kitty.")
(actions/talk entities :ego "Kitty's so bored, he doesn't even notice me."))
:scripts {:cat-toy (actions/get-script entities
(actions/play-animation entities :ego :cat-toy)
(if (get-in @entities [:room :entities :ladder])
(do (actions/talk entities :ego "I think he's going for it!")
(actions/play-animation entities :ego :cat-toy-first-half :stop? false)
(actions/play-sound entities :cat 0.5)
(actions/walk-straight-to entities :cat [138 40] :update-baseline? false :speed 3)
(actions/play-animation entities :ego :cat-toy-last-half)
(actions/play-animation entities :grandma :squat-1 :stop? false)
(actions/remove-entity entities :cat)
(actions/play-animation entities :grandma :squat-2)
(actions/do-dialogue entities :grandma "Thank you for rescuing my furry friend, young man!")
(get-down entities true)
(actions/walk-straight-to entities :ego [165 45] :face :left)
(actions/do-dialogue entities
:ego "It's no big deal."
:grandma "You won't go unrewarded!"
:grandma "Come here, young man.")
(actions/walk-straight-to entities :ego [133 35])
(actions/talk entities :grandma "For your impressive display of courage and bravery, I give you this. ")
(actions/play-sound entities :kiss 0.7)
(actions/play-animation entities :grandma :kiss)
(actions/play-animation entities :ego :get-sick :stop? false)
(actions/walk-straight-to entities :ego [165 45])
(actions/do-dialogue entities :ego
"Ugh! Gross!"
:ego "What's this?")
(actions/give entities :kiss)
(actions/do-dialogue entities :ego "A kiss for an inventory item?"
:ego "Sounds like the game designer was running out of good ideas.")
(steam/set-achievement "KITTY_KISS"))
(actions/talk entities :ego "I can't get his attention from way down here.")))
:stick (actions/get-script entities
(if (get-in @entities [:room :entities :ladder])
(do
(actions/play-animation entities :ego :poke)
(actions/do-dialogue entities
:ego "He's still too far for me to poke him."
:ego "Maybe I can encourage him to come down on his own."))
(do
(actions/walk-to entities :ego [210 58] :face :right)
(actions/play-animation entities :ego :poke)
(actions/talk entities :ego "I can't poke him from way down here."))))
:wool (actions/get-script entities (actions/talk entities :ego "I don't think the cat would notice the wool from all the way up there."))
:default (actions/get-script entities (actions/talk entities :ego "Kitty seems disinterested in it."))})
cat-stand)
(actions/play-animation entities :grandma :kiss)
(actions/play-animation entities :ego :get-sick :stop? false)
(actions/walk-straight-to entities :ego [165 45])
(actions/do-dialogue entities :ego
"Ugh! Gross!"
:ego "What's this?")
(actions/give entities :kiss)
(actions/do-dialogue entities :ego "A kiss for an inventory item?"
:ego "Sounds like the game designer was running out of good ideas.")
(steam/set-achievement "KITTY_KISS"))
(actions/talk entities :ego "I can't get his attention from way down here.")))
:stick (actions/get-script entities
(if (get-in @entities [:room :entities :ladder])
(do
(actions/play-animation entities :ego :poke)
(actions/do-dialogue entities
:ego "He's still too far for me to poke him."
:ego "Maybe I can encourage him to come down on his own."))
(do
(actions/walk-to entities :ego [210 58] :face :right)
(actions/play-animation entities :ego :poke)
(actions/talk entities :ego "I can't poke him from way down here."))))
:wool (actions/get-script entities (actions/talk entities :ego "I don't think the cat would notice the wool from all the way up there."))
:default (actions/get-script entities (actions/talk entities :ego "Kitty seems disinterested in it."))})
cat-stand)
:grandma (let [gma (assoc (animation->texture screen grandma-stand)
:x 130 :y 37 :baseline 200
:anim grandma-stand
@@ -425,6 +430,7 @@
:talk owl-talk
:puke owl-puke
:eye owl-eye
:cursor :talk
:talk-color (color 0.5 0.5 1.0 1.0)
:anim owl-stand
:anim-start 0
@@ -498,5 +504,5 @@
(if (= :night (get-in entities [:state :time]))
(make-night entities)
(utils/remove-interaction entities :rock)
)))
)))
:start-pos [200 10])))