Remove separate wall color, should be handled by material type

This commit is contained in:
2025-10-23 21:27:14 +01:00
parent 819f0d37ea
commit 3c6d269d00
24 changed files with 136 additions and 123 deletions
+4 -2
View File
@@ -47,7 +47,8 @@ colCrWall w c
p2 = c ^. crPos . _xy
ls = _wlLine <$> wls
ls' = filter (uncurry $ isLHS p1) ls
wls = filter (not . _wlWalkable) $ wlsNearRect (p2 +.+ V2 r r) (p2 -.- V2 r r) w
wls = filter notff $ wlsNearRect (p2 +.+ V2 r r) (p2 -.- V2 r r) w
notff x = x ^. wlMaterial /= ForceField
-- the amount to push creatures out from walls, extra to their radius
wallBuffer :: Float
@@ -88,9 +89,10 @@ pushOrCrush wls cr = case mapMaybe (pushOutFromWall (crRad (cr ^. crType)) cpos)
crOnWall :: Creature -> World -> Bool
crOnWall cr =
any (uncurry (circOnSeg p r) . _wlLine)
. filter (not . _wlWalkable)
. filter notff
. wlsNearPoint p
where
notff x = x ^. wlMaterial /= ForceField
p = cr ^. crPos . _xy
r = crRad (cr ^. crType)