From 6d4a232c0d22b2661be93a89ad2d7e1b23f937f3 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Sat, 27 Dec 2014 15:32:20 -0800 Subject: [PATCH] fixed bug with throwing away all inventory. --- desktop/src-common/advent/screens/rooms/common.clj | 2 +- desktop/src-common/advent/screens/rooms/inside_jail.clj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/src-common/advent/screens/rooms/common.clj b/desktop/src-common/advent/screens/rooms/common.clj index 736fab63..5fb843c4 100644 --- a/desktop/src-common/advent/screens/rooms/common.clj +++ b/desktop/src-common/advent/screens/rooms/common.clj @@ -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])) diff --git a/desktop/src-common/advent/screens/rooms/inside_jail.clj b/desktop/src-common/advent/screens/rooms/inside_jail.clj index 9b35c81c..fb1bef66 100644 --- a/desktop/src-common/advent/screens/rooms/inside_jail.clj +++ b/desktop/src-common/advent/screens/rooms/inside_jail.clj @@ -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 {