Attempt to make CWorld correct instance of Store

This commit is contained in:
2022-08-20 15:53:37 +01:00
parent e1a555ea02
commit 8571ab9254
89 changed files with 570 additions and 19 deletions
+10
View File
@@ -6,11 +6,14 @@ module Dodge.Data.Bullet
, module Dodge.Data.Damage
)where
import LinearHelp
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Dodge.Data.Damage
import Geometry.Data
import TH.Derive
import Data.Store
data Bullet = Bullet
{ _buDelayFraction :: Float
@@ -32,6 +35,7 @@ data EnergyBallType = IncBall | TeslaBall | ConcBall
deriving (Show, Read, Eq, Ord, Enum, Bounded)
data BulletUpdateMod = NoBulletUpdateMod
| ABulletUpdateMod -- hack for template splicing
deriving (Show, Read, Eq, Ord, Enum, Bounded)
data BulletEffect
@@ -57,3 +61,9 @@ deriveJSON defaultOptions ''BulletUpdateMod
deriveJSON defaultOptions ''BulletEffect
deriveJSON defaultOptions ''BulletSpawn
deriveJSON defaultOptions ''BulletTrajectory
$($(derive [d| instance Deriving (Store Bullet) |]))
$($(derive [d| instance Deriving (Store EnergyBallType) |]))
$($(derive [d| instance Deriving (Store BulletUpdateMod) |]))
$($(derive [d| instance Deriving (Store BulletEffect) |]))
$($(derive [d| instance Deriving (Store BulletSpawn) |]))
$($(derive [d| instance Deriving (Store BulletTrajectory) |]))