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."))))
|
||||
|
||||
(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
|
||||
{: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.")
|
||||
|
||||
@@ -75,10 +75,14 @@
|
||||
(println "clicked " x y)
|
||||
(let [interaction (first (filter #((:mouse-in? %) entities x y)
|
||||
(get-in entities [:room :interactions])))
|
||||
interacting-entity (first (sort-by (comp - :baseline) (filter #(and (:mouse-in? %)
|
||||
(:get-script %)
|
||||
((:mouse-in? %) entities x y))
|
||||
(vals (dissoc (get-in entities [:room :entities]) :ego)))))
|
||||
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 %)
|
||||
((:mouse-in? %) entities x y))
|
||||
interactable-entities)))
|
||||
current-action (get-in entities [:actions :current])
|
||||
|
||||
;; TODO - hacky way of resetting queue
|
||||
|
||||
Reference in New Issue
Block a user