Add more information to Room Positions

This commit is contained in:
2022-06-15 12:34:36 +01:00
parent bf1bfa5453
commit 62dae5bebe
12 changed files with 192 additions and 112 deletions
+10 -7
View File
@@ -21,9 +21,11 @@ roomsContaining crs its = tToBTree "roomsContaining" <$> roomsContaining' crs it
roomsContaining' :: RandomGen g => [Creature] -> [Item] -> State g (Tree Room)
roomsContaining' crs its = do
endroom <- join $ takeOne
[ randomFourCornerRoomCrsIts crs its
, tanksRoom crs its
, roomPillarsContaining crs its
[roomPillarsSquare
-- [ randomFourCornerRoomCrsIts crs its
-- , tanksRoom crs its
-- , roomPillarsContaining crs its
-- , roomPillarsPassage <&> rmPmnts .++~ crsItmsUnused crs its
]
return (pure $ cleatOnward endroom)
@@ -31,10 +33,11 @@ roomPillarsContaining :: RandomGen g => [Creature] -> [Item] -> State g Room
roomPillarsContaining crs itms = do
(w,wn) <- takeOne [(240,2),(340,3)]
(h,hn) <- takeOne [(240,2),(340,3)]
let plmnts =
map (\it -> sps0 (PutFlIt it) & plSpot .~ anyUnusedSpot) itms
++ map (\cr -> sps0 (PutCrit cr) & plSpot .~ unusedSpotAwayFromLink 50) crs
roomPillars 30 w h wn hn <&> rmPmnts .++~ plmnts
roomPillars 30 w h wn hn <&> rmPmnts .++~ crsItmsUnused crs itms
crsItmsUnused :: [Creature] -> [Item] -> [Placement]
crsItmsUnused crs itms = map (\it -> sps0 (PutFlIt it) & plSpot .~ anyUnusedSpot) itms
++ map (\cr -> sps0 (PutCrit cr) & plSpot .~ unusedSpotAwayFromLink 50) crs
pedestalRoom :: RandomGen g => Item -> State g Room