summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_dgnlvl.cc
Commit message (Collapse)AuthorAgeFilesLines
* Store the entry level for every branch (rather than just depth).Adam Borowski2013-11-021-7/+4
| | | | | | | | This allows moving branches around without breaking save compat or at least serious hacks. The portal stack can be probably dropped now: two copies of the same level can't exist anyway.
* Alternate Forest with Crypt.Steve Melenchuk2013-05-261-3/+3
| | | | | | | Forest's entrance depth and absolute depth are now the same as Crypt's. This also adds functionality to move Tomb's entrance to Forest if Crypt isn't placed in the game, so Tomb always exists (at present).
* Use std namespace.Raphael Langella2012-08-261-1/+1
| | | | | | | | | | | | | I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
* Massive style fix (braces, indentation, etc.)Neil Moore2012-08-011-2/+1
|
* Lua function: dgn.br_entrance.Steve Melenchuk2012-07-261-0/+18
| | | | | | | | | | | | This returns a level ID signifying where the entrance to a branch is (if not specified, it uses the current branch). Its primary use would be in the context, "you.where() == dgn.level_name(dgn.br_entrance("<branch>"))" to determine if a branch entrance needs to be placed in an encompass vault or a layout.
* New Lua function: dgn.br_exists().Steve Melenchuk2012-07-081-0/+20
| | | | | This function reports if a specific branch exists in the game; it's most useful for checking if specific Lair branches have been generated.
* Make dgn.br_depth() default to the current branch.Adam Borowski2012-07-081-1/+13
| | | | It's hard to think of an use where you'd want a remote branch.
* dlua function to get the depth (length) of a branch.Neil Moore2012-07-081-0/+2
| | | | | Call as: dgn.br_depth("Elf"), or dgn.br_depth(dgn.level_name(dgn.level_id())) for the current branch.
* Some more return deparenthesization.Adam Borowski2012-07-051-1/+1
|
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-2/+2
|
* Split the branch data into read-only and mutable parts.Adam Borowski2011-11-041-1/+1
| | | | | | | | As a side effect, branches can now be shortened without breaking major save compat. This commit itself doesn't preserve compat though, even though it'd be easy -- other parts are too nasty already.
* Get rid of level_type, unify BRANCH_*, LEVEL_* and portal vaults.Adam Borowski2011-11-041-43/+0
|
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-4/+4
| | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Remove shop_chance from branch-data.h.Vsevolod Kozlov2010-12-291-2/+0
| | | | | | | Only dgn.br_has_shops used it, and that is not used anywhere in dat as far as grep can see. The chances are now in dat/des/builder/shops.des anyway.
* Ensure a space after "return".Adam Borowski2010-12-161-6/+6
| | | | It should never masquerade as a function call.
* Add support for Lua hooks triggered during vault generation (dpeg)Darshan Shaligram2010-12-051-5/+4
| | | | | | | Fire hooks at various points during vault generation and allow Lua code in vaults to add functions to these hooks. Lua hooks are handy when creating vaults that want to place other vaults (for instance a vault that places ten copies of another small minivault).
* Replace branch::has_shops by branch::shop_chance.Robert Vollmert2010-05-031-1/+1
| | | | | | shop_chance is the chance for a level in that branch to get shops at all. This commit should result in equivalent placement, giving a flat 20% for each branch that had has_shops == true.
* Remove level_type checks from set_level_type_* Lua wrapers.Jude Brown2009-11-061-19/+0
| | | | | | | These checks are used to ensure the functions are only called from Portal vaults. However, they cause errors in the initial Lua map validation, regardless of whether or not the functions are actually being used in a Portal vault.
* Split actors and env from externs.h.Robert Vollmert2009-10-211-0/+1
|
* Move more macros and functions to cluautil.cc.Robert Vollmert2009-10-211-1/+1
|
* cosmetic: strip trailing whitespaceSteven Noonan2009-10-201-10/+10
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Move clua crawl_lib from clua to l_crawl.cc.Robert Vollmert2009-10-201-1/+1
| | | | To avoid name clashes, rename dlua libs from *_lib to *_dlib.
* Split level and branch functions out of l_dgn.cc.Robert Vollmert2009-10-201-0/+160