Remove separate wall color, should be handled by material type

This commit is contained in:
2025-10-23 21:27:14 +01:00
parent 819f0d37ea
commit 3c6d269d00
24 changed files with 136 additions and 123 deletions
+1 -2
View File
@@ -9,7 +9,6 @@ module Dodge.Data.GenWorld (
) where
import ShortShow
import Color
import Control.Lens
import Control.Monad.State
import qualified Data.Set as S
@@ -55,7 +54,7 @@ data PSType
| PutWall {_pwPoly :: [Point2], _pwWall :: Wall}
| PutSlideDr Door Wall (S.Set EdgeObstacle) Float Point2 Point2
-- | PutDoor Color EdgeObstacle WdBl [(Point2, Point2)]
| PutDoor Color (S.Set EdgeObstacle) WdBl Float Point2A Point2A -- [(Point2, Point2)]
| PutDoor (S.Set EdgeObstacle) WdBl Float Point2A Point2A -- [(Point2, Point2)]
| RandPS (State StdGen PSType)
| PutForeground ForegroundShape
| PutWorldUpdate (Int -> PlacementSpot -> GenWorld -> GenWorld)
+10 -1
View File
@@ -6,7 +6,16 @@ module Dodge.Data.Material where
import Data.Aeson
import Data.Aeson.TH
data Material = Wood | Dirt | Stone | Glass | Metal | Crystal | Flesh | Electronics
data Material
= Wood
| Dirt
| Stone
| Glass
| Metal
| Crystal
| Flesh
| Electronics
| ForceField
deriving (Eq, Ord, Show, Bounded, Enum, Read) --Generic, Flat)
deriveJSON defaultOptions ''Material
+1 -6
View File
@@ -7,7 +7,6 @@ module Dodge.Data.Wall (
module Dodge.Data.Material,
) where
import Color
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
@@ -19,14 +18,10 @@ import qualified Data.Set as S
data Wall = Wall
{ _wlLine :: (Point2, Point2)
, _wlID :: Int
, _wlColor :: Color
-- , _wlColor :: Color
, _wlOpacity :: Opacity
, _wlPathFlag :: S.Set WallFlag
, _wlPenetrable :: Bool
, _wlBouncy :: Bool
, _wlWalkable :: Bool
, _wlTouchThrough :: Bool
, _wlFireThrough :: Bool
, _wlUnshadowed :: Bool
, _wlRotateTo :: Bool
, _wlStructure :: WallStructure