about summary refs log tree commit diff
path: root/src/Xanthous/Entities/Environment.hs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2020-01-03T17·14-0500
committerGriffin Smith <root@gws.fyi>2020-01-03T17·14-0500
commitc4351d46ef13da5fbe2048bb3506f9549b61f437 (patch)
tree55bb7b7b7caf23d991a2dc3a27cb159c6137f14c /src/Xanthous/Entities/Environment.hs
parent5c5aa14a3dcb5c172eaf8d2236b41020c8e92051 (diff)
Describe doors as either closed or open
Rather than just describing them as "a door". Descriptions should
ideally be as injective as possible!
Diffstat (limited to 'src/Xanthous/Entities/Environment.hs')
-rw-r--r--src/Xanthous/Entities/Environment.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Xanthous/Entities/Environment.hs b/src/Xanthous/Entities/Environment.hs
index 4f70d90253aa..46416d1da59a 100644
--- a/src/Xanthous/Entities/Environment.hs
+++ b/src/Xanthous/Entities/Environment.hs
@@ -88,7 +88,8 @@ instance Brain Door where step = brainVia Brainless
 
 instance Entity Door where
   blocksVision = not . view open
-  description _ = "a door"
+  description door | door ^. open = "an open door"
+                   | otherwise    = "a closed door"
   entityChar _ = "d"
 
 -- | A closed, unlocked door