Work on placements/room generation

This commit is contained in:
2025-08-22 13:42:51 +01:00
parent e7b52f4487
commit f641805845
14 changed files with 294 additions and 596 deletions
+6 -1
View File
@@ -1,6 +1,7 @@
--{-# LANGUAGE LambdaCase #-}
module Dodge.PlacementSpot
( atFstLnkOut
, atNthLnkOutShiftBy
, rpIsOnPath
, rpIsOffPath
, rpOffPathFromEdge
@@ -34,6 +35,7 @@ module Dodge.PlacementSpot
, shiftByV2
, usedRoomLinkPoss
, usedRoomInLinkPoss
, atNthLinkOut
) where
import Dodge.Data.GenWorld
@@ -209,7 +211,10 @@ usedRoomLinkPoss r = mapMaybe f $ _rmPos r
_ -> Nothing
atFstLnkOut :: PlacementSpot
atFstLnkOut = rprBool $ \rp _ -> rp ^? rpLinkStatus . rplsChildNum == Just 0
atFstLnkOut = atNthLinkOut 0
atNthLinkOut :: Int -> PlacementSpot
atNthLinkOut n = rprBool $ \rp _ -> rp ^? rpLinkStatus . rplsChildNum == Just n
atNthLnkOutShiftBy :: Int -> ((Point2,Float) -> (Point2,Float)) -> PlacementSpot
atNthLnkOutShiftBy n = rprBoolShift