Attempt to make CWorld correct instance of Store
This commit is contained in:
@@ -8,6 +8,8 @@ module Dodge.Data.Item.Use.Consumption (
|
||||
module Dodge.Data.Item.Use.Consumption.LoadAction,
|
||||
) where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -48,3 +50,6 @@ makeLenses ''ItAmount
|
||||
deriveJSON defaultOptions ''HeldConsumption
|
||||
deriveJSON defaultOptions ''LeftConsumption
|
||||
deriveJSON defaultOptions ''ItAmount
|
||||
$($(derive [d| instance Deriving (Store HeldConsumption) |]))
|
||||
$($(derive [d| instance Deriving (Store LeftConsumption) |]))
|
||||
$($(derive [d| instance Deriving (Store ItAmount) |]))
|
||||
|
||||
@@ -7,6 +7,8 @@ module Dodge.Data.Item.Use.Consumption.Ammo (
|
||||
module Dodge.Data.Payload,
|
||||
) where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -56,6 +58,7 @@ data AmmoType
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
|
||||
data ForceFieldType = DefaultForceField
|
||||
| HackForTemplateForceField
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
|
||||
data GasCreate = CreatePoisonGas | CreateFlame
|
||||
@@ -69,3 +72,9 @@ deriveJSON defaultOptions ''ProjectileUpdate
|
||||
deriveJSON defaultOptions ''AmmoType
|
||||
deriveJSON defaultOptions ''GasCreate
|
||||
deriveJSON defaultOptions ''ForceFieldType
|
||||
$($(derive [d| instance Deriving (Store ProjectileDraw) |]))
|
||||
$($(derive [d| instance Deriving (Store ProjectileCreate) |]))
|
||||
$($(derive [d| instance Deriving (Store ProjectileUpdate) |]))
|
||||
$($(derive [d| instance Deriving (Store AmmoType) |]))
|
||||
$($(derive [d| instance Deriving (Store GasCreate) |]))
|
||||
$($(derive [d| instance Deriving (Store ForceFieldType) |]))
|
||||
|
||||
@@ -8,6 +8,8 @@ import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Dodge.Data.Hammer
|
||||
import Sound.Data
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
|
||||
data LoadAction
|
||||
= LoadEject {_actionTime :: Int, _actionSound :: SoundID}
|
||||
@@ -30,3 +32,6 @@ makeLenses ''InvSelAction
|
||||
deriveJSON defaultOptions ''LoadAction
|
||||
deriveJSON defaultOptions ''InvSel
|
||||
deriveJSON defaultOptions ''InvSelAction
|
||||
$($(derive [d| instance Deriving (Store LoadAction) |]))
|
||||
$($(derive [d| instance Deriving (Store InvSel) |]))
|
||||
$($(derive [d| instance Deriving (Store InvSelAction) |]))
|
||||
|
||||
@@ -11,6 +11,8 @@ import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Dodge.Data.Equipment.Misc
|
||||
import Dodge.Data.Item.HeldUse
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
|
||||
data EquipEffect = EquipEffect
|
||||
{ _eeUse :: Euse --Item -> Creature -> World -> World
|
||||
@@ -32,3 +34,5 @@ makeLenses ''EquipEffect
|
||||
makeLenses ''EquipParams
|
||||
deriveJSON defaultOptions ''EquipEffect
|
||||
deriveJSON defaultOptions ''EquipParams
|
||||
$($(derive [d| instance Deriving (Store EquipEffect) |]))
|
||||
$($(derive [d| instance Deriving (Store EquipParams) |]))
|
||||
|
||||
Reference in New Issue
Block a user