lots of improvements.
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
~@forms))
|
||||
(reset! ~entities (<!! c#)))))
|
||||
|
||||
(defn walk-to [entities target-id [final-x final-y]]
|
||||
(defn walk-to [entities target-id [final-x final-y] & [can-skip?]]
|
||||
(let [{start-x :x start-y :y} (get-in @entities [:background :entities target-id])
|
||||
final-x (int final-x)
|
||||
final-y (int final-y)
|
||||
@@ -118,7 +118,7 @@
|
||||
(terminate [this screen entities]
|
||||
(stop screen entities target-id))
|
||||
(can-skip? [this screen entities]
|
||||
false))
|
||||
(or can-skip? false)))
|
||||
@entities)))
|
||||
|
||||
(defn get-text-duration [text]
|
||||
@@ -214,13 +214,13 @@
|
||||
(can-skip? [this screen entities]
|
||||
false)))
|
||||
|
||||
(defn give [entities target-id item]
|
||||
(defn give [entities item]
|
||||
(run-action entities
|
||||
(begin [this screen entities]
|
||||
(sound! (sound "pickup.mp3") :play)
|
||||
|
||||
(-> entities
|
||||
(update-in [:background :entities target-id :inventory] #(conj % item))
|
||||
(update-in [:state :inventory] #(conj % item))
|
||||
(assoc-in [:cursor :current] item)))
|
||||
|
||||
(continue [this screen entities] entities)
|
||||
|
||||
Reference in New Issue
Block a user