Add Store instances
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
module Dodge.Data.Item.Use.Consumption.LoadAction where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import Control.Lens
|
||||
@@ -19,17 +21,14 @@ data LoadAction
|
||||
| LoadAdd {_actionTime :: Int, _actionSound :: SoundID, _insertMax :: Int}
|
||||
| LoadPrime {_actionTime :: Int, _actionSound :: SoundID}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary LoadAction
|
||||
|
||||
data InvSel = InvSel {_iselPos :: Int, _iselAction :: InvSelAction}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary InvSel
|
||||
|
||||
data InvSelAction
|
||||
= NoInvSelAction
|
||||
| ReloadAction {_actionProgress :: Int, _reloadAction :: LoadAction, _actionHammer :: HammerType}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary InvSelAction
|
||||
|
||||
makeLenses ''LoadAction
|
||||
makeLenses ''InvSel
|
||||
@@ -37,3 +36,6 @@ makeLenses ''InvSelAction
|
||||
deriveJSON defaultOptions ''LoadAction
|
||||
deriveJSON defaultOptions ''InvSel
|
||||
deriveJSON defaultOptions ''InvSelAction
|
||||
$($(derive [d| instance Deriving (Store LoadAction) |]))
|
||||
$($(derive [d| instance Deriving (Store InvSelAction) |]))
|
||||
$($(derive [d| instance Deriving (Store InvSel ) |]))
|
||||
|
||||
Reference in New Issue
Block a user