Move wall damages to external position

This commit is contained in:
2022-06-19 15:05:12 +01:00
parent f2d6504634
commit a7e6d6f3cc
14 changed files with 47 additions and 18 deletions
+2 -2
View File
@@ -85,13 +85,13 @@ rpIsOffPath = any f . _rpType
rpOffPathEdge :: PathEdge -> RoomPos -> Bool
rpOffPathEdge pe = any f . _rpType
where
f rt = maybe False (any (== pe)) (rt ^? offPathEdges)
f rt = maybe False (pe `elem`) (rt ^? offPathEdges)
-- test whether a roomPos is on the path with a given from edge value
rpOnPathEdge :: PathEdge -> RoomPos -> Bool
rpOnPathEdge pe = any f . _rpType
where
f rt = maybe False (any (== pe)) (rt ^? onPathEdges)
f rt = maybe False (pe `elem`) (rt ^? onPathEdges)
resetPLUse :: PlacementSpot -> PlacementSpot
resetPLUse (PSPos f g fallback) = PSPos f' g fallback