Work toward adding wiring
This commit is contained in:
+9
-11
@@ -1,5 +1,5 @@
|
||||
module Dodge.Room.Start where
|
||||
import Dodge.Room.Data
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.Room.Door
|
||||
import Dodge.Room.Link
|
||||
import Dodge.Room.Procedural
|
||||
@@ -7,7 +7,7 @@ import Dodge.Room.Foreground
|
||||
import Dodge.Room.Furniture
|
||||
import Dodge.Placements
|
||||
import Dodge.Layout.Tree.Polymorphic
|
||||
import Dodge.LevelGen.Data
|
||||
--import Dodge.LevelGen.Data
|
||||
import Geometry.Data
|
||||
import Color
|
||||
import Shape
|
||||
@@ -25,13 +25,8 @@ startRoom :: RandomGen g => State g (Tree (Either Room Room))
|
||||
startRoom = do
|
||||
w <- state $ randomR (100,400)
|
||||
h <- state $ randomR (200,400)
|
||||
let fground = sPS (V2 0 0) 0 $ PutForeground $
|
||||
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 & rmPmnts %~
|
||||
(
|
||||
[ fground
|
||||
let plmnts =
|
||||
[ sPS (V2 0 0) 0 $ PutForeground $ girderV 40 20 10 (V2 0 (h/2)) (V2 w (h/2))
|
||||
, mntLS jShape (V2 0 (h/3)) (V3 40 (h/3) 70)
|
||||
, tankSquareEmboss4 (dim orange) 50 (h-60)
|
||||
, tankSquare (dim orange) 50 50
|
||||
@@ -39,6 +34,9 @@ startRoom = do
|
||||
, lightSensor (V2 (0.8*w) (0.25*h)) 0
|
||||
, putLasTurret & plSpot .~ PS (V2 (0.8*w) (0.8*h)) 0
|
||||
, sps0 $ PutForeground $ colorSH orange $ pipePP 2 (V3 50 50 25) (V3 50 120 25)
|
||||
] ++
|
||||
)
|
||||
]
|
||||
treeFromPost [Left rezBox, Left door] . Right
|
||||
<$> randomiseOutLinks
|
||||
(shiftRoomBy (V2 (-20) (-20),0)
|
||||
$ roomRectAutoLinks w h & rmPmnts %~ (plmnts ++)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user