Cleanup
This commit is contained in:
+16
-4
@@ -44,12 +44,24 @@ randEdgeTank = do
|
|||||||
& plSpot .~ rprBool (\rp _ -> _rpPlacementUse rp == 0
|
& plSpot .~ rprBool (\rp _ -> _rpPlacementUse rp == 0
|
||||||
&& rpOffPathEdge (PathFromEdge edge 0) rp)
|
&& rpOffPathEdge (PathFromEdge edge 0) rp)
|
||||||
|
|
||||||
|
randEdgeTanks :: RandomGen g => Int -> State g [Placement]
|
||||||
|
randEdgeTanks i = do
|
||||||
|
edge <- takeOne cardList
|
||||||
|
basetank <- randomTank
|
||||||
|
return $ replicate i $ basetank
|
||||||
|
& plType . putBlock . blDraw
|
||||||
|
%~ fmap (<> noPic ( colorSH orange (verticalPipe 80
|
||||||
|
<> horPipe 80 0 (70 *.* cardVec edge))))
|
||||||
|
-- 70 is a guess, the true value depends on the distance to the wall
|
||||||
|
& plSpot .~ rprBool (\rp _ -> _rpPlacementUse rp == 0
|
||||||
|
&& rpOffPathEdge (PathFromEdge edge 0) rp)
|
||||||
|
|
||||||
tanksPipesRoom :: RandomGen g => State g Room
|
tanksPipesRoom :: RandomGen g => State g Room
|
||||||
tanksPipesRoom = do
|
tanksPipesRoom = do
|
||||||
w <- state $ randomR (200,400)
|
w <- state $ randomR (200,300)
|
||||||
h <- state $ randomR (200,400)
|
h <- state $ randomR (200,300)
|
||||||
i <- state $ randomR (1,5)
|
i <- state $ randomR (2,5)
|
||||||
tanks <- replicateM i randEdgeTank
|
tanks <- randEdgeTanks i
|
||||||
return $ roomRectAutoLinks w h & rmPmnts .++~ tanks
|
return $ roomRectAutoLinks w h & rmPmnts .++~ tanks
|
||||||
|
|
||||||
tanksRoom :: RandomGen g => [Creature] -> [Item] -> State g Room
|
tanksRoom :: RandomGen g => [Creature] -> [Item] -> State g Room
|
||||||
|
|||||||
Reference in New Issue
Block a user