Move main to allow for new executables
This commit is contained in:
+15
-15
@@ -1,4 +1,4 @@
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
--{-# LANGUAGE TupleSections #-}
|
||||
{- | Rooms containing long doors, probably with a big reveal behind them.
|
||||
-}
|
||||
module Dodge.Room.LongDoor
|
||||
@@ -33,18 +33,18 @@ twinSlowDoorRoom
|
||||
twinSlowDoorRoom drID w h x = defaultRoom
|
||||
{ _rmPolys = ps
|
||||
, _rmLinks =
|
||||
[ ((V2 (w) (h/2)) , negate $ pi/2)
|
||||
, ((V2 (-w) (h/2)) , pi/2)
|
||||
, ((V2 (0) (-h)), pi)
|
||||
[ (V2 w (h/2) , negate $ pi/2)
|
||||
, (V2 (-w) (h/2) , pi/2)
|
||||
, (V2 0 (-h), pi)
|
||||
]
|
||||
, _rmPath = []
|
||||
, _rmPS =
|
||||
[ sPS (V2 (0) (h/2)) 0 putLamp
|
||||
, sPS (V2 (25) (5)) 0 putLamp
|
||||
, sPS (V2 (negate 25) (5)) 0 putLamp
|
||||
[ sPS (V2 0 (h/2)) 0 putLamp
|
||||
, sPS (V2 25 5) 0 putLamp
|
||||
, sPS (V2 (negate 25) 5) 0 putLamp
|
||||
, sPS (V2 0 0) 0 $ PutDoor col (not . cond) drL
|
||||
, sPS (V2 0 0) 0 $ PutDoor col (not . cond) drR
|
||||
, sPS (V2 (0) (h-5)) pi $ PutButton $ makeButton col
|
||||
, sPS (V2 0 (h-5)) pi $ PutButton $ makeButton col
|
||||
(over worldState (M.insert (DoorNumOpen drID) True))
|
||||
]
|
||||
, _rmBound = ps
|
||||
@@ -54,9 +54,9 @@ twinSlowDoorRoom drID w h x = defaultRoom
|
||||
[rectNSWE h (-2) (-w) w
|
||||
,rectNSWE 20 (-h) (negate x) x
|
||||
]
|
||||
drL = fmap ((\h' -> ((V2 (x) (-h')),(V2 (x) (h-h')))) . (* h) . (/ fromIntegral nDrp) . fromIntegral)
|
||||
drL = fmap ((\h' -> (V2 x (-h'),V2 x (h-h'))) . (* h) . (/ fromIntegral nDrp) . fromIntegral)
|
||||
[0..nDrp]
|
||||
drR = fmap ((\h' -> ((V2 (-x) (-h')),(V2 (-x) (h-h')))) . (* h) . (/ fromIntegral nDrp) . fromIntegral)
|
||||
drR = fmap ((\h' -> (V2 (-x) (-h'),V2 (-x) (h-h'))) . (* h) . (/ fromIntegral nDrp) . fromIntegral)
|
||||
[0..nDrp]
|
||||
nDrp = ceiling h :: Int
|
||||
cond w' = or $ M.lookup (DoorNumOpen drID) (_worldState w')
|
||||
@@ -67,8 +67,8 @@ twinSlowDoorChasers
|
||||
=> Int -- ^ Door id
|
||||
-> State g Room
|
||||
twinSlowDoorChasers drid = do
|
||||
let lps = (V2 (-65)) <$> [20,40 .. 180]
|
||||
rps = (V2 65) <$> [20,40 .. 180]
|
||||
let lps = V2 (-65) <$> [20,40 .. 180]
|
||||
rps = V2 65 <$> [20,40 .. 180]
|
||||
ps <- takeN 4 $ lps ++ rps
|
||||
let plmnts = map (\p -> sPS p 0 $ PutCrit chaseCrit) ps
|
||||
return $ twinSlowDoorRoom drid 80 200 40 & rmPS %~ (plmnts ++)
|
||||
@@ -79,8 +79,8 @@ slowDoorRoom = do
|
||||
y <- state $ randomR (400,800)
|
||||
h <- state $ randomR (200,min (y-100) 500)
|
||||
(butPos,butRot) <- takeOne
|
||||
[( (V2 (x/2-50) (5)),0)
|
||||
,( (V2 (x/2+50) (5)),0)
|
||||
[( V2 (x/2-50) 5,0)
|
||||
,( V2 (x/2+50) 5,0)
|
||||
]
|
||||
let n = 25
|
||||
xs <- replicateM n $ state $ randomR (10,x-10)
|
||||
@@ -90,7 +90,7 @@ slowDoorRoom = do
|
||||
xs' <- replicateM 5 $ state $ randomR (10,x-10)
|
||||
ys' <- replicateM 5 $ state $ randomR (h+20,y)
|
||||
let crits = zipWith (\p r -> sPS p r randC1) ps rs
|
||||
lsources = [sPS (V2 (x/2) (30)) 0 putLamp, sPS (V2 (x/2) (y-30)) 0 putLamp]
|
||||
lsources = [sPS (V2 (x/2) 30) 0 putLamp, sPS (V2 (x/2) (y-30)) 0 putLamp]
|
||||
barrels = zipWith (\x' y' -> sPS (V2 x' y') 0 $ PutCrit explosiveBarrel) xs' ys'
|
||||
pillarsa = []
|
||||
pillarsb = putBlockRect (x/5-20) (x/5+20) (h/2-20) (h/2+20)
|
||||
|
||||
Reference in New Issue
Block a user