{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveGeneric #-} module Dodge.Data.Wall where import Dodge.Data.Material import Geometry import Color import ShapePicture import Control.Lens data Wall = Wall { _wlLine :: (Point2,Point2) , _wlID :: Int , _wlColor :: Color , _wlSeen :: Bool , _wlOpacity :: Opacity , _wlPathable :: Bool , _wlPenetrable :: Bool , _wlBouncy :: Bool , _wlWalkable :: Bool , _wlTouchThrough :: Bool , _wlFireThrough :: Bool , _wlReflect :: Bool , _wlUnshadowed :: Bool , _wlRotateTo :: Bool , _wlStructure :: WallStructure , _wlHeight :: Float -- , _wlDamageEff :: Damage -> Wall -> World -> World , _wlMaterial :: Material } data Opacity = SeeThrough | SeeAbove | DrawnWall {_opDraw :: Wall -> SPic} | Opaque data WallStructure = StandaloneWall | DoorPart { _wsDoor :: Int } | MachinePart { _wsMachine :: Int } | BlockPart { _wsBlock :: Int } | CreaturePart { _wlStCreature :: Int -- , _wlStDamCreature :: Damage -> Wall -> Int -> World -> World } makeLenses ''Wall makeLenses ''WallStructure makeLenses ''Opacity