Autosaving
This commit is contained in:
@@ -15,11 +15,11 @@
|
||||
:success (actions/get-script entities
|
||||
(actions/talk entities :ego "Yes! That worked.")
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/give entities items/recipe)
|
||||
(actions/give entities :recipe)
|
||||
(actions/talk entities :ego "I found a recipe for a strength potion!")
|
||||
(actions/talk entities :ego "Looks like there's something else in here too...")
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/give entities items/frog-legs)
|
||||
(actions/give entities :frog-legs)
|
||||
(actions/talk entities :ego "Eww. Frog legs."))
|
||||
:failure (actions/get-script entities
|
||||
(actions/talk entities :ego "I don't think that worked...")))
|
||||
@@ -78,13 +78,13 @@
|
||||
:x 265 :y 80 :baseline 240
|
||||
:script (actions/get-script entities
|
||||
(actions/remove-entity entities :flask)
|
||||
(actions/give entities items/flask-1)
|
||||
(actions/give entities :flask-1)
|
||||
(actions/do-dialogue entities :ego "Hey you think I could have this flask?"
|
||||
:wizard "Sure.")))}
|
||||
:collision "inside-house/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.75)
|
||||
:apply-state (fn [entities]
|
||||
(as-> entities entities
|
||||
(if (actions/has-one-of? entities [items/flask-1 items/flask-1-with-cream-of-mushroom items/flask-1-strength items/flask-1-with-mushrooms items/flask-1-with-milk])
|
||||
(if (actions/has-one-of? entities [:flask-1 :flask-1-with-cream-of-mushroom :flask-1-strength :flask-1-with-mushrooms :flask-1-with-milk])
|
||||
(update-in entities [:room :entities] #(dissoc % :flask))
|
||||
entities))))))
|
||||
|
||||
Reference in New Issue
Block a user