Work on more complicated terminals
This commit is contained in:
@@ -21,6 +21,7 @@ module Dodge.PlacementSpot
|
||||
, twoRoomPoss
|
||||
, isUnusedLnkType
|
||||
, rprBoolShift
|
||||
, rprShift
|
||||
, rprBool
|
||||
, shiftInBy
|
||||
, resetPLUse
|
||||
@@ -71,6 +72,15 @@ resetPLUse (PSPos f g fallback) = PSPos f' g fallback
|
||||
f' rp = fmap (second (rpPlacementUse .~ 0)) . f rp
|
||||
resetPLUse _ = error "Tried to reset _rpPlacementUse of non PSPos placement"
|
||||
|
||||
rprShift
|
||||
:: (RoomPos -> Room -> Maybe (Point2,Float))
|
||||
-> PlacementSpot
|
||||
rprShift t = PSPos f (const id) Nothing
|
||||
where
|
||||
f rp r = case t rp r of
|
||||
Just (p,a) -> Just (PS p a, rp & rpPlacementUse +~ 1)
|
||||
Nothing -> Nothing
|
||||
|
||||
rprBoolShift :: (RoomPos -> Room -> Bool)
|
||||
-> ((Point2,Float) -> (Point2,Float))
|
||||
-> PlacementSpot
|
||||
|
||||
Reference in New Issue
Block a user