implemented library of items.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
(ns advent.screens.rooms.outside-castle
|
||||
(:require [advent.screens.rooms :as rooms]
|
||||
(:require [advent.screens.items :as items]
|
||||
[advent.screens.rooms :as rooms]
|
||||
[advent.actions :as actions]
|
||||
[advent.utils :as utils]
|
||||
[clojure.zip :as zip]
|
||||
@@ -31,12 +32,12 @@
|
||||
:garden {:box [103 170 178 200]
|
||||
:script (actions/get-script
|
||||
entities
|
||||
(if ((get-in @entities [:state :inventory]) :carrot)
|
||||
(if (actions/has-item? @entities items/carrot)
|
||||
(actions/talk entities :ego "If I steal any more, I might get caught.")
|
||||
(do
|
||||
(actions/walk-to entities :ego [128 180])
|
||||
(actions/talk entities :ego "Hey! Carrots. No one will notice one missing.")
|
||||
(actions/give entities :carrot))))}
|
||||
(actions/give entities items/carrot))))}
|
||||
:peddler {:box [110 90 128 146]
|
||||
:script (actions/get-script
|
||||
entities
|
||||
|
||||
Reference in New Issue
Block a user