Add Read instances

This commit is contained in:
2022-07-22 01:06:35 +01:00
parent d4e5b02874
commit 4c5218c633
44 changed files with 209 additions and 126 deletions
+6 -3
View File
@@ -6,7 +6,6 @@ module Dodge.Data.Wall where
import Dodge.Data.Material
import Geometry
import Color
import ShapePicture
import Control.Lens
data Wall = Wall
{ _wlLine :: (Point2,Point2)
@@ -25,14 +24,17 @@ data Wall = Wall
, _wlRotateTo :: Bool
, _wlStructure :: WallStructure
, _wlHeight :: Float
-- , _wlDamageEff :: Damage -> Wall -> World -> World
, _wlMaterial :: Material
}
deriving (Eq,Ord,Show,Read)
data Opacity
= SeeThrough
| SeeAbove
| DrawnWall {_opDraw :: Wall -> SPic}
| DrawnWall {_opDraw :: WallDraw } -- Wall -> SPic
| Opaque
deriving (Eq,Ord,Show,Read)
data WallDraw = DrawForceField
deriving (Eq,Ord,Show,Read,Enum,Bounded)
data WallStructure
= StandaloneWall
| DoorPart { _wsDoor :: Int }
@@ -42,6 +44,7 @@ data WallStructure
{ _wlStCreature :: Int
-- , _wlStDamCreature :: Damage -> Wall -> Int -> World -> World
}
deriving (Eq,Ord,Show,Read)
makeLenses ''Wall
makeLenses ''WallStructure
makeLenses ''Opacity