This commit is contained in:
Bryce Covert
2016-01-15 21:34:26 -08:00
parent 3abff89d5e
commit dcf6328ca1
10 changed files with 26 additions and 51 deletions

View File

@@ -536,7 +536,7 @@
(utils/fast-forward-particle (get-in entities [:room :entities :outside-particles]))
(as-> entities entities
(if (doto (get-in entities [:state :seen-intro?]) println)
(if (get-in entities [:state :seen-intro?])
(set-opacity entities 1.0 1.0)
(set-opacity entities 0.0 0.0))
(if (actions/has-item? entities :broom)

View File

@@ -705,7 +705,7 @@
(do (walk-to-sheep entities)
(actions/play-animation entities :ego :reach)
(actions/update-state entities #(assoc % :wool-count (inc (or (:wool-count %) 0))))
(when (= 3 (doto (get-in @entities [:state :wool-count]) println))
(when (= 3 (get-in @entities [:state :wool-count]))
(steam/set-achievement "SHEEP_HORDER"))
(actions/update-entities entities #(update-in

View File

@@ -9,6 +9,7 @@
[clojure.zip :as zip]
[clojure.pprint]
[clojure.java.io :as io]
[clojure.tools.logging :as log]
[advent.pathfind]
[advent.actions :as actions]
[advent.zone :as zone]
@@ -202,7 +203,7 @@ void main ()
(= :end (actions/skip-type current-action screen entities))
(let [terminated-entities (actions/terminate current-action screen entities)]
(println "trying to end")
(log/info "Attempting to end action")
(actions/force-end terminated-entities current-action :fg-actions)
)
:else
@@ -213,7 +214,7 @@ void main ()
(get-in entities [:room :interactions]))) )
(defn get-interacting-entity [entities x y]
(let [interactable-entities (if (= (doto (get-in entities [:cursor :current]) println) :main)
(let [interactable-entities (if (= (doto (get-in entities [:cursor :current]) (#(log/info "clicked with " %)) ) :main)
(vals (dissoc (get-in entities [:room :entities]) :ego))
(vals (get-in entities [:room :entities])))
interacting-entity (first (sort-by (comp - :baseline)
@@ -225,7 +226,7 @@ void main ()
(defn left-click [screen entities]
(let [[x y] (utils/unproject screen)
_ (println "clicked " x y)
_ (log/info (str "clicked " x y))
interaction (get-interaction entities x y)
interacting-entity (get-interacting-entity entities x y)
current-action (get-in entities [:fg-actions :current])
@@ -785,7 +786,7 @@ void main ()
(if next-script
(do
(next-script entities)
(println "starting script")
(log/info "starting script")
(assoc-in entities [key :script-running?] true))
entities)))))
@@ -991,25 +992,7 @@ void main ()
e)))
(defn shift-range-to-bounds [x1 x2 min max]
(println x1 x2 "->" (cond (and (< x1 min)
(> x2 max))
[min max]
(< x1 min)
[min (+ x2 (- min x1))]
(> x2 max)
[(- x1 (- x2 max)) max]
:else
[x1 x2]))
(cond (and (< x1 min)
(> x2 max))
[min max]
(< x1 min)
[min (+ x2 (- min x1))]
(> x2 max)
[(- x1 (- x2 max)) max]
:else
[x1 x2]))
(defn mouse-moved [{:keys [input-x input-y viewport] :as screen} [entities]]
(utils/update-override screen (assoc-in entities [:cursor :last-pos] [input-x input-y])))
@@ -1054,7 +1037,7 @@ void main ()
(let [[^OrthographicCamera cam] (utils/setup-viewport screen 320 240)]
(set! (. cam zoom) 0.95)
(let [shader (ShaderProgram. ^String v-shader ^String pix-shader)
#_#__ (println (.getLog shader))
#_#__ (log/info "shader log:" (.getLog shader))
state (get-state @utils/selected-save)
start-pos [(:x state) (:y state)]
has-start-pos? (:x state)