diff options
Diffstat (limited to 'src/Xanthous/Entities/Environment.hs')
-rw-r--r-- | src/Xanthous/Entities/Environment.hs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Xanthous/Entities/Environment.hs b/src/Xanthous/Entities/Environment.hs index 46416d1da59a..dee8d83c3239 100644 --- a/src/Xanthous/Entities/Environment.hs +++ b/src/Xanthous/Entities/Environment.hs @@ -91,6 +91,8 @@ instance Entity Door where description door | door ^. open = "an open door" | otherwise = "a closed door" entityChar _ = "d" + entityCollision door | door ^. open = Nothing + | otherwise = Just Stop -- | A closed, unlocked door unlockedDoor :: Door @@ -113,8 +115,10 @@ newtype GroundMessage = GroundMessage Text deriving Draw via DrawStyledCharacter ('Just 'Yellow) 'Nothing "โ" GroundMessage - deriving Entity - via DeriveEntity 'False "a message on the ground. Press r. to read it." - "โ" - GroundMessage instance Brain GroundMessage where step = brainVia Brainless + +instance Entity GroundMessage where + blocksVision = const False + description = const "a message on the ground. Press r. to read it." + entityChar = const "โ" + entityCollision = const Nothing |