From 6c1e7bfafd38dcfb3c550e7acae6954526fb4b1f Mon Sep 17 00:00:00 2001 From: Remington Covert Date: Thu, 16 Oct 2014 20:56:32 -0700 Subject: [PATCH] you can make cream of mushroom. --- desktop/src-common/advent/screens/items.clj | 12 ++++++++---- .../advent/screens/rooms/outside_house.clj | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/desktop/src-common/advent/screens/items.clj b/desktop/src-common/advent/screens/items.clj index 3a53a998..c03b600e 100644 --- a/desktop/src-common/advent/screens/items.clj +++ b/desktop/src-common/advent/screens/items.clj @@ -8,11 +8,15 @@ (def flask-1-with-mushrooms {:name "Flask with mushrooms" :value :flask-1-with-mushrooms :cursor :flask-with-contents}) (def flask-1-with-cream-of-mushroom {:name "Flask with cream of mushrooms soup" :value :flask-1-with-cream-of-mushroom :cursor :flask-with-contents}) + +(defn make-cream-of-mushroom-from [from] + (actions/get-script entities + (actions/remove-item entities from) + (actions/give entities flask-1-with-cream-of-mushroom) + (actions/talk entities :ego "It's just like cream of mushroom soup."))) + (def flask-1-with-milk {:name "Flask with milk" :value :flask-1-with-milk :cursor :flask-with-contents - :scripts {mushrooms (actions/get-script entities - (actions/remove-item entities flask-1-with-milk) - (actions/give entities flask-1-with-cream-of-mushroom) - (actions/talk entities :ego "It's just like cream of mushroom soup."))}}) + :scripts {mushrooms (make-cream-of-mushroom-from flask-1-with-milk)}}) (def flask-1-strength {:name "Strength potion" :value :flask-1-strength :cursor :flask-with-contents}) (def flask-1 {:name "Flask" :value :flask-1 :cursor :flask diff --git a/desktop/src-common/advent/screens/rooms/outside_house.clj b/desktop/src-common/advent/screens/rooms/outside_house.clj index 234f37e3..9f09dd98 100644 --- a/desktop/src-common/advent/screens/rooms/outside_house.clj +++ b/desktop/src-common/advent/screens/rooms/outside_house.clj @@ -183,7 +183,8 @@ (actions/remove-item entities items/flask-1) (actions/give entities items/flask-1-with-milk) (actions/talk entities :ego "Sheeps milk.")) - (actions/talk entities :ego "She's too far away.")))} + (actions/talk entities :ego "She's too far away."))) + items/flask-1-with-mushrooms (items/make-cream-of-mushroom-from items/flask-1-with-mushrooms)} :left {:walk (utils/flip sheep-walk) :stand (utils/flip sheep-stand)} :right {:walk sheep-walk