fixed bug with throwing away all inventory.

This commit is contained in:
2014-12-27 15:32:20 -08:00
parent 54021e18f8
commit 6d4a232c0d
2 changed files with 3 additions and 3 deletions

View File

@@ -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]))