Add automatic girder light placement for rectangular rooms
This commit is contained in:
@@ -212,8 +212,9 @@ weaponUnderCrits = do
|
||||
[PassDown $ addwpat (V2 20 0) corridorN,PassDown $ addwpat (V2 20 0) corridorN]
|
||||
(singleUseAll (set rmPmnts plmnts corridorN))
|
||||
rcp <- roomCenterPillar
|
||||
deadEndRoom' <- takeOne
|
||||
[ addwpat (V2 120 20) (roomPillars 0 240 240 2 2)
|
||||
rmpils <- roomPillars 30 240 240 2 2
|
||||
deadEndRoom' <- takeOne
|
||||
[ addwpat (V2 120 20) rmpils
|
||||
, addwpat (V2 120 20) rcp]
|
||||
junctionRoom <- takeOne [PassDown tEast,PassDown tWest]
|
||||
return $ treeFromTrunk [PassDown corridorN,PassDown corridorN]
|
||||
@@ -242,8 +243,8 @@ weaponBehindPillar = do
|
||||
|
||||
weaponBetweenPillars :: RandomGen g => State g (SubCompTree Room)
|
||||
weaponBetweenPillars = do
|
||||
w <- state $ randomR (240,360)
|
||||
h <- state $ randomR (240,360)
|
||||
(w,wn) <- takeOne [(240,2),(340,3)]
|
||||
(h,hn) <- takeOne [(240,2),(340,3)]
|
||||
let wpPos = rprBool $ \rp r -> and
|
||||
[ RoomPosOnPath `S.member` _rpType rp
|
||||
, _rpPlacementUse rp == 0
|
||||
@@ -256,7 +257,7 @@ weaponBetweenPillars = do
|
||||
, _rpPlacementUse rp == 0
|
||||
, all ((>100) . dist (_rpPos rp)) (usedRoomLinkPoss r)
|
||||
]
|
||||
let theRoom = roomPillars 0 w h 1 1 & rmPmnts .++~
|
||||
theRoom <- roomPillars 30 w h wn hn <&> rmPmnts .++~
|
||||
sps wpPos (RandPS randFirstWeapon) : map (`sps` randC1) critPlacementSpots
|
||||
return $ singleUseAll theRoom
|
||||
|
||||
|
||||
Reference in New Issue
Block a user