Use grid when creating block debris

This commit is contained in:
2022-07-13 10:44:18 +01:00
parent 1ccb87ff13
commit 6c50021f04
12 changed files with 139 additions and 65 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ module Dodge.Block where
import Dodge.Data
import Dodge.Base.Collide
import Dodge.Material
--import Dodge.Block.Debris
import Dodge.Block.Debris
import Dodge.Zone
import Dodge.Wall.Zone
import Dodge.WorldEvent.Sound
@@ -46,7 +46,7 @@ checkBlockHP bl
destroyBlock :: Block -> World -> World
destroyBlock bl w = w
& flip (foldr unshadowBlock) (_blShadows bl)
& _blDeath bl bl
& makeBlockDebris bl
& deleteWallIDs wlids
& maybeClearPaths (_blObstructs bl) -- must happen after the walls are deleted
& blocks %~ IM.delete (_blID bl)