Remove _plGenUpdate field, instead allow Placements to take World arg

This commit is contained in:
2022-06-02 20:00:03 +01:00
parent 7c4a853d70
commit 024f72da20
13 changed files with 54 additions and 53 deletions
+4 -4
View File
@@ -101,7 +101,7 @@ unusedSpotAwayFromLink x = rprBool $ \rp r -> _rpLinkStatus rp == NotLink
setFallback :: Placement -> Placement -> Placement
setFallback fallback
= (plSpot . psFallback %~ maybe (Just fallback) Just)
. (plIDCont %~ fmap (fmap $ setFallback fallback)
. (plIDCont %~ fmap (fmap (fmap $ setFallback fallback))
)
unusedOffPathAwayFromLink :: Float -> PlacementSpot
@@ -122,9 +122,9 @@ twoRoomPoss :: (RoomPos -> Room -> Bool)
-> (RoomPos -> Room -> Bool)
-> (PlacementSpot -> PlacementSpot -> Placement)
-> Placement
twoRoomPoss cond1 cond2 f = Placement (rprBool cond1) PutNothing Nothing Nothing
$ \pl1 -> Just $ Placement (rprBool cond2) PutNothing Nothing Nothing
$ \pl2 -> Just $ f (_plSpot pl1) (_plSpot pl2)
twoRoomPoss cond1 cond2 f = Placement (rprBool cond1) PutNothing Nothing
$ \_ pl1 -> Just $ Placement (rprBool cond2) PutNothing Nothing
$ \_ pl2 -> Just $ f (_plSpot pl1) (_plSpot pl2)
--isUnusedLnk :: RoomPos -> Bool
--isUnusedLnk rp = case _rpLinkStatus rp of