More streaming refactoring

This commit is contained in:
2022-06-24 23:37:01 +01:00
parent 0270d423fd
commit 3c2df2542a
10 changed files with 96 additions and 198 deletions
+4 -5
View File
@@ -6,7 +6,7 @@ import Dodge.Wall.Damage
--import Dodge.SoundLogic
import Dodge.Block.Debris
import Dodge.Base.Collide
import Dodge.Zone
--import Dodge.Zone
import Dodge.Creature.HandPos
--import Dodge.ChainEffect
import Dodge.Default.Weapon
@@ -24,7 +24,7 @@ import Shape
--import Sound.Data
import LensHelp
import qualified Data.IntMap.Strict as IM
--import qualified Data.IntMap.Strict as IM
shatterGun :: Item
shatterGun = defaultWeapon
@@ -46,9 +46,8 @@ shatterGunSPic _ = noPic $ colorSH blue $
xa = 1
xb = 9
shootShatter :: Item -> Creature -> World -> World
shootShatter it cr w = maybe w (uncurry $ shatterWall w sp ep) $ collidePointWallsWall sp ep
$ IM.filter canshatter
$ wallsAlongLine sp ep w
shootShatter it cr w = maybe w (uncurry $ shatterWall w sp ep) $ sequence
$ collidePointWallsFilterStream canshatter sp ep w
where
canshatter wl = case _wlOpacity wl of
Opaque -> True