Cleanup and various bugfixes

This commit is contained in:
2021-11-16 21:31:53 +00:00
parent ebe9ad6b90
commit 5d0b48829c
12 changed files with 103 additions and 39 deletions
+6 -5
View File
@@ -66,14 +66,15 @@ roomRect x y xn yn = defaultRoom
lnks = nlnks ++ elnks ++ wlnks ++ slnks
pth = linksAndPath lnks $ map (bimap (+.+ V2 20 20) (+.+ V2 20 20)) (makeGrid xd xn yd yn)
{- Creates a rectangular room, automatically creates links and pathfinding graph at a sensible size. -}
-- it is not clear to me that this works for very small rooms (but it does seem
-- to do so)
roomRectAutoLinks :: Float -> Float -> Room
roomRectAutoLinks x y = (roomRect x y ((ceiling x - 40) `div` 60) ((ceiling y - 40) `div` 60))
roomRectAutoLinks x y = (roomRect x y xn yn)
{_rmPmnts = plmnts}
where
plmnts =
[mntLightLnkCond unusedLnkToPS
-- ,sps0 $ PutForeground $ thinHighBarChain 50 $ rectNSWE y 0 0 x
]
xn = max 1 $ (ceiling x - 40) `div` 60
yn = max 1 $ (ceiling y - 40) `div` 60
plmnts = [mntLightLnkCond unusedLnkToPS ]
{- Combines two rooms into one room.
Mostly involves concatenation. -}
combineRooms :: Room -> Room -> Room