Fix bug in room position generation
This commit is contained in:
@@ -4,6 +4,7 @@ module Dodge.PlacementSpot
|
||||
, rpIsOnPath
|
||||
, rpIsOffPath
|
||||
, rpOffPathEdge
|
||||
, rpOnPathEdge
|
||||
, useUnusedLnk
|
||||
, psRandRanges
|
||||
, useRoomPosCond
|
||||
@@ -86,6 +87,12 @@ rpOffPathEdge pe = any f . _rpType
|
||||
where
|
||||
f rt = maybe False (any (== pe)) (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)
|
||||
|
||||
resetPLUse :: PlacementSpot -> PlacementSpot
|
||||
resetPLUse (PSPos f g fallback) = PSPos f' g fallback
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user