Redo PathFrom name change

This commit is contained in:
2022-07-01 18:48:33 +01:00
parent 516cc6d29e
commit 4d1f1547bc
4 changed files with 16 additions and 16 deletions
+8 -8
View File
@@ -3,8 +3,8 @@ module Dodge.PlacementSpot
( atFstLnkOut
, rpIsOnPath
, rpIsOffPath
, rpOffPathEdge
, rpOnPathEdge
, rpOffPathFromEdge
, rpOnPathFromEdge
, useUnusedLnk
, psRandRanges
, useRoomPosCond
@@ -82,16 +82,16 @@ rpIsOffPath = any f . _rpType
where
f RoomPosOffPath {} = True
f _ = False
rpOffPathEdge :: PathEdge -> RoomPos -> Bool
rpOffPathEdge pe = any f . _rpType
rpOffPathFromEdge :: PathFromEdge -> RoomPos -> Bool
rpOffPathFromEdge pe = any f . _rpType
where
f rt = maybe False (pe `elem`) (rt ^? offPathEdges)
f rt = maybe False (pe `elem`) (rt ^? offPathFromEdges)
-- test whether a roomPos is on the path with a given from edge value
rpOnPathEdge :: PathEdge -> RoomPos -> Bool
rpOnPathEdge pe = any f . _rpType
rpOnPathFromEdge :: PathFromEdge -> RoomPos -> Bool
rpOnPathFromEdge pe = any f . _rpType
where
f rt = maybe False (pe `elem`) (rt ^? onPathEdges)
f rt = maybe False (pe `elem`) (rt ^? onPathFromEdges)
resetPLUse :: PlacementSpot -> PlacementSpot
resetPLUse (PSPos f g fallback) = PSPos f' g fallback