diff --git a/src/Dodge/Data.hs b/src/Dodge/Data.hs index cb82f08f7..c2fd5ede5 100644 --- a/src/Dodge/Data.hs +++ b/src/Dodge/Data.hs @@ -357,7 +357,6 @@ data Creature = Creature , _crMvDir :: Float , _crTwist :: Float , _crID :: Int - --, _crPict :: Creature -> Configuration -> World -> SPic , _crPict :: Creature -> SPic , _crSkin :: CreatureSkin , _crUpdate :: Creature -> World -> World @@ -945,6 +944,7 @@ data Block = Block , _blHP :: Int , _blShadows :: [Int] -- a list of blocks/walls? that are not shown when this block exists , _blFootprint :: [Point2] + , _blObstructs :: [(Point2,Point2)] , _blPos :: Point2 , _blDir :: Float , _blDraw :: Block -> SPic diff --git a/src/Dodge/Default/Block.hs b/src/Dodge/Default/Block.hs index 8d5941d77..c7813c4c8 100644 --- a/src/Dodge/Default/Block.hs +++ b/src/Dodge/Default/Block.hs @@ -14,6 +14,7 @@ defaultBlock = Block , _blDir = 0 , _blDraw = const mempty , _blDeath = makeBlockDebris + , _blObstructs = [] } defaultDirtBlock :: Block defaultDirtBlock = defaultBlock & blHP .~ 50 diff --git a/src/Dodge/Placement/PlaceSpot/Block.hs b/src/Dodge/Placement/PlaceSpot/Block.hs index 671fcd3a1..1aa411e7a 100644 --- a/src/Dodge/Placement/PlaceSpot/Block.hs +++ b/src/Dodge/Placement/PlaceSpot/Block.hs @@ -88,6 +88,7 @@ placeLineBlock basePane blockWidth depth a b gw = ( 0 , _blHP = 1000, _blShadows = shadowsAt i , _blDir = 0 -- THIS IS NOT SENSIBLE. TODO rethink block positioning , _blFootprint = cornersAt p -- TODO check winding (clockwise, anticlockwise) + , _blObstructs = [] , _blPos = p, _blDraw = const mempty , _blDeath = makeBlockDebris} insertBlocks = flip (foldr insertBlock) $ zip is blockCenPs ksAtI i = map ( + (wlid + i*4) ) [0,1,2,3]