Correct room link position numbering
This commit is contained in:
+9
-30
@@ -1,8 +1,8 @@
|
||||
module Dodge.Room.Start
|
||||
where
|
||||
module Dodge.Room.Start where
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.PlacementSpot
|
||||
import Dodge.Room.RunPast
|
||||
import Dodge.Room.LasTurret
|
||||
import Dodge.Data
|
||||
import Dodge.Default
|
||||
import Dodge.Tree
|
||||
@@ -49,44 +49,23 @@ minigunfakeout = do
|
||||
,PassDown keyholeCorridor,PassDown corridor])
|
||||
`treeFromPost` UseAll door
|
||||
|
||||
centralLasTurret :: Room
|
||||
centralLasTurret = roomNgon 8 200 & rmPmnts .~
|
||||
[ putLasTurret 0.02
|
||||
, heightWall 30 (rectNSEW (-90) (-110) 20 (-20))
|
||||
, mntLightLnkCond unusedLnkToPS
|
||||
--, 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 (atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
|
||||
( \tp -> Just $ lightSensor (upf $ fromJust $ _plMID tp) (atFstLnkOutShiftInward 100)
|
||||
)
|
||||
where
|
||||
upf trid mc w | _mcSensor mc > 900 = w & triggers . ix trid .~ const True
|
||||
| otherwise = w
|
||||
|
||||
lasSensorTurretTest :: RandomGen g => Int -> State g (SubCompTree Room)
|
||||
lasSensorTurretTest n = do
|
||||
cenroom <- randomiseOutLinks $ centralLasTurret {_rmLabel = Just n}
|
||||
let doorroom = switchDoorRoom {_rmTakeFrom = Just n}
|
||||
return $ treeFromPost [PassDown door,PassDown cenroom,PassDown doorroom] (UseAll door)
|
||||
|
||||
rezThenLasTurret :: RandomGen g => State g (SubCompTree Room)
|
||||
rezThenLasTurret = do
|
||||
rbox <- rezBoxStart
|
||||
cenroom <- randomiseOutLinks $ centralLasTurret {_rmLabel = Just 0}
|
||||
cenroom <- randomiseOutLinks $ (lightSensInsideDoor cenLasTur) {_rmLabel = Just 0}
|
||||
let doorroom = switchDoorRoom {_rmTakeFrom = Just 0}
|
||||
contTree = treeFromPost [PassDown cenroom,PassDown doorroom] (UseAll door)
|
||||
return $ rbox `passUntilUseAll` [contTree]
|
||||
|
||||
room2 :: RandomGen g => Int -> State g (SubCompTree Room)
|
||||
room2 = lasCenSensEdge
|
||||
|
||||
startRoom :: RandomGen g => Int -> State g (SubCompTree Room)
|
||||
startRoom i = join $ takeOne
|
||||
[-- roomMiniIntro
|
||||
minigunfakeout
|
||||
, rezBoxesWp
|
||||
--minigunfakeout
|
||||
rezBoxesWp
|
||||
, rezBoxesThenWeaponRoom
|
||||
, rezBoxThenWeaponRoom
|
||||
, rezBoxesWpCrit
|
||||
@@ -220,7 +199,7 @@ startRoom' = do
|
||||
, tankSquareEmboss4 (dim orange) 50 (h-60)
|
||||
, tankSquare (dim orange) 50 50
|
||||
, tankSquare (dim orange) 50 120
|
||||
, lightSensor (const id) (PS (V2 (0.8*w) (0.25*h)) 0)
|
||||
, lightSensor 10 (const id) (PS (V2 (0.8*w) (0.25*h)) 0)
|
||||
, putLasTurret 0.005 & 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