fixed using inventory.
This commit is contained in:
@@ -128,7 +128,7 @@
|
|||||||
(actions/talk entities :ego "I don't want to put something in there unless I'm sure I need to."))))
|
(actions/talk entities :ego "I don't want to put something in there unless I'm sure I need to."))))
|
||||||
|
|
||||||
(defn wizard-dialogue [entities]
|
(defn wizard-dialogue [entities]
|
||||||
(actions/do-dialogue entities :ego "Hello there [RED]Gandarf[]!" :wizard "Oh no, not you again!")
|
(actions/do-dialogue entities :ego "Hello there Gandarf!" :wizard "Oh no, not you again!")
|
||||||
(actions/present-choices entities
|
(actions/present-choices entities
|
||||||
{:choices ["What do you mean, \"Not you again?\""
|
{:choices ["What do you mean, \"Not you again?\""
|
||||||
{:run #(actions/respond entities % :wizard "I mean, you've wrecked my life and I never want to see you again.")
|
{:run #(actions/respond entities % :wizard "I mean, you've wrecked my life and I never want to see you again.")
|
||||||
|
|||||||
@@ -75,10 +75,14 @@
|
|||||||
(println "clicked " x y)
|
(println "clicked " x y)
|
||||||
(let [interaction (first (filter #((:mouse-in? %) entities x y)
|
(let [interaction (first (filter #((:mouse-in? %) entities x y)
|
||||||
(get-in entities [:room :interactions])))
|
(get-in entities [:room :interactions])))
|
||||||
interacting-entity (first (sort-by (comp - :baseline) (filter #(and (:mouse-in? %)
|
interactable-entities (if (= (doto (get-in entities [:cursor :current]) println) :main)
|
||||||
|
(vals (dissoc (get-in entities [:room :entities]) :ego))
|
||||||
|
(vals (get-in entities [:room :entities])))
|
||||||
|
interacting-entity (first (sort-by (comp - :baseline)
|
||||||
|
(filter #(and (:mouse-in? %)
|
||||||
(:get-script %)
|
(:get-script %)
|
||||||
((:mouse-in? %) entities x y))
|
((:mouse-in? %) entities x y))
|
||||||
(vals (dissoc (get-in entities [:room :entities]) :ego)))))
|
interactable-entities)))
|
||||||
current-action (get-in entities [:actions :current])
|
current-action (get-in entities [:actions :current])
|
||||||
|
|
||||||
;; TODO - hacky way of resetting queue
|
;; TODO - hacky way of resetting queue
|
||||||
|
|||||||
Reference in New Issue
Block a user