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
+4 -4
View File
@@ -205,7 +205,7 @@ weaponBetweenPillars = do
(h, hn) <- takeOne [(240, 2), (340, 3)]
let wpPos = rprBool $ \rp r ->
and
[ rpIsOnPath rp
[ rpIsOnGrid rp
, null $ _rpPlacementUse rp
, _rpLinkStatus rp == NotLink
, any ((< 100) . dist (_rpPos rp)) (usedRoomInLinkPoss r)
@@ -215,7 +215,7 @@ weaponBetweenPillars = do
critPlacementSpots <- replicateM ncrits $
randDirPS $
rprBool $ \rp r ->
rpIsOnPath rp
rpIsOnGrid rp
&& null (_rpPlacementUse rp)
&& all ((> 100) . dist (_rpPos rp)) (usedRoomLinkPoss r)
( roomPillars 30 w h wn hn
@@ -334,7 +334,7 @@ pistolerRoom = do
.++~ replicate
3
( psPtPl
(rprBool $ \rp _ -> null (_rpPlacementUse rp) && rpIsOnPath rp)
(rprBool $ \rp _ -> null (_rpPlacementUse rp) && rpIsOnGrid rp)
(PutCrit chaseCrit)
)
@@ -374,7 +374,7 @@ spawnerRoom = do
roomC x y <&> rmPmnts
.:~ psPtPl
( rprBool $ \rp _ ->
null (_rpPlacementUse rp) && rpIsOnPath rp
null (_rpPlacementUse rp) && rpIsOnGrid rp
&& xV2 (_rpPos rp) < x / 2
&& yV2 (_rpPos rp) < y / 2
)