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

@@ -43,7 +43,7 @@
(get-in entities [:room :interactions]))))
(defn open-inventory [screen entities]
(screen! inventory-screen :show-screen :items (get-in entities [:state :inventory]))
(screen! inventory-screen :show-screen :items (map (entities :all-items) (get-in entities [:state :inventory])))
(assoc-in entities [:state :active?] false))
@@ -150,12 +150,12 @@
((zone/box (- entity-x half-width) entity-y (+ entity-x half-width) (+ entity-y height)) x y)))
:get-script (fn [cursor [x y]]
(condp = cursor
items/flask-1-with-cream-of-mushroom (actions/get-script entities (actions/talk entities :ego "Blegh! Gross!"))
items/flask-1-strength (actions/get-script entities
(condp = (:value cursor)
:flask-1-with-cream-of-mushroom (actions/get-script entities (actions/talk entities :ego "Blegh! Gross!"))
:flask-1-strength (actions/get-script entities
(actions/talk entities :ego "I'll just take a sip!")
(actions/play-animation entities :ego :grow :stop? false))
items/recipe (actions/get-script entities (actions/do-dialogue entities
:recipe (actions/get-script entities (actions/do-dialogue entities
:ego "The recipe says:"
:ego "'For strength beyond measure,'"
:ego "'you must mix, at your leisure:'"
@@ -210,7 +210,7 @@
(utils/load)
{:object nil
:active? true
:inventory [items/grass items/carrot]
:inventory [:grass :carrot]
:clues #{}
:mints-eaten 0}))
(defscreen scene
@@ -242,6 +242,7 @@
:current :main
:last :main
:override nil}
:all-items (assoc items/items :object nil)
:room (assoc-in (:outside-house rooms)
[:entities :ego] (get-ego screen))
:inventory (assoc (texture "inventory.png") :x 278 :y 0 :baseline 9000