Fix more item bugs
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
{-# LANGUAGE EmptyDataDeriving #-}
|
||||
module Dodge.Data.Item.Location where
|
||||
|
||||
import ShortShow
|
||||
import Dodge.Data.Equipment.Misc
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -38,6 +39,16 @@ data ItemLocation
|
||||
| InVoid
|
||||
deriving (Eq, Show, Ord, Read) --Generic, Flat)
|
||||
|
||||
instance ShortShow ItemLocation where
|
||||
shortShow (InInv cid invid rootb selb attb esite)
|
||||
= "InInv:cid" <> shortShow cid <> "invid"<> shortShow invid
|
||||
<>"root"<>shortShow rootb<>"sel"<>shortShow selb<>"att"<>shortShow attb<>
|
||||
shortShow (fmap (SString . show) esite)
|
||||
shortShow x = show x
|
||||
-- | OnTurret {_ilTuID :: Int}
|
||||
-- | OnFloor-- {_ilFlID :: NewInt FloorInt}
|
||||
-- | InVoid
|
||||
|
||||
makeLenses ''ItemLocation
|
||||
deriveJSON defaultOptions ''InvInt
|
||||
deriveJSON defaultOptions ''FloorInt
|
||||
|
||||
Reference in New Issue
Block a user