Module engine.generator.map.Roomer
Functions
_M:canDoor (x, y) | Can we create a door (will it lead anywhere) |
_M:generate (lev, old_lev) | Make rooms and connect them with tunnels |
_M:makeStairsInside (lev, old_lev, spots) | Create the stairs inside the level |
_M:makeStairsSides (lev, old_lev, sides, rooms, spots) | Create the stairs on the sides |
_M:markTunnel (x, y, xdir, ydir, id) | Marks a tunnel as a tunnel and the space behind it |
_M:randDir () | Random tunnel dir |
_M:tunnel (x1, y1, x2, y2, id) | Tunnel from x1,y1 to x2,y2 |
_M:tunnelDir (x1, y1, x2, y2) | Find the direction in which to tunnel |
Functions
- _M:canDoor (x, y)
-
Can we create a door (will it lead anywhere)
Parameters
- x:
- y:
- _M:generate (lev, old_lev)
-
Make rooms and connect them with tunnels
Parameters
- lev:
- old_lev:
- _M:makeStairsInside (lev, old_lev, spots)
-
Create the stairs inside the level
Parameters
- lev:
- old_lev:
- spots:
- _M:makeStairsSides (lev, old_lev, sides, rooms, spots)
-
Create the stairs on the sides
Parameters
- lev:
- old_lev:
- sides:
- rooms:
- spots:
- _M:markTunnel (x, y, xdir, ydir, id)
-
Marks a tunnel as a tunnel and the space behind it
Parameters
- x:
- y:
- xdir:
- ydir:
- id:
- _M:randDir ()
- Random tunnel dir
- _M:tunnel (x1, y1, x2, y2, id)
-
Tunnel from x1,y1 to x2,y2
Parameters
- x1:
- y1:
- x2:
- y2:
- id:
- _M:tunnelDir (x1, y1, x2, y2)
-
Find the direction in which to tunnel
Parameters
- x1:
- y1:
- x2:
- y2: