Autosaving

This commit is contained in:
2014-11-22 13:57:05 -08:00
parent 54b1f1497a
commit 919871ddc3
11 changed files with 100 additions and 60 deletions

View File

@@ -14,7 +14,7 @@
(actions/play-animation entities :ego :reach)
(actions/remove-entity entities :blank)
(actions/remove-entity entities :ladder)
(actions/give entities items/ladder))
(actions/give entities :ladder))
(defn make [screen]
(let [cat-stand-sheet (texture! (texture "cat-tree/cat-stand.png") :split 22 10)
@@ -34,7 +34,7 @@
(actions/talk entities :ego "I'll just set this up.")
(actions/walk-to entities :ego [151 50] :face :left)
(actions/play-animation entities :ego :reach)
(actions/remove-item entities items/ladder)
(actions/remove-item entities :ladder)
(actions/add-entity entities :ladder ladder-entity)
(actions/walk-straight-to entities :ego [140 85] :face :right :update-baseline? false)
(actions/add-entity entities :blank (rooms/make-entity :blank
@@ -60,13 +60,13 @@
(actions/remove-entity entities :cat)
(get-down entities)
(actions/talk entities :ego "TODO: get award from little old lady in this room")
(actions/give entities items/certificate))
(actions/give entities :certificate))
(actions/talk entities :ego "I guess I'm too far away.")))})
cat-stand)}
:collision "cat-tree/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20)
:apply-state (fn [entities]
(as-> entities entities
(if (actions/has-item? entities items/certificate)
(if (actions/has-item? entities :certificate)
(update-in entities [:room :entities] #(dissoc % :cat))
entities))))))