made it easier to click on things.
This commit is contained in:
@@ -125,8 +125,10 @@
|
||||
(get-in entities [:room :interactions]))) )
|
||||
|
||||
(defn get-interacting-entity [entities x y]
|
||||
(let [interactable-entities (if (= (doto (get-selected-inventory-item)
|
||||
(#(log/info "clicked with " %)) ) :main)
|
||||
(let [interactable-entities (if (or (= (doto (get-selected-inventory-item)
|
||||
(#(log/info "clicked with " %)) )
|
||||
:main)
|
||||
(not (get-selected-inventory-item)))
|
||||
(vals (dissoc (get-in entities [:room :entities]) :ego))
|
||||
(vals (get-in entities [:room :entities])))
|
||||
interacting-entity (first (sort-by (comp - :baseline)
|
||||
@@ -149,6 +151,7 @@
|
||||
(skip-action screen entities)
|
||||
entities)]
|
||||
|
||||
(log/info "clicked interaction" interaction "entity" (:id interacting-entity))
|
||||
|
||||
(when (and (not (get-in entities [:fg-actions :script-running?])))
|
||||
((or (when (and (not (:override-cursor interaction))
|
||||
@@ -1489,8 +1492,9 @@
|
||||
|
||||
(defn get-selected-inventory-item []
|
||||
(let [{{:keys [state state-data]} :inv-fsm} (-> hud :entities deref)]
|
||||
(and (= state :selected)
|
||||
state-data)))
|
||||
(if (= state :selected)
|
||||
state-data
|
||||
nil)))
|
||||
|
||||
(defscreen demo
|
||||
:on-show
|
||||
|
||||
Reference in New Issue
Block a user