Cleanup
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Item.Use.Consumption where
|
||||
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Dodge.Data.Ammo
|
||||
import Dodge.Data.LoadAction
|
||||
|
||||
data HeldConsumption
|
||||
= LoadableAmmo
|
||||
{ _laAmmoType :: AmmoType
|
||||
, _laMax :: Int
|
||||
, _laLoaded :: Int
|
||||
, _laPrimed :: Bool
|
||||
, _laCycle :: [LoadAction]
|
||||
, _laProgress :: Maybe [LoadAction]
|
||||
}
|
||||
| NoConsumption
|
||||
deriving (Eq, Show, Read)
|
||||
|
||||
data LeftConsumption
|
||||
= AutoRecharging
|
||||
{ _arLoaded :: Int
|
||||
, _arMax :: Int
|
||||
, _arTime :: Int
|
||||
, _arProgress :: Int
|
||||
}
|
||||
| ChargeableAmmo
|
||||
{ _wpMaxCharge :: Int
|
||||
, _wpCharge :: Int
|
||||
}
|
||||
deriving (Eq, Show, Read)
|
||||
|
||||
newtype ItAmount = ItAmount {_getItAmount :: Int}
|
||||
deriving (Eq, Ord, Read, Show, Num, Real, Enum, Integral)
|
||||
|
||||
makeLenses ''HeldConsumption
|
||||
makeLenses ''LeftConsumption
|
||||
makeLenses ''ItAmount
|
||||
deriveJSON defaultOptions ''HeldConsumption
|
||||
deriveJSON defaultOptions ''LeftConsumption
|
||||
deriveJSON defaultOptions ''ItAmount
|
||||
Reference in New Issue
Block a user