Add dimensions to all items
This commit is contained in:
@@ -6,6 +6,7 @@ import Dodge.Default.Room
|
||||
--import Dodge.LevelGen.Data
|
||||
--import Dodge.LightSources.Lamp
|
||||
import Dodge.Placement.Instance
|
||||
import Dodge.PlacementSpot
|
||||
import Geometry
|
||||
import Tile
|
||||
|
||||
@@ -20,6 +21,7 @@ corridor = defaultRoom
|
||||
, _rmPmnts = [ spanLightI (V2 0 40) (V2 40 40) ]
|
||||
, _rmBound = [ rectNSWE 50 30 0 40 ]
|
||||
, _rmFloor = [makeTileFromPoly poly 2]
|
||||
, _rmRandPSs = [psRandRanges (10,30) (30,60) (0,2*pi)]
|
||||
}
|
||||
where
|
||||
poly = rectNSWE 80 0 0 40
|
||||
|
||||
+11
-9
@@ -33,26 +33,28 @@ import System.Random
|
||||
minigunfakeout :: RandomGen g => State g (Tree (Either Room Room))
|
||||
minigunfakeout = do
|
||||
rcol <- rezColor
|
||||
ncor <- state $ randomR (1,3)
|
||||
ncor <- state $ randomR (0,2)
|
||||
roomwithmini <- randomiseAllLinks $ roomRectAutoLinks 150 150
|
||||
& rmPmnts %~ ([plRRpt 0 (PutFlIt miniGun),plRRpt 0 (PutFlIt shrinkGun)]++)
|
||||
& rmPmnts %~ (plRRpt 0 (PutFlIt miniGun):)
|
||||
randcors <- replicateM ncor $ (fmap Left . randomiseOutLinks) corridor
|
||||
return $ ([Left $ rezBox rcol
|
||||
,Left door
|
||||
,Left roomwithmini
|
||||
,Left door
|
||||
]
|
||||
++ replicate ncor (Left corridor)
|
||||
++ [Left keyholeCorridor,Left corridor])
|
||||
++ randcors
|
||||
++ [Left $ corridor & rmPmnts %~ ( plRRpt 0 (PutFlIt shrinkGun) :)
|
||||
,Left keyholeCorridor,Left corridor])
|
||||
`treeFromPost` Right door
|
||||
|
||||
startRoom :: RandomGen g => State g (Tree (Either Room Room))
|
||||
startRoom = join $ takeOne
|
||||
[ minigunfakeout
|
||||
--, rezBoxesWp
|
||||
--, rezBoxesThenWeaponRoom
|
||||
--, rezBoxThenWeaponRoom
|
||||
--, rezBoxesWpCrit
|
||||
--, runPastStart
|
||||
, rezBoxesWp
|
||||
, rezBoxesThenWeaponRoom
|
||||
, rezBoxThenWeaponRoom
|
||||
, rezBoxesWpCrit
|
||||
, runPastStart
|
||||
]
|
||||
|
||||
runPastStart :: RandomGen g => State g (Tree (Either Room Room))
|
||||
|
||||
Reference in New Issue
Block a user