more logging
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
[play-clj.ui :refer :all]
|
[play-clj.ui :refer :all]
|
||||||
[play-clj.utils :refer :all]
|
[play-clj.utils :refer :all]
|
||||||
[play-clj.g2d :refer :all]
|
[play-clj.g2d :refer :all]
|
||||||
|
[clojure.tools.logging :as log]
|
||||||
[clojure.pprint]
|
[clojure.pprint]
|
||||||
[advent.pathfind]
|
[advent.pathfind]
|
||||||
[advent.zone :as zone]
|
[advent.zone :as zone]
|
||||||
@@ -17,6 +18,7 @@
|
|||||||
|
|
||||||
|
|
||||||
(defn close [screen entities]
|
(defn close [screen entities]
|
||||||
|
(log/info "closing inventory")
|
||||||
(screen! @(resolve 'advent.screens.scene/scene) :on-reactivate)
|
(screen! @(resolve 'advent.screens.scene/scene) :on-reactivate)
|
||||||
(-> entities
|
(-> entities
|
||||||
(assoc-in [:tweens :fade-out] (tween/tween :fade-out screen [:opacity] 1.0 0.0 0.2 :ease tween/ease-out-cubic
|
(assoc-in [:tweens :fade-out] (tween/tween :fade-out screen [:opacity] 1.0 0.0 0.2 :ease tween/ease-out-cubic
|
||||||
@@ -35,6 +37,8 @@
|
|||||||
deref
|
deref
|
||||||
first)
|
first)
|
||||||
current-cursor (get-in room-entities [:cursor :current])]
|
current-cursor (get-in room-entities [:cursor :current])]
|
||||||
|
|
||||||
|
(log/info "chose inventory item" highlighted-item)
|
||||||
(if highlighted-item
|
(if highlighted-item
|
||||||
(if (= :main current-cursor)
|
(if (= :main current-cursor)
|
||||||
(screen! @(resolve 'advent.screens.scene/scene) :on-chose-item :item highlighted-item)
|
(screen! @(resolve 'advent.screens.scene/scene) :on-chose-item :item highlighted-item)
|
||||||
@@ -101,6 +105,7 @@
|
|||||||
entities))
|
entities))
|
||||||
|
|
||||||
:show-screen (fn [{items :items :as screen} [entities]]
|
:show-screen (fn [{items :items :as screen} [entities]]
|
||||||
|
(log/info "showing inventory")
|
||||||
(if (:shown? entities)
|
(if (:shown? entities)
|
||||||
entities
|
entities
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user