Cleanup zoning

This commit is contained in:
2022-06-28 13:43:37 +01:00
parent e770fba7bf
commit 9801a40b9e
14 changed files with 84 additions and 106 deletions
+3 -3
View File
@@ -47,8 +47,8 @@ colCrWall w c
p2 = _crPos c
ls = _wlLine <$> wls
ls' = filter (uncurry $ isLHS p1) ls
wls' = S.filter (not . _wlWalkable) $ wallsNearPoint p2 w
wls = runIdentity . S.toList_ . S.filter (not . _wlWalkable) $ wallsNearPoint p2 w
wls' = S.filter (not . _wlWalkable) $ wlsNearPoint p2 w
wls = runIdentity . S.toList_ . S.filter (not . _wlWalkable) $ wlsNearPoint p2 w
--wallPoints = map fst ls
-- the amount to push creatures out from walls, extra to their radius
@@ -88,7 +88,7 @@ crOnWall :: Creature -> World -> Bool
crOnWall cr = runIdentity
. S.any_ (uncurry (circOnSeg p r) . _wlLine)
. S.filter (not . _wlWalkable)
. wallsNearPoint p
. wlsNearPoint p
where
p = _crPos cr
r = _crRad cr