Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+74 -62
View File
@@ -1,74 +1,86 @@
module Dodge.Default.Wall
where
import Dodge.Data
import Dodge.Block.Debris -- this dependency is (directly) for dirtColor
import Picture
import Geometry.Data
module Dodge.Default.Wall where
import Control.Lens
import Dodge.Block.Debris
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
, _wlSeen = False
, _wlOpacity = Opaque
, _wlPathable = False
, _wlPenetrable = False
, _wlFireThrough = False
, _wlTouchThrough = False
, _wlReflect = False
, _wlUnshadowed = True
, _wlRotateTo = True
, _wlStructure = StandaloneWall
, _wlWalkable = False
, _wlHeight = 100
, _wlMaterial = Stone
, _wlBouncy = True
}
defaultWall =
Wall
{ _wlLine = (V2 0 0, V2 50 0)
, _wlID = 0
, _wlColor = greyN 0.6
, _wlSeen = False
, _wlOpacity = Opaque
, _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
}
defaultDoorWall' =
defaultWall
{ _wlPathable = True
, _wlMaterial = Metal
}
{- Indestructible see-through wall. -}
defaultCrystalWall :: Wall
defaultCrystalWall = defaultWall
{ _wlColor = withAlpha 0.5 aquamarine
, _wlOpacity = SeeThrough
, _wlMaterial = Crystal
}
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
}
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
, _wlSeen = False
, _wlOpacity = Opaque
, _wlRotateTo = False
, _wlFireThrough = True
, _wlPenetrable = True
, _wlMaterial = Dirt
}
defaultDirtWall =
defaultWall
{ _wlLine = (V2 0 0, V2 50 0)
, _wlID = 0
, _wlColor = dirtColor
, _wlSeen = False
, _wlOpacity = Opaque
, _wlRotateTo = False
, _wlFireThrough = True
, _wlPenetrable = True
, _wlMaterial = Dirt
}
defaultWindow :: Wall
defaultWindow = defaultWall
{ _wlLine = (V2 0 0,V2 50 0)
, _wlID = 0
, _wlColor = withAlpha 0.5 cyan
, _wlSeen = False
, _wlOpacity = SeeThrough
, _wlFireThrough = True
, _wlMaterial = Glass
, _wlPenetrable = True
}
defaultWindow =
defaultWall
{ _wlLine = (V2 0 0, V2 50 0)
, _wlID = 0
, _wlColor = withAlpha 0.5 cyan
, _wlSeen = False
, _wlOpacity = SeeThrough
, _wlFireThrough = True
, _wlMaterial = Glass
, _wlPenetrable = True
}