summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_dgnit.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove stuffNicholas Feinberg2014-07-291-1/+1
| | | | | | | .cc, moving its contents into the new stepdown.cc and strings.cc. (The latter also got many donations from libutil.h.) Down with stuff! Up the new flesh!
* Merge branch 'master' into mon-pickAdam Borowski2012-11-041-7/+7
|\ | | | | | | | | Merge commits instead of rerere suck, but not being able to comfortably use the test rig sucks even more.
| * Use std namespace.Raphael Langella2012-08-261-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Get rid of a crapload of uselessly passed level_number.Adam Borowski2012-11-041-3/+1
|/ | | | | | | | | | Also, get rid of one of three copies of '8'/'9' logic. Also, fix the depth of place: not being heeded for some purposes. Technically, there is one actual change: shallow items in Ziggurats had a fixed level of 27, they now use 27 + depth in Zig. Not noticeable as most nearby items use level 351 anyway.
* Massive style fix (braces, indentation, etc.)Neil Moore2012-08-011-0/+4
|
* Some more return deparenthesization.Adam Borowski2012-07-051-1/+1
|
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-11/+11
|
* Cache absdepth0, now that it has to be calculated.Adam Borowski2012-01-031-2/+1
| | | | | The cached value intentionally is stored in env.absdepth0 rather than you.absdepth0 to catch attempts to modify it.
* Use branch depth rather than absolute depth as the authoritative one.Adam Borowski2012-01-031-3/+2
|
* Don't let troves ask for items from display vaults.Adam Borowski2011-07-021-0/+5
|
* 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.
* Allow corpses to be placed in .des files.Darshan Shaligram2010-06-221-6/+111
| | | | | | | | | | | Add item property CORPSE_NO_DECAY to disallow decay on corpses/skeletons/chunks. Wizmode &% now creates an item using the .des file item name parser; &o remains the old wizmode item-gen command. Corpse decay for corpses placed by maps can be controlled using dgn.delayed_decay.
* Rename item_def::is_valid() to item_def::defined(). (Enne)Robert Vollmert2010-06-171-1/+1
|
* Rename hilariously misnamed you.your_level to you.absdepth0.Adam Borowski2010-02-101-1/+1
|
* Fix item_pickup Triggerables (elliptic).Jude Brown2010-01-271-1/+1
| | | | | | | Was using dgn.item_from_index, which used the old lightuserdata method of pushing items through to the Lua, rather than the new clua_push_item method. Previous version lacked the "name" method, which proved problematic when picking up the orb.
* Fix dgn.stash_items with new items table.Jude Brown2010-01-261-2/+2
| | | | | | Also, refer to the right vector: the shops items push to Lua was trying to reference the floor items vector, which would probably cause weird bounds issues.
* Convert items Lua library to use metatable. May case end-user issues.Jude Brown2010-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like the monster library, the item library now uses a metatable to store its functions. Instead of using lightuserdata, as before, and passing this to the different item.* functions, the functions are now members of the actual item. The item library has also been renamed to "items": this allows for its use in Vault definitions without it clashing with the item specifier and dgn.item function. Example: * Previously, you would use: local x = item.inventory()[1] print(item.name(x, false)) * Now, you would use: local x = items.inventory()[1] print(x.name(false)) This will have an impact on end-user scripts that use the old version of the item library. I have already updated the uses of the items library in the dat/lua scripts, as well as vault definitions and marker definitions. I think I've caught them all. There may be bugs or issues, but hopefully that's everything. (Does cause issues with annotations such as {artefact}, will be fixed shortly.)
* Remove libutil.h from AppHdr.h and include explicitly.Robert Vollmert2010-01-201-0/+1
| | | | | | | Also extract unwind_var template to unwind.h. The latter is now included from AppHdr.h, though it needn't really be. This means it's now possible to use coord_def in libutil.h.
* Remove unnecessary header-header includes.Robert Vollmert2009-11-271-0/+1
|
* l_dgnit.cc: dgn.stash_items() functionMatthew Cline2009-11-141-0/+52
|
* Rename is_valid_item to item_def::is_valid.Vsevolod Kozlov2009-11-061-1/+1
| | | | Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* Splitting up stuff.cc.Robert Vollmert2009-10-301-0/+1
| | | | New: colour.cc, coord.cc, coordit.cc, random.cc, rng.cc.
* Move utility functions from clua.cc to cluautil.cc.Robert Vollmert2009-10-211-1/+1
| | | | | | | | cluautil.cc should eventually contain all of the functions for passing objects from and to lua, at least the shared ones. Also cut down on clua.cc include list.
* 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 some parts of lua library "dgn" out.Robert Vollmert2009-10-201-0/+97
Specifically, item and monster-related functions to l_dgnit.cc and l_dgnmon.cc.