Test of lock and key system

This commit is contained in:
2021-11-22 23:54:58 +00:00
parent 05e1307336
commit 5ab5be3087
11 changed files with 84 additions and 20 deletions
+6 -2
View File
@@ -45,6 +45,7 @@ roomGlassOctogon x = createPathGrid $ defaultRoom
,blockLine (V2 (-40) (50-x)) (V2 40 (50-x))
]
, _rmBound = [rectNSWE x (-x) (-x) x]
, _rmName = "glass8gon"
}
where
fx = 4 * x / 5
@@ -101,6 +102,7 @@ roomCross x y = defaultRoom
[rectNSWE y (-y) (-x) x
,rectNSWE x (-x) (-y) y
]
, _rmName = "cross"
}
{- | TODO: pathing -}
roomShuriken
@@ -121,7 +123,8 @@ roomShuriken x y =
, _rmPmnts = [mntLS iShape (V2 x x) (V3 (x-20) x 70)]
, _rmBound = ps
}
in foldr1 combineRooms $ map (\r -> shiftRoomBy (V2 0 0, r) corner) [0,pi/2,pi,3*pi/2]
in (foldr1 combineRooms $ map (\r -> shiftRoomBy (V2 0 0, r) corner) [0,pi/2,pi,3*pi/2])
{_rmName = "shuriken"}
{- | TODO: pathing
Precondition: first float is less than the second by at least 40. -}
roomTwistCross
@@ -145,4 +148,5 @@ roomTwistCross x y z =
, _rmPmnts = [mntLS iShape (V2 x x) (V3 (x-20) (x-20) 70)]
, _rmBound = ps
}
in foldr1 combineRooms $ map (\r -> shiftRoomBy (V2 0 0, r) corner) [0,pi/2,pi,3*pi/2]
in (foldr1 combineRooms $ map (\r -> shiftRoomBy (V2 0 0, r) corner) [0,pi/2,pi,3*pi/2])
{_rmName = "twistCross" }
+2 -2
View File
@@ -53,7 +53,7 @@ lightSensByDoor rm = rm
& rmPmnts %~ (
[ psPt atFstLnkOut $ PutForeground $ colorSH yellow
$ barPP 1.5 (V3 20 (-1) 0) (V3 20 (-1) 80)
, heightWallPS (atNthLnkOutShiftInward 1 50) 30 (rectNSEW (10) (-10) 20 (-20))
, heightWallPS (atNthLnkOutShiftInward 1 100) 30 (rectNSEW (10) (-10) 20 (-20))
, heightWallPS (atFstLnkOutShiftInward 100) 30 (rectNSEW (10) (-10) 20 (-20))
] ++ )
& rmExtPmnt ?~
@@ -76,6 +76,6 @@ lasCenSensEdge n = do
cenroom <- randomiseOutLinks $ (lightSensByDoor cenLasTur) {_rmLabel = Just n}
let doorroom = switchDoorRoom {_rmTakeFrom = Just n}
return $ treeFromTrunk [PassDown door] (Node (PassDown cenroom)
[treeFromPost [PassDown doorroom] (UseAll door), treeFromPost [UseNone door] (UseNone corridor)
[treeFromPost [PassDown doorroom] (UseAll door), treeFromPost [PassDown door] (UseLabel 0 corridor)
]
)