Add Binary instances
This commit is contained in:
@@ -11,6 +11,7 @@ module Dodge.Data.Item.Use.Consumption (
|
||||
module Dodge.Data.Item.Use.Consumption.LoadAction,
|
||||
) where
|
||||
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -29,6 +30,7 @@ data HeldConsumption
|
||||
}
|
||||
| NoConsumption
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
instance Binary HeldConsumption
|
||||
|
||||
data LeftConsumption
|
||||
= AutoRecharging
|
||||
@@ -42,12 +44,14 @@ data LeftConsumption
|
||||
, _wpCharge :: Int
|
||||
}
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
instance Binary LeftConsumption
|
||||
|
||||
newtype ItAmount = ItAmount {_getItAmount :: Int}
|
||||
-- deriving (Eq, Ord, Read, Show, Num, Real, Generic, Flat)
|
||||
deriving newtype (Eq, Ord, Read, Show, Num, Real, Enum, Integral)
|
||||
deriving stock (Generic)
|
||||
deriving anyclass (Flat)
|
||||
instance Binary ItAmount
|
||||
|
||||
makeLenses ''HeldConsumption
|
||||
makeLenses ''LeftConsumption
|
||||
|
||||
Reference in New Issue
Block a user