about summary refs log tree commit diff
path: root/src/Xanthous/Entities/Item.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xanthous/Entities/Item.hs')
-rw-r--r--src/Xanthous/Entities/Item.hs15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Xanthous/Entities/Item.hs b/src/Xanthous/Entities/Item.hs
index baf4be2f5426..6b50f50ad83c 100644
--- a/src/Xanthous/Entities/Item.hs
+++ b/src/Xanthous/Entities/Item.hs
@@ -1,17 +1,19 @@
 {-# LANGUAGE TemplateHaskell #-}
+--------------------------------------------------------------------------------
 module Xanthous.Entities.Item
   ( Item(..)
   , itemType
   , newWithType
   ) where
 --------------------------------------------------------------------------------
-import Xanthous.Prelude
-import Test.QuickCheck
-import Data.Aeson (ToJSON, FromJSON)
-import Data.Aeson.Generic.DerivingVia
+import           Xanthous.Prelude
+import           Test.QuickCheck
+import           Data.Aeson (ToJSON, FromJSON)
+import           Data.Aeson.Generic.DerivingVia
 --------------------------------------------------------------------------------
-import Xanthous.Entities.RawTypes hiding (Item)
-import Xanthous.Entities (Draw(..), Entity(..), DrawRawChar(..))
+import           Xanthous.Entities.RawTypes hiding (Item, description)
+import qualified Xanthous.Entities.RawTypes as Raw
+import           Xanthous.Entities (Draw(..), Entity(..), DrawRawChar(..))
 --------------------------------------------------------------------------------
 
 data Item = Item
@@ -30,6 +32,7 @@ instance Arbitrary Item where
 
 instance Entity Item where
   blocksVision _ = False
+  description = view $ itemType . Raw.description
 
 newWithType :: ItemType -> Item
 newWithType = Item