Refactor doors
This commit is contained in:
+29
-3
@@ -1,11 +1,37 @@
|
||||
--{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Dodge.Data.Door where
|
||||
import Dodge.Data.PathGraph
|
||||
import Dodge.Data.MountedObject
|
||||
import Geometry.Data
|
||||
import Dodge.Data.WorldEffect
|
||||
import qualified Data.IntSet as IS
|
||||
import Control.Lens
|
||||
|
||||
data DoorStatus = DoorOpen | DoorClosed | DoorHalfway | DoorInt Int
|
||||
deriving (Eq, Ord, Show)
|
||||
deriving (Eq, Ord, Show,Read)
|
||||
|
||||
data PushSource = PushesItself
|
||||
| PushedBy Int
|
||||
| NotPushed
|
||||
deriving (Eq,Ord,Show)
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
data Door = Door
|
||||
{ _drID :: Int
|
||||
, _drWallIDs :: IS.IntSet
|
||||
, _drStatus :: DoorStatus
|
||||
, _drTrigger :: WdBl
|
||||
, _drMech :: DrWdWd
|
||||
, _drPos :: (Point2,Point2)
|
||||
, _drOpenPos :: (Point2,Point2)
|
||||
, _drClosePos :: (Point2,Point2)
|
||||
, _drHP :: Int
|
||||
, _drDeath :: DrWdWd
|
||||
, _drSpeed :: Float
|
||||
, _drPushedBy :: PushSource
|
||||
, _drPushes :: Maybe Int
|
||||
, _drMounts :: [MountedObject]
|
||||
, _drObstructs :: [(Int,Int,PathEdge)]
|
||||
, _drObstacleType :: EdgeObstacle
|
||||
}
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
makeLenses ''Door
|
||||
|
||||
Reference in New Issue
Block a user