95 lines
2.2 KiB
Haskell
95 lines
2.2 KiB
Haskell
module Dodge.Default.Wall (
|
|
defaultWall,
|
|
defaultSensorWall,
|
|
defaultMachineWall,
|
|
defaultWindow,
|
|
defaultCrystalWall,
|
|
defaultDoorWall,
|
|
defaultDirtWall,
|
|
) where
|
|
|
|
import Control.Lens
|
|
import Dodge.Data.Wall
|
|
import Geometry.Data
|
|
import Picture
|
|
|
|
{- Indestructible wall. -}
|
|
defaultWall :: Wall
|
|
defaultWall =
|
|
Wall
|
|
{ _wlLine = (V2 0 0, V2 50 0)
|
|
, _wlID = 0
|
|
, _wlColor = greyN 0.6
|
|
, --, _wlOpacity = Opaque 11
|
|
_wlOpacity = Opaque 11
|
|
, _wlPathable = False
|
|
, _wlPenetrable = False
|
|
, _wlFireThrough = False
|
|
, _wlTouchThrough = False
|
|
, _wlReflect = False
|
|
, _wlUnshadowed = True
|
|
, _wlRotateTo = True
|
|
, _wlStructure = StandaloneWall
|
|
, _wlWalkable = False
|
|
, _wlHeight = 100
|
|
, _wlMaterial = Stone
|
|
, _wlBouncy = True
|
|
}
|
|
|
|
defaultDoorWall :: Wall
|
|
defaultDoorWall =
|
|
defaultWall
|
|
{ _wlPathable = True
|
|
, _wlMaterial = Metal
|
|
}
|
|
|
|
{- Indestructible see-through wall. -}
|
|
defaultCrystalWall :: Wall
|
|
defaultCrystalWall =
|
|
defaultWall
|
|
{ _wlColor = withAlpha 0.5 aquamarine
|
|
, _wlOpacity = SeeThrough
|
|
, _wlMaterial = Crystal
|
|
}
|
|
|
|
defaultMachineWall :: Wall
|
|
defaultMachineWall =
|
|
defaultWall
|
|
{ _wlOpacity = SeeAbove
|
|
, _wlRotateTo = False
|
|
, _wlStructure = MachinePart 0
|
|
, _wlMaterial = Metal
|
|
, _wlPenetrable = True
|
|
}
|
|
|
|
defaultSensorWall :: Wall
|
|
defaultSensorWall = defaultMachineWall & wlBouncy .~ False
|
|
|
|
defaultDirtWall :: Wall
|
|
defaultDirtWall =
|
|
defaultWall
|
|
{ _wlLine = (V2 0 0, V2 50 0)
|
|
, _wlID = 0
|
|
, _wlColor = dirtColor
|
|
, _wlOpacity = Opaque 6
|
|
, _wlRotateTo = False
|
|
, _wlFireThrough = True
|
|
, _wlPenetrable = True
|
|
, _wlMaterial = Dirt
|
|
}
|
|
|
|
dirtColor :: Color
|
|
dirtColor = V4 (150 / 256) (75 / 256) 0 (250 / 256)
|
|
|
|
defaultWindow :: Wall
|
|
defaultWindow =
|
|
defaultWall
|
|
{ _wlLine = (V2 0 0, V2 50 0)
|
|
, _wlID = 0
|
|
, _wlColor = withAlpha 0.5 cyan
|
|
, _wlOpacity = SeeThrough
|
|
, _wlFireThrough = True
|
|
, _wlMaterial = Glass
|
|
, _wlPenetrable = True
|
|
}
|