Use explicit out and in placements with ids
This commit is contained in:
+10
-10
@@ -37,14 +37,14 @@ cenLasTur = roomNgon 8 200 & rmPmnts .~
|
||||
, mntLightLnkCond unusedLnkToPS
|
||||
]
|
||||
|
||||
lightSensInsideDoor :: Room -> Room
|
||||
lightSensInsideDoor rm = rm
|
||||
lightSensInsideDoor :: Int -> Room -> Room
|
||||
lightSensInsideDoor outplid rm = rm
|
||||
& rmPmnts .:~ psPt atFstLnkOut
|
||||
(PutShape $ colorSH yellow $
|
||||
thinHighBar 0 (V2 20 (-1)) (V2 20 (-100))
|
||||
<> thinHighBar 0 (V2 0 (-100)) (V2 20 (-100))
|
||||
<> barPP 1.5 (V3 20 (-1) 0) (V3 20 (-1) 80))
|
||||
& rmExtPmnt ?~ lasSensLightAboveDoor 10 (atFstLnkOutShiftInward 100)
|
||||
& rmOutPmnt .~ [OutPlacement (lasSensLightAboveDoor 10 (atFstLnkOutShiftInward 100)) outplid]
|
||||
|
||||
lasSensLightAboveDoor :: Float -> PlacementSpot -> Placement
|
||||
lasSensLightAboveDoor wth ps = extTrigLitPos
|
||||
@@ -54,29 +54,29 @@ lasSensLightAboveDoor wth ps = extTrigLitPos
|
||||
upf trid mc w | _mcSensor mc > 900 = w & triggers . ix trid .~ const True
|
||||
| otherwise = w
|
||||
|
||||
lightSensByDoor :: Room -> Room
|
||||
lightSensByDoor rm = rm
|
||||
lightSensByDoor :: Int -> Room -> Room
|
||||
lightSensByDoor outplid rm = rm
|
||||
& rmPmnts .++~
|
||||
[ psPt atFstLnkOut $ PutShape $ colorSH yellow
|
||||
$ barPP 1.5 (V3 20 (-1) 0) (V3 20 (-1) 80)
|
||||
, heightWallPS (atNthLnkOutShiftInward 1 100) 30 covershape
|
||||
, heightWallPS (atFstLnkOutShiftInward 100) 30 covershape
|
||||
]
|
||||
& rmExtPmnt ?~ lasSensLightAboveDoor 20 (atFstLnkOutShiftBy sensorshift)
|
||||
& rmOutPmnt .~ [OutPlacement (lasSensLightAboveDoor 20 (atFstLnkOutShiftBy sensorshift)) outplid]
|
||||
where
|
||||
covershape = rectNSEW 10 (-10) 20 (-20)
|
||||
sensorshift (p,a) = (p +.+ rotateV a (V2 60 (-20)), a)
|
||||
|
||||
lasSensorTurretTest :: RandomGen g => Int -> State g (SubCompTree Room)
|
||||
lasSensorTurretTest n = do
|
||||
cenroom <- shuffleLinks $ lightSensInsideDoor cenLasTur & rmLabel ?~ n
|
||||
let doorroom = switchDoorRoom & rmTakeFrom ?~ n
|
||||
cenroom <- shuffleLinks $ lightSensInsideDoor n cenLasTur & rmLabel ?~ n
|
||||
let doorroom = switchDoorRoom n & rmTakeFrom ?~ n
|
||||
return $ treeFromPost [PassDown door,PassDown cenroom,PassDown doorroom] (UseAll door)
|
||||
|
||||
lasCenSensEdge :: RandomGen g => Int -> State g (SubCompTree Room)
|
||||
lasCenSensEdge n = do
|
||||
cenroom <- shuffleLinks $ (lightSensByDoor cenLasTur) {_rmLabel = Just n}
|
||||
let doorroom = switchDoorRoom {_rmTakeFrom = Just n}
|
||||
cenroom <- shuffleLinks $ (lightSensByDoor n cenLasTur) {_rmLabel = Just n}
|
||||
let doorroom = (switchDoorRoom n) {_rmTakeFrom = Just n}
|
||||
return $ treeFromTrunk [PassDown door] $ Node (PassDown cenroom)
|
||||
[ treeFromPost [PassDown doorroom] (UseAll door)
|
||||
, treeFromPost [PassDown door] (UseLabel 0 corridor)
|
||||
|
||||
Reference in New Issue
Block a user