fixed bug with throwing away all inventory.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
[play-clj.g2d :refer :all]))
|
||||
|
||||
(defn go-to-jail [entities]
|
||||
(actions/update-state entities #(assoc % :chest-contents (remove #{:key} (:inventory %))))
|
||||
(actions/update-state entities #(assoc % :chest-contents (concat (remove #{:key} (:inventory %)) (:chest-contents %))))
|
||||
(actions/update-state entities #(assoc % :inventory []))
|
||||
(actions/update-state entities #(assoc % :opened-bars? false))
|
||||
(actions/transition-background entities :inside-jail [130 85]))
|
||||
|
||||
@@ -145,9 +145,9 @@
|
||||
(aget warden-sheet 0 i)))
|
||||
warden-stand (animation 0.1 (for [i (flatten [(repeat 30 0) 2 (repeat 20 0) 2])]
|
||||
(aget warden-sheet 0 i)))
|
||||
warden-fall-asleep (animation 0.1 (for [i (flatten [(repeat 10 0) 2 2 (repeat 10 0) 2 2 2 2 2 2 2 (repeat 10 0) 2 2 2 2 2 2 2 ])]
|
||||
warden-fall-asleep (animation 0.1 (for [i (flatten [(repeat 5 0) 2 2 (repeat 10 0) 2 2 2 2 2 2 2 (repeat 10 0) 2 2 2])]
|
||||
(aget warden-sheet 0 i)))
|
||||
warden-sleep (animation 0.5 (for [i (flatten [(repeat 5 2) 3])]
|
||||
warden-sleep (animation 0.5 (for [i (flatten [ 3 3 2 2 2])]
|
||||
(aget warden-sheet 0 i)))]
|
||||
(rooms/make :music :inside-antique
|
||||
:interactions {
|
||||
|
||||
Reference in New Issue
Block a user