Add wire to central laser room
This commit is contained in:
@@ -143,9 +143,11 @@ robotArm :: Shape
|
||||
robotArm = undefined
|
||||
|
||||
barPP :: Float -> Point3 -> Point3 -> Shape
|
||||
barPP w a b = prismPoly
|
||||
(map ((+.+.+ a) . rotateToZ z1 . addZ 0) $ polyCirc 2 w)
|
||||
(map ((+.+.+ b) . rotateToZ z1 . addZ 0) $ polyCirc 2 w)
|
||||
barPP w a b
|
||||
| a == b = mempty
|
||||
| otherwise = prismPoly
|
||||
(map ((+.+.+ a) . rotateToZ z1 . addZ 0) $ polyCirc 2 w)
|
||||
(map ((+.+.+ b) . rotateToZ z1 . addZ 0) $ polyCirc 2 w)
|
||||
where
|
||||
z1 = b -.-.- a
|
||||
|
||||
|
||||
+10
-8
@@ -54,13 +54,15 @@ centralLasTurret :: Room
|
||||
centralLasTurret = roomNgon 8 200 & rmPmnts .~
|
||||
[ putLasTurret
|
||||
, heightWall 30 (rectNSEW (-90) (-110) 10 (-10))
|
||||
, spanColLightI 0.5 100 (V2 0 (-5)) (V2 0 5)
|
||||
, spanColLightI 0.5 98 (V2 0 (-5)) (V2 0 5)
|
||||
, psPt atFstLnkOut $ PutForeground $ 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 ?~
|
||||
--extTrigLitPos (PS (V2 200 0) 0)
|
||||
--extTrigLitPos (anyLnkInPS 5)
|
||||
extTrigLitPos fstLnkOut
|
||||
( \tp -> Just $ lightSensor (upf $ fromJust $ _plMID tp) (V2 100 0) 0
|
||||
extTrigLitPos (atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18 (-2)), a)))
|
||||
( \tp -> Just $ lightSensor (upf $ fromJust $ _plMID tp) (atFstLnkOutShiftInward 100)
|
||||
)
|
||||
where
|
||||
upf trid mc w | _mcSensor mc > 90 = w & triggers . ix trid .~ const True
|
||||
@@ -68,8 +70,8 @@ centralLasTurret = roomNgon 8 200 & rmPmnts .~
|
||||
rezThenLasTurret :: RandomGen g => State g (Tree (Either Room Room))
|
||||
rezThenLasTurret = do
|
||||
rbox <- rezBoxStart
|
||||
let cenroom = centralLasTurret {_rmLabel = Just 0}
|
||||
doorroom = switchDoorRoom {_rmTakeFrom = Just 0}
|
||||
cenroom <- randomiseOutLinks $ centralLasTurret {_rmLabel = Just 0}
|
||||
let doorroom = switchDoorRoom {_rmTakeFrom = Just 0}
|
||||
contTree = treeFromPost [Left cenroom] (Right doorroom)
|
||||
return $ rbox `appendEitherTree` [contTree]
|
||||
|
||||
@@ -211,7 +213,7 @@ startRoom' = do
|
||||
, tankSquareEmboss4 (dim orange) 50 (h-60)
|
||||
, tankSquare (dim orange) 50 50
|
||||
, tankSquare (dim orange) 50 120
|
||||
, lightSensor (const id) (V2 (0.8*w) (0.25*h)) 0
|
||||
, lightSensor (const id) (PS (V2 (0.8*w) (0.25*h)) 0)
|
||||
, putLasTurret & plSpot .~ PS (V2 (0.8*w) (0.8*h)) 0
|
||||
, sps0 $ PutForeground $ colorSH orange $ pipePP 2 (V3 50 50 25) (V3 50 120 25)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user