Somewhat simplify RoomPos types

This commit is contained in:
2025-10-05 20:47:28 +01:00
parent 43db5a2ebc
commit 4cc5477f07
5 changed files with 17 additions and 22 deletions
+2 -2
View File
@@ -97,7 +97,7 @@ roomRect x y xn yn =
. zipCountDown
pth = linksGridToPath 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)
makeonpos (p, a) = RoomPos p 0 (S.singleton $ RoomPosOnGrid $ makerpedges a)
NotLink mempty
makerpedges (a, b) =
S.fromList
@@ -109,7 +109,7 @@ 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 mempty
p 0 (S.singleton $ RoomPosOffGrid $ makerpedges' a) NotLink mempty
makerpedges' (a, b) =
S.fromList
[ PathFromEdge South b