Cleanup
This commit is contained in:
+8
-12
@@ -5,6 +5,7 @@ module Dodge.Room.Room
|
||||
, roomMiniIntro
|
||||
, roomCCrits
|
||||
, doubleCorridorBarrels
|
||||
, pistolerRoom
|
||||
) where
|
||||
import Dodge.UseAll
|
||||
import Dodge.Data
|
||||
@@ -46,7 +47,7 @@ roomC w h = do
|
||||
maybeaddgird <- takeOne [return, addRandomGirderFromWest 0, addRandomGirderFrom North 0]
|
||||
maybeaddgird =<< (shuffleLinks $ roomRectAutoLinks w h
|
||||
& rmLinks %~
|
||||
( (setInLinks (\rl -> S.fromList [FromEast 0,OnEdge South] `S.isSubsetOf` _rlType rl))
|
||||
( (setInLinks (\rl -> S.fromList [(FromEdge East) 0,OnEdge South] `S.isSubsetOf` _rlType rl))
|
||||
. (setOutLinks (\rl -> OnEdge West `S.member` _rlType rl))
|
||||
)
|
||||
& rmPmnts .++~ (wl : replicate ntanks thetank)
|
||||
@@ -306,7 +307,7 @@ pillarGrid :: RandomGen g => State g Room
|
||||
pillarGrid = do
|
||||
let f2 x y = singleBlock (V2 x y)
|
||||
f <- takeOne [f2]
|
||||
h <- state $ randomR (400,800)
|
||||
h <- state $ randomR (200,400)
|
||||
let w = h
|
||||
i <- takeOne [3,4,5]
|
||||
let j = fromIntegral i
|
||||
@@ -326,22 +327,17 @@ pillarGrid = do
|
||||
-- cornerRestrict (V2 x y,_)
|
||||
-- = (x > 40 && x < h - 40)
|
||||
-- || (y > 40 && y < h - 40)
|
||||
let plmnts = replicate 8 (mntLightLnkCond useUnusedLnk)
|
||||
++
|
||||
concat [f x y | x<-xs,y<-ys]
|
||||
let plmnts = replicate 8 (mntLightLnkCond useUnusedLnk) ++ concat [f x y | x<-xs,y<-ys]
|
||||
return $ roomRect w h (max i 2) (max i 2)
|
||||
& rmPmnts .~ plmnts
|
||||
& rmRandPSs .~ [rps]
|
||||
|
||||
-- TODO remove possible identical draws on random PSs
|
||||
pistolerRoom :: RandomGen g => State g Room
|
||||
pistolerRoom = pillarGrid
|
||||
<&> rmPmnts %~ (
|
||||
[spNoID (PSRoomRand 0 (uncurry PS)) (PutCrit pistolCrit)
|
||||
,spNoID (PSRoomRand 0 (uncurry PS)) (PutCrit pistolCrit)
|
||||
,spNoID (PSRoomRand 0 (uncurry PS)) (PutCrit pistolCrit)
|
||||
]
|
||||
++)
|
||||
pistolerRoom = pillarGrid <&> rmPmnts .++~
|
||||
replicate 3
|
||||
(spNoID (rprBool $ \rp _ -> _rpPlacementUse rp == 0 && RoomPosOnPath `S.member` _rpType rp)
|
||||
(PutCrit pistolCrit))
|
||||
|
||||
shootingRange :: RandomGen g => State g (MetaTree Room String)
|
||||
shootingRange = do
|
||||
|
||||
Reference in New Issue
Block a user