Tweak block sounds
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{- Connecting rooms designed with a pass-through technique in mind. -}
|
||||
module Dodge.Room.RoadBlock
|
||||
where
|
||||
import Dodge.Data
|
||||
import Geometry
|
||||
import Dodge.Default.Room
|
||||
import Dodge.LevelGen.Data
|
||||
@@ -56,8 +57,7 @@ longBlockedCorridor :: RandomGen g => State g (Tree (Either Room Room))
|
||||
longBlockedCorridor = do
|
||||
r <- state $ randomR (0,pi)
|
||||
n <- state $ randomR (0,3)
|
||||
let plmnts = [sPS (V2 20 40) r $ PutBlock [5,5,5] (V4 (150/256) (75/256) 0 (250/256))
|
||||
$ reverse $ rectNSWE 10 (-10) (-10) 10
|
||||
let plmnts = [sPS (V2 20 40) r $ dirtPoly $ square 10
|
||||
,sPS (V2 20 15) 0 putLamp
|
||||
]
|
||||
sequence $ treeFromPost (replicate n $ Left <$> randomiseOutLinks corridor)
|
||||
@@ -68,24 +68,24 @@ blockedCorridor :: RandomGen g => State g (Tree (Either Room Room))
|
||||
blockedCorridor = do
|
||||
r <- state $ randomR (0,pi)
|
||||
let plmnts =
|
||||
[sPS (V2 20 40) r $ PutBlock [5,5,5] (V4 (150/256) ( 75/256) 0 ( 250/256))
|
||||
$ reverse $ rectNSWE 10 (-10) (-10) 10
|
||||
[sPS (V2 20 40) r $ dirtPoly $ square 10
|
||||
,spanLightI (V2 0 15) (V2 40 15)
|
||||
]
|
||||
sequence $ treeFromPost [] $ return $ Right $ set rmPmnts plmnts corridor
|
||||
|
||||
dirtPoly :: [Point2] -> PSType
|
||||
dirtPoly = PutBlock DirtBlock [1] (V4 (150/256) ( 75/256) 0 ( 250/256)) . reverse
|
||||
|
||||
-- | A single corridor with a destructible block blocking it.
|
||||
blockedCorridor' :: RandomGen g => State g Room
|
||||
blockedCorridor' = do
|
||||
r <- state $ randomR (0,pi)
|
||||
theblocks <- takeOne [ [sPS (V2 20 40) r $ PutBlock [1] thecol $ reverse $ square 10]
|
||||
, [ sPS (V2 5 40) r $ PutBlock [1] thecol $ reverse $ square 10
|
||||
, sPS (V2 35 40) (r+0.5) $ PutBlock [1] thecol $ reverse $ square 10
|
||||
theblocks <- takeOne [ [sPS (V2 20 40) r $ dirtPoly $ reverse $ square 10]
|
||||
, [ sPS (V2 5 40) r $ dirtPoly $ square 10
|
||||
, sPS (V2 35 40) (r+0.5) $ dirtPoly $ square 10
|
||||
]
|
||||
]
|
||||
return $ corridor & rmPmnts .~ theblocks
|
||||
where
|
||||
thecol = V4 (150/256) ( 75/256) 0 ( 250/256)
|
||||
|
||||
lasTunnel :: Room
|
||||
lasTunnel = defaultRoom
|
||||
|
||||
Reference in New Issue
Block a user