Safe Haskell | None |
---|---|
Language | Haskell2010 |
Game.LambdaHack.Server.DungeonGen
Contents
Description
The dungeon generation routine. It creates empty dungeons, without actors and without items, either lying on the floor or embedded inside tiles.
Synopsis
- data FreshDungeon = FreshDungeon {}
- dungeonGen :: COps -> ServerOptions -> Caves -> Rnd FreshDungeon
- convertTileMaps :: COps -> Bool -> Rnd (ContentId TileKind) -> Maybe (Rnd (ContentId TileKind)) -> Area -> TileMapEM -> Rnd TileMap
- buildTileMap :: COps -> Cave -> Rnd TileMap
- anchorDown :: Y
- buildLevel :: COps -> ServerOptions -> LevelId -> ContentId CaveKind -> CaveKind -> Int -> Int -> AbsDepth -> [(Point, Text)] -> Rnd (Level, [(Point, Text)])
- snapToStairList :: Int -> [Point] -> Point -> Either Point Point
- placeDownStairs :: Text -> Bool -> ServerOptions -> LevelId -> CaveKind -> Area -> [Point] -> [Point] -> Rnd (Maybe Point)
- levelFromCave :: COps -> Cave -> AbsDepth -> TileMap -> ([Point], [Point]) -> [Point] -> Level
Documentation
data FreshDungeon Source #
Freshly generated and not yet populated dungeon.
Constructors
FreshDungeon | |
Fields
|
dungeonGen :: COps -> ServerOptions -> Caves -> Rnd FreshDungeon Source #
Generate the dungeon for a new game.
Internal operations
convertTileMaps :: COps -> Bool -> Rnd (ContentId TileKind) -> Maybe (Rnd (ContentId TileKind)) -> Area -> TileMapEM -> Rnd TileMap Source #
anchorDown :: Y Source #
buildLevel :: COps -> ServerOptions -> LevelId -> ContentId CaveKind -> CaveKind -> Int -> Int -> AbsDepth -> [(Point, Text)] -> Rnd (Level, [(Point, Text)]) Source #