Add rooms, placements and room positions
This commit is contained in:
+13
-18
@@ -1,7 +1,9 @@
|
||||
module Dodge.Room.Start where
|
||||
import Dodge.Data
|
||||
import Dodge.LevelGen.Data
|
||||
--import Dodge.PlacementSpot
|
||||
import Dodge.Room.RunPast
|
||||
import Dodge.Room.Tanks
|
||||
--import Dodge.RoomLink
|
||||
--import Dodge.Data
|
||||
--import Dodge.Default
|
||||
@@ -14,18 +16,13 @@ import Dodge.Room.Corridor
|
||||
import Dodge.Room.Room
|
||||
import Dodge.Room.Link
|
||||
import Dodge.Room.Procedural
|
||||
import Dodge.Room.Foreground
|
||||
--import Dodge.Room.RoadBlock
|
||||
import Dodge.Placement.Instance
|
||||
--import Dodge.Item.Random
|
||||
import Dodge.Item.Weapon.BulletGuns
|
||||
import Dodge.Item.Weapon.Utility
|
||||
import Dodge.Item.Craftable
|
||||
--import Dodge.LevelGen.Data
|
||||
--import Geometry.Data
|
||||
import Geometry
|
||||
--import Padding
|
||||
import Color
|
||||
import Shape
|
||||
--import Shape
|
||||
import LensHelp
|
||||
|
||||
--import Data.Maybe
|
||||
@@ -90,18 +87,16 @@ rezBoxThenWeaponRoom = do
|
||||
rcol <- rezColor
|
||||
treeFromTrunk [PassDown $ rezBox rcol,PassDown door] <$> weaponRoom
|
||||
|
||||
startCrafts :: RandomGen g => State g [Item]
|
||||
startCrafts = takeOne $ map (map makeTypeCraft)
|
||||
[ [PIPE,PIPE,HARDWARE]
|
||||
, [TUBE,PIPE,HARDWARE]
|
||||
]
|
||||
|
||||
startRoom' :: RandomGen g => State g (SubCompTree Room)
|
||||
startRoom' = do
|
||||
w <- state $ randomR (100,400)
|
||||
h <- state $ randomR (200,400)
|
||||
let plmnts =
|
||||
[ sPS (V2 0 0) 0 $ PutShape $ 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
|
||||
, tankSquare (dim orange) 50 120
|
||||
, sps0 $ PutShape $ colorSH orange $ pipePP 2 (V3 50 50 25) (V3 50 120 25)
|
||||
]
|
||||
scrafts <- startCrafts
|
||||
troom <- tanksRoom [] scrafts
|
||||
thecol <- rezColor
|
||||
treeFromPost [PassDown $ rezBox thecol, PassDown door] . UseAll
|
||||
<$> shuffleLinks (roomRectAutoLinks w h & rmPmnts .++~ plmnts)
|
||||
<$> shuffleLinks troom
|
||||
|
||||
Reference in New Issue
Block a user