Move towards allowing partial destruction of doors

This commit is contained in:
2022-06-23 14:52:25 +01:00
parent 4c8c82b55c
commit 0f01e422f6
11 changed files with 73 additions and 28 deletions
+11 -1
View File
@@ -11,6 +11,7 @@ module Dodge.Data
( module Dodge.Data
, module Dodge.Data.Material
, module Dodge.Data.LoadAction
, module Dodge.Data.ForegroundShape
, module Dodge.Data.Wall
, module Dodge.Combine.Data
, module Dodge.Distortion.Data
@@ -30,6 +31,7 @@ module Dodge.Data
, module Dodge.Data.Room
) where
import Dodge.Data.Room
import Dodge.Data.ForegroundShape
import Dodge.Data.LoadAction
import Dodge.Data.Material
import Dodge.Data.Wall
@@ -135,6 +137,7 @@ data World = World
, _toPlaySounds :: M.Map SoundOrigin Sound
, _playingSounds :: M.Map SoundOrigin Sound
, _decorations :: IM.IntMap Picture
, _shapes :: IM.IntMap ForegroundShape
, _foregroundShape :: Shape
, _corpses :: IM.IntMap Corpse
, _clickMousePos :: Point2
@@ -1018,10 +1021,16 @@ data Door = Door
, _drHP :: Int
, _drDeath :: Door -> World -> World
, _drSpeed :: Float
, _drSupport :: Support
, _drPushes :: Maybe Int
}
data DoorStatus = DoorOpen | DoorClosed | DoorHalfway | DoorInt Int
deriving (Eq, Ord, Show)
data Support = SupportsItself
| SupportedBy Int
| Unsupported
data ActionPlan
= Inanimate
| ActionPlan
@@ -1381,7 +1390,8 @@ data PSType = PutCrit {_unPutCrit :: Creature}
| PutLineBlock {_putWall :: Wall , _putWidth :: Float
, _putDepth :: Float, _putStartPoint :: Point2, _putEndPoint :: Point2}
| PutWall { _pwPoly :: [Point2] , _pwWall :: Wall }
| PutSlideDr Bool Color (World -> Bool) Float Point2 Point2 Float
| PutSlideDr Bool Color Door Float Point2 Point2
-- | PutSlideDr Bool Color (World -> Bool) Float Point2 Point2 Float
| PutDoor Color (World -> Bool) [(Point2,Point2)]
| RandPS (State StdGen PSType)
| PutShape Shape