Improvements to rooms and view distances

This commit is contained in:
2022-03-07 09:16:16 +00:00
parent 1364e7c8c8
commit 81830d87a3
12 changed files with 140 additions and 100 deletions
+9
View File
@@ -27,6 +27,15 @@ unusedSpotAwayFromInLink x = PSPos f (const id) Nothing
where
inlinkposs = usedRoomInLinkPoss r
unusedSpotNearInLink :: Float -> PlacementSpot
unusedSpotNearInLink x = PSPos f (const id) Nothing
where
f rp r = case rp of
UnusedSpot p a | any ( (<x) . dist p ) inlinkposs -> Just (PS p a,UsedSpot p a)
_ -> Nothing
where
inlinkposs = usedRoomInLinkPoss r
usedRoomInLinkPoss :: Room -> [Point2]
usedRoomInLinkPoss r = mapMaybe f $ _rmPos r
where