Make crytal walls destructible by shatterGun

This commit is contained in:
2022-06-18 01:14:47 +01:00
parent 6a095d3de6
commit 5f68b512dd
10 changed files with 145 additions and 68 deletions
+28
View File
@@ -1,6 +1,7 @@
module Dodge.Default.Wall
where
import Dodge.Data
import Dodge.Block.Debris -- this dependency is (directly) for dirtColor
import Dodge.Wall.DamageEffect
import Picture
import Geometry.Data
@@ -22,12 +23,14 @@ defaultWall = Wall
, _wlWalkable = False
, _wlHeight = 100
, _wlDamageEff = defaultWallDamage
, _wlMaterial = StoneBlock
}
{- Indestructible see-through wall. -}
defaultCrystalWall :: Wall
defaultCrystalWall = defaultWall
{ _wlColor = withAlpha 0.5 aquamarine
, _wlOpacity = SeeThrough
, _wlMaterial = CrystalBlock
}
defaultMachineWall :: Wall
defaultMachineWall = defaultWall
@@ -35,4 +38,29 @@ defaultMachineWall = defaultWall
, _wlDraw = False
, _wlRotateTo = False
, _wlStructure = MachinePart 0
, _wlMaterial = MetalBlock
}
defaultDirtWall :: Wall
defaultDirtWall = defaultWall
{ _wlLine = (V2 0 0,V2 50 0)
, _wlID = 0
, _wlColor = dirtColor
, _wlSeen = False
, _wlOpacity = Opaque
, _wlRotateTo = False
, _wlDraw = True
, _wlFireThrough = True
, _wlMaterial = DirtBlock
}
defaultWindow :: Wall
defaultWindow = defaultWall
{ _wlLine = (V2 0 0,V2 50 0)
, _wlDamageEff = windowWallDamage
, _wlID = 0
, _wlColor = withAlpha 0.5 cyan
, _wlSeen = False
, _wlOpacity = SeeThrough
, _wlDraw = True
, _wlFireThrough = True
, _wlMaterial = GlassBlock
}