implemented library of items.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
(ns advent.screens.rooms.behind-house
|
||||
(:require [advent.screens.rooms :as rooms]
|
||||
[advent.screens.items :as items]
|
||||
[advent.actions :as actions]
|
||||
[advent.utils :as utils]
|
||||
[clojure.zip :as zip]
|
||||
@@ -28,11 +29,11 @@
|
||||
:mushrooms {:box [247 59 269 76]
|
||||
:script (actions/get-script
|
||||
entities
|
||||
(if ((get-in @entities [:state :inventory]) :mushrooms)
|
||||
(if (actions/has-item? @entities items/mushrooms)
|
||||
(actions/talk entities :ego "I've already got a junk ton of mushrooms.")
|
||||
(do
|
||||
(actions/walk-to entities :ego [242 75])
|
||||
(actions/give entities :mushrooms)
|
||||
(actions/give entities items/mushrooms)
|
||||
(actions/talk entities :ego "Perfectly ripe mushrooms!"))))}
|
||||
:window {:box [103 44 130 140]
|
||||
:script (actions/get-script
|
||||
|
||||
Reference in New Issue
Block a user