more scripting.
This commit is contained in:
@@ -132,12 +132,16 @@
|
||||
|
||||
(defn find-override [entities [x y]]
|
||||
(first (concat (filter #(and ((:mouse-in? %) entities x y)
|
||||
|
||||
(:override %))
|
||||
(get-in entities [:room :interactions]))
|
||||
(filter #(and (:mouse-in? %)
|
||||
((:mouse-in? %) entities x y))
|
||||
((:mouse-in? %) entities x y)
|
||||
(not= "ego" (:id %))
|
||||
(:script %))
|
||||
(vals (get-in entities [:room :entities])))
|
||||
(filter #(and ((:mouse-in? %) entities x y))
|
||||
(filter #(and ((:mouse-in? %) entities x y)
|
||||
(:script %))
|
||||
(get-in entities [:room :interactions])))))
|
||||
|
||||
|
||||
@@ -209,6 +213,6 @@
|
||||
(let [last-pos (unproject screen (get-in entities [:cursor :last-pos]))]
|
||||
(if (get-in entities [:state :active?])
|
||||
(if-let [mouse-override (find-override entities last-pos)]
|
||||
(assoc-in entities [:cursor :override] (or (:cursor mouse-override) :active-main))
|
||||
(assoc-in entities [:cursor :override] (or (:cursor mouse-override) (when (#{:main :active-main} (get-in entities [:cursor :last])) :active-main)))
|
||||
(assoc-in entities [:cursor :override] nil))
|
||||
entities)))
|
||||
|
||||
Reference in New Issue
Block a user