removing stuff that needs to go away at night.

This commit is contained in:
2014-12-27 23:26:10 -08:00
parent e6055f6941
commit bc55fa4c28
5 changed files with 84 additions and 37 deletions

View File

@@ -148,6 +148,10 @@
", but still have to prove myself in "
(str/join " and " (map item->proof missing-items))
".")))))
(defn make-night [entities]
(update-in entities [:room :entities] #(dissoc % :game-player)))
(defn make [screen]
(let [game-player-talk-sheet (texture! (texture "inside-castle/game-player-talk.png") :split 40 44)
game-player-talk (animation 0.15 (for [i [0 2 0 2 0 2 0 3 0 2 0 1 0 0 0 0 2 0 2 0 3 0 1 0 1 0 0 1 0 2 0 3 0]]
@@ -170,8 +174,10 @@
:up-door {:box [50 150 70 170]
:script (actions/get-script entities
(actions/walk-to entities :ego [65 155])
(actions/transition-background entities :inside-cafeteria [319 55])
(actions/walk-to entities :ego [300 55]))
(if (= :night (get-in @entities [:state :time]))
(actions/talk entities :ego "It's locked.")
(do (actions/transition-background entities :inside-cafeteria [319 55])
(actions/walk-to entities :ego [300 55]))))
:cursor :up}
:antique-door {:box [154 90 189 150]
:cursor :up
@@ -179,14 +185,16 @@
(actions/walk-to entities :ego [182 90] :face :left)
(sound! (sound "door.ogg") :play)
(actions/play-animation entities :ego :reach)
(actions/transition-background entities :inside-antique [228 -30])
(actions/walk-straight-to entities :ego [222 15] :face :left)
(if (get-in @entities [:state :allowed-to-keep-teddy?])
(actions/do-dialogue entities :shopkeep "Hello there, sonny."
:shopkeep "Have you seen Herb lately?"
:ego "Erm... No, not recently."
:shopkeep "Oh. Send him my love if you do see him.")
(actions/talk entities :shopkeep "Hello there, sonny.")))}
(if (= :night (get-in @entities [:state :time]))
(actions/talk entities :ego "It's locked.")
(do (actions/transition-background entities :inside-antique [228 -30])
(actions/walk-straight-to entities :ego [222 15] :face :left)
(if (get-in @entities [:state :allowed-to-keep-teddy?])
(actions/do-dialogue entities :shopkeep "Hello there, sonny."
:shopkeep "Have you seen Herb lately?"
:ego "Erm... No, not recently."
:shopkeep "Oh. Send him my love if you do see him.")
(actions/talk entities :shopkeep "Hello there, sonny.")))))}
:sword {:box [0 130 39 165]
:script (actions/get-script entities
(if (actions/has-item? entities :sword)
@@ -320,5 +328,8 @@
entities)
(if (actions/has-item? entities :sword)
(update-in entities [:room :entities] #(dissoc % :sword))
entities)
(if (= :night (get-in entities [:state :time]))
(make-night entities)
entities)))
:start-pos [245 90])))