about summary refs log tree commit diff
path: root/src/Xanthous/Game/Lenses.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xanthous/Game/Lenses.hs')
-rw-r--r--src/Xanthous/Game/Lenses.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Xanthous/Game/Lenses.hs b/src/Xanthous/Game/Lenses.hs
index 7dbd60290144..13f4b89314f7 100644
--- a/src/Xanthous/Game/Lenses.hs
+++ b/src/Xanthous/Game/Lenses.hs
@@ -25,7 +25,7 @@ import           Xanthous.Data
 import qualified Xanthous.Data.EntityMap as EntityMap
 import           Xanthous.Data.EntityMap.Graphics (visiblePositions)
 import           Xanthous.Entities.Character (Character, mkCharacter)
-import           Xanthous.Entities.Environment (Door, open)
+import           Xanthous.Entities.Environment (Door, open, GroundMessage)
 import           Xanthous.Entities.Item (Item)
 import           Xanthous.Entities.Creature (Creature)
 import           Xanthous.Entities.Entities ()
@@ -105,8 +105,12 @@ entityCollision
   -> Maybe Collision
 entityCollision Empty = Nothing
 entityCollision ents
+  -- TODO track entity collision in the Entity class
   | any (entityIs @Creature) ents = pure Combat
-  | all (entityIs @Item) ents = Nothing
+  | all (\e ->
+          entityIs @Item e
+        || entityIs @GroundMessage e
+        ) ents = Nothing
   | doors@(_ : _) <- ents ^.. folded . _SomeEntity @Door
   , all (view open) doors = Nothing
   | otherwise = pure Stop