Commit mid block refactor

This commit is contained in:
2022-06-18 11:07:17 +01:00
parent a1c7abedaf
commit 781e337cad
10 changed files with 78 additions and 64 deletions
+6 -7
View File
@@ -922,14 +922,13 @@ data Block = Block
, _blWallIDs :: IS.IntSet
, _blHP :: Int
, _blShadows :: [Int] -- a list of blocks/walls? that are not shown when this block exists
, _blMaterial :: BlockMaterial
, _blFootprint :: [Point2]
, _blPos :: Point2
, _blDraw :: Block -> SPic
, _blDeath :: Block -> World -> World
}
data BlockMaterial = WoodBlock | DirtBlock | StoneBlock | GlassBlock | MetalBlock
| CrystalBlock
data Material = Wood | Dirt | Stone | Glass | Metal | Crystal
deriving (Eq,Ord,Show,Bounded,Enum)
data TerminalStatus = TerminalOff | TerminalBusy | TerminalReady
deriving (Eq,Ord,Show)
data TerminalInput = TerminalInput
@@ -1032,7 +1031,7 @@ data Wall = Wall
, _wlStructure :: WallStructure
, _wlHeight :: Float
, _wlDamageEff :: Damage -> Wall -> World -> World
, _wlMaterial :: BlockMaterial
, _wlMaterial :: Material
}
data Opacity
= SeeThrough
@@ -1402,12 +1401,12 @@ data PSType = PutCrit {_unPutCrit :: Creature}
| PutTerminal {_unputTerminal :: Terminal}
| PutFlIt Item
| PutPPlate PressPlate
| PutBlock BlockMaterial Int Wall [Point2]
| PutBlock Block Wall [Point2]
| PutCoord Point2
| PutMod Modification
| PutTrigger (World -> Bool)
| PutLineBlock {_putWall :: Wall, _putBlockMaterial :: BlockMaterial
, _putWidth :: Float, _putDepth :: Float, _putStartPoint :: Point2, _putEndPoint :: Point2}
| 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
| PutDoor Color (World -> Bool) [(Point2,Point2)]