Move toward better info display during level generation

This commit is contained in:
2021-11-10 23:40:04 +00:00
parent 9aefc11e17
commit a195157e54
13 changed files with 122 additions and 118 deletions
+2 -2
View File
@@ -18,8 +18,8 @@ import System.Random
import Control.Monad.State
{- | A passage with a switch that opens forward access while closing backwards access. -}
airlock :: RandomGen g => State g Room
--airlock = takeOne [airlock0,airlock90,airlockCrystal,airlockZ]
airlock = takeOne [airlockZ]
airlock = takeOne [airlock0,airlock90,airlockCrystal,airlockZ]
--airlock = takeOne [airlockZ]
{- | Straight airlock -}
airlock0 :: Room
airlock0 = defaultRoom
+3
View File
@@ -51,6 +51,9 @@ diagonalLinesRect pa pb w d ang = zip lhsPoints $ map findDiPoint lhsPoints
thinHighBar :: Float -> Point2 -> Point2 -> Shape
thinHighBar = highBar 3
thinHighBarChain :: Float -> [Point2] -> Shape
thinHighBarChain h = foldMap (uncurry $ thinHighBar h) . loopPairs
thickHighBar :: Float -> Point2 -> Point2 -> Shape
thickHighBar = highBar 5
+4 -1
View File
@@ -71,7 +71,10 @@ roomRectAutoLinks :: Float -> Float -> Room
roomRectAutoLinks x y = (roomRect x y ((ceiling x - 40) `div` 60) ((ceiling y - 40) `div` 60))
{_rmPS = plmnts}
where
plmnts = [mntLightLnkCond (const True)]
plmnts =
[mntLightLnkCond (const True)
-- ,sps0 $ PutForeground $ thinHighBarChain 50 $ rectNSWE y 0 0 x
]
{- Combines two rooms into one room.
Mostly involves concatenation. -}
combineRooms :: Room -> Room -> Room
+4 -2
View File
@@ -30,7 +30,8 @@ startRoom = do
girderV 40 20 10 (V2 0 (h/2)) (V2 w (h/2))
treeFromPost [Left rezBox, Left door] . Right
<$> randomiseOutLinks (shiftRoomBy (V2 (-20) (-20),0)
$ roomRectAutoLinks w h & rmPS .~
$ roomRectAutoLinks w h & rmPS %~
(
[ fground
, mountLightJ (V2 0 (h/3)) (V3 40 (h/3) 70)
, tankSquareEmboss4 (dim orange) 50 (h-60)
@@ -39,5 +40,6 @@ startRoom = do
, lightSensor (V2 (0.8*w) (0.25*h)) 0
, putLasTurret & placementSpot .~ PS (V2 (0.8*w) (0.8*h)) 0
, sps0 $ PutForeground $ colorSH orange $ pipePP 2 (V3 50 50 25) (V3 50 120 25)
]
] ++
)
)