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
+13 -13
View File
@@ -51,7 +51,8 @@ decontamRoom i =
return $
putDoubleDoor
switchWallObs
(switchWallCol red)
--(switchWallCol red)
defaultSwitchWall
(cond pmnt)
(V2 (-10) 35)
(V2 (-10) 65)
@@ -60,7 +61,8 @@ decontamRoom i =
mcpos = V2 70 50
cutps = [rectNSWE 100 0 0 40, switchcut]
ps = (\p -> p - mcpos) <$> orderPolygon (concat cutps)
thewall = switchWallCol col
--thewall = switchWallCol col
thewall = defaultSwitchWall
switchcut = rectNSWE 65 35 (-40) 80
lnks =
[ (V2 20 95, 0)
@@ -87,7 +89,8 @@ airlock0 =
, _rmBound = [rectNSWE 75 15 0 40, switchcut]
}
where
thewall = switchWallCol col
--thewall = switchWallCol col
thewall = defaultSwitchWall
switchcut = rectNSWE 65 35 (-40) 20
lnks =
[ (V2 20 95, 0)
@@ -96,13 +99,12 @@ airlock0 =
col = dim $ dim $ bright red
--airlockDoor :: Color -> WdBl -> [(Point2, Point2)] -> PSType
airlockDoor :: Color -> WdBl -> Float -> Point2A -> Point2A -> PSType
airlockDoor col = PutDoor col switchWallObs
airlockDoor :: WdBl -> Float -> Point2A -> Point2A -> PSType
airlockDoor = PutDoor switchWallObs
airlockDoubleDoor ::
Point2 ->
Point2 ->
Color ->
WdBl ->
Float ->
Point2A ->
@@ -111,9 +113,9 @@ airlockDoubleDoor ::
Point2A ->
Point2A ->
Maybe Placement
airlockDoubleDoor p1 p2 col cond l1 x1 y1 l2 x2 y2 =
jspsJ p1 0 (airlockDoor col cond l1 x1 y1) $
sPS p2 0 (airlockDoor col cond l2 x2 y2)
airlockDoubleDoor p1 p2 cond l1 x1 y1 l2 x2 y2 =
jspsJ p1 0 (airlockDoor cond l1 x1 y1) $
sPS p2 0 (airlockDoor cond l2 x2 y2)
airlockSimple :: Room
airlockSimple =
@@ -128,7 +130,6 @@ airlockSimple =
airlockDoubleDoor
0
(V2 180 0)
col
(WdBlBtOn btid)
l1
x1
@@ -173,7 +174,6 @@ airlockZ = do
airlockDoubleDoor
(V2 0 60)
(V2 180 60)
col
(WdBlBtOn btid)
l1
x1
@@ -222,7 +222,7 @@ airlock90 =
[ pContID
(PS (V2 120 120) (3 * pi / 4))
(PutButton $ makeSwitch col red NoWorldEffect NoWorldEffect)
$ \btid -> jsps (V2 5 5) 0 $ airlockDoor col (WdBlBtOn btid) l1 x1 y1
$ \btid -> jsps (V2 5 5) 0 $ airlockDoor (WdBlBtOn btid) l1 x1 y1
, mntLS vShape (V2 35 35) (V3 70 70 50)
]
, _rmBound =
@@ -256,7 +256,7 @@ airlockCrystal =
[ pContID
(PS (V2 145 70) (pi / 2))
(PutButton $ makeSwitch col red NoWorldEffect NoWorldEffect)
$ \btid -> jsps (V2 40 70) 0 $ airlockDoor col (WdBlBtOn btid) l1 x1 y1
$ \btid -> jsps (V2 40 70) 0 $ airlockDoor (WdBlBtOn btid) l1 x1 y1
, crystalLine (V2 0 70) (V2 40 70)
, mntLS vShape (V2 150 70) (V3 110 70 70)
]
+2 -2
View File
@@ -1,7 +1,6 @@
{- Rooms that connect other rooms, blocking sight. -}
module Dodge.Room.Door where
import Color
import Data.Maybe
import Dodge.Data.GenWorld
import Dodge.Default.Door
@@ -43,5 +42,6 @@ triggerDoorRoom i =
f gw = fromMaybe (error "tried to put a door using an empty placement list") $ do
pmnt <- gw ^? genPmnt . ix i
return $ putDoubleDoor
switchWallObs (switchWallCol red) (cond pmnt) (V2 0 20) (V2 40 20) 2
--switchWallObs (switchWallCol red) (cond pmnt) (V2 0 20) (V2 40 20) 2
switchWallObs defaultSwitchWall (cond pmnt) (V2 0 20) (V2 40 20) 2
cond pmnt = WdTrig $ fromJust (_plMID pmnt)
+4 -2
View File
@@ -57,7 +57,8 @@ twinSlowDoorRoom w h x =
, _rmViewpoints = [V2 0 h]
}
where
thewall = switchWallCol red
--thewall = switchWallCol red
thewall = defaultSwitchWall
wlSpeed = 0.5
addColorChange lsid drid =
over prUpdate $
@@ -129,7 +130,8 @@ addButtonSlowDoor x h rm = do
.++~ [MountedLS (fromJust $ _plMID plls), MountedProp (fromJust $ _plMID plpr)]
-- TODO make the height of this light source and of other mounted lights
-- be taken from a single consistent source
thewall = switchWallCol red
--thewall = switchWallCol red
thewall = defaultSwitchWall
butDoor = putLitButOnPos
col
(rprBool (isUnusedLnkType InLink))
+2 -1
View File
@@ -330,7 +330,8 @@ centerVaultRoom w h d =
jspsJ (V2 0 (d -10)) 0 (PutSlideDr (thedoor btid) thewall switchWallObs 1 (V2 (-21) 0) (V2 0 0)) $
sPS (V2 0 (d -10)) 0 (PutSlideDr (thedoor btid) thewall switchWallObs 1 (V2 21 0) (V2 0 0))
]
thewall = switchWallCol col
--thewall = switchWallCol col
thewall = defaultSwitchWall
thedoor btid =
defaultDoor
& drTrigger .~ WdBlBtOn btid