Allow to log position of placement spot

This commit is contained in:
2025-09-29 22:34:44 +01:00
parent bf9a2250da
commit a2eb0e026b
13 changed files with 180 additions and 152 deletions
+7 -5
View File
@@ -96,7 +96,8 @@ roomRect x y xn yn =
zipWith (lnkBothAnd (OnEdge edge) edgefrom1 edgefrom2) [0 ..]
. zipCountDown
pth = linksAndPath' lnks $ map (bimap (+.+ V2 20 20) (+.+ V2 20 20)) (makeGrid xd xn yd yn)
makeonpos (p, a) = RoomPos p 0 (S.singleton $ RoomPosOnPath $ makerpedges a) NotLink 0
makeonpos (p, a) = RoomPos p 0 (S.singleton $ RoomPosOnPath $ makerpedges a)
NotLink mempty
makerpedges (a, b) =
S.fromList
[ PathFromEdge South b
@@ -106,7 +107,8 @@ roomRect x y xn yn =
]
posps' = map (over _1 (+.+ V2 20 20)) $ gridPoints'' xd (xn + 1) yd (yn + 1)
interposps' = map (over _1 (+.+ V2 (20 + xd / 2) (20 + yd / 2))) $ gridPoints'' xd xn yd yn
makeoffpos (p, a) = RoomPos p 0 (S.singleton $ RoomPosOffPath $ makerpedges' a) NotLink 0
makeoffpos (p, a) = RoomPos
p 0 (S.singleton $ RoomPosOffPath $ makerpedges' a) NotLink mempty
makerpedges' (a, b) =
S.fromList
[ PathFromEdge South b
@@ -203,8 +205,8 @@ quarterRoomTri w = do
]
, _rmPmnts = b ++ [mntLS iShape (V2 (w -20) w) (V3 (w -20) (w -20) 70)]
, _rmPos =
[ RoomPos (V2 (w -20) (w -20)) pi S.empty NotLink 0
, RoomPos (V2 (w -15) (w -25)) pi S.empty NotLink 0
[ RoomPos (V2 (w -20) (w -20)) pi S.empty NotLink mempty
, RoomPos (V2 (w -15) (w -25)) pi S.empty NotLink mempty
]
, _rmBound = [[V2 0 0, V2 w w, V2 (- w) w]]
}
@@ -252,7 +254,7 @@ quarterRoomSquare w = do
]
, _rmPmnts = b ++ [blockLine (V2 (w / 2) (w / 2)) (V2 0 w)]
, _rmPos =
[ RoomPos p pi S.empty NotLink 0
[ RoomPos p pi S.empty NotLink mempty
| p <- [V2 20 (2 * w -40), V2 25 (2 * w -45)]
]
, --, _rmBound = [map toV2 [(w,w),(0,2*w),(-w,w)]]