29 lines
725 B
Haskell
29 lines
725 B
Haskell
{-# LANGUAGE DeriveGeneric #-}
|
|
{-# LANGUAGE StrictData #-}
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
module Dodge.Data.Item.UseDelay where
|
|
import GHC.Generics
|
|
import Data.Aeson
|
|
import Control.Lens
|
|
data UseDelay -- should just be Delay
|
|
= NoDelay
|
|
| FixedRate
|
|
{_rateMax :: Int
|
|
,_rateTime :: Int
|
|
}
|
|
| VariableRate
|
|
{_rateMax :: Int
|
|
,_rateTime :: Int
|
|
,_rateMaxMax :: Int
|
|
,_rateMinMax :: Int
|
|
}
|
|
| WarmUpNoDelay
|
|
{_warmTime :: Int
|
|
,_warmMax :: Int
|
|
}
|
|
deriving (Eq,Ord,Show,Read,Generic)
|
|
instance ToJSON UseDelay where
|
|
toEncoding = genericToEncoding defaultOptions
|
|
instance FromJSON UseDelay
|
|
makeLenses ''UseDelay
|