summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_libs.h
Commit message (Collapse)AuthorAgeFilesLines
* Start using -Wredundant-decls; fix all the instances I getSamuel Bronson2013-12-121-2/+0
| | | | | That is, unless you count the ones in ncurses' headers, which I can't do anything except suppress.
* New clua functions spells.range and spells.mana_costNaruni2013-08-281-0/+1
|
* 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.
* 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 defining colour patterns in luaJesse Luehrs2010-09-101-0/+1
|
* Make monster_info store all the player's knowledge on a monster (v3)Luca Barbieri2010-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in v3 (rob): - update for master (bleeding, deflect missiles, ...) - fix misled not ending - fix all monsters getting extreme fire resistance Changes in v2: - add operator = monster_info is changed from the monster list's structure to a general purpose structure storing player-known information about a monster. The plan is to make all the user interface code read data from moster_info, so that: 1. There is no risk of accidental leaks, since all the sensitive code is in one place 2. Complicated things like misled and fake monsters are correctly handled, and the code exists once 3. The structure can be serialized for client/server play, and the deserialized structure can be passed to the UI code (this is still theoretical) This will be done in a successive patch. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Make MonsterWrap and friends accessible to other files.Robert Vollmert2010-02-131-0/+1
|
* Allow passing of monster_info arguments via CLua::push_args.Robert Vollmert2010-02-051-0/+3
| | | | These are marked as 'I'.
* Fix stash-tracker item annotations and restrict user scripts to access items ↵Darshan Shaligram2010-01-241-0/+2
| | | | only on the same turn the items were wrapped for Lua by the core C++ code.
* Convert items Lua library to use metatable. May case end-user issues.Jude Brown2010-01-241-0/+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.)
* Fix Shoal:$ generation bugs: stairs could be surrounded by deep water, hut ↵Darshan Shaligram2010-01-051-1/+1
| | | | | | entrances could be blocked by rock. shoal-hut.lua test generates 1k Shoal:$ levels and verifies that the levels pass sanity tests.
* A start at a dLua spells library.Jude Brown2009-12-251-0/+1
| | | | | | | | | | | Provides wrappers for non-player Toxic Radiance and Ozocubu's Refrigeration. These are basically just an adjustment of kill categories and messages to allow them to be used as background effects in WizLabs (Ozocubu's and Olgreb's). Hopefully a wrapper for monster (and possibly player)-cast bolt structures can also be included, which could then be accessed with the (planned) Lua traps functionality.
* Subvaults.Enne Walker2009-11-281-0/+1
| | | | | | | | Vaults can now include other vaults as a part of their definition. These subvaults are currently included by tag only and replace glyphs in their parent vault. See documentation for more details. Vault:8 has been modified to use subvaults.
* New Lua library: feat.Jude Brown2009-11-271-0/+1
| | | | | | | | | | | | | | | | | | | Provides wrappers for all of the feat_is_XXX functions from terrain.cc, as well as a few other functions. Also provides a macro which can wrap a function to take: * a set of co-ordinates (parsed with grd(coord_def(x, y))) * a string (parsed with dungeon_feature_by_name) * an integer (cast into dungeon_feature_type, can be fetched from dgn.grid(x, y)) All of the feat library functions can be used in this manner. For example: * feat.is_wall(x, y) * feat.is_wall(dgn.grid(x, y)) * feat.is_wall(7) * feat.is_wall("rock_wall")
* set_exclude/del_exclude lua bindings.Robert Vollmert2009-11-121-0/+1
|
* Add lua binding for inspecting env.show.Robert Vollmert2009-10-271-0/+1
|
* Start of monster_info lua binding.Robert Vollmert2009-10-271-0/+1
|
* Move Lua monster bindings into the dungeon lua.Robert Vollmert2009-10-271-1/+1
| | | | | | They appear to be used only for ziggurat monster placement, and I'm finding it hard to see a safe use of these for the user. Correct me if I'm wrong.
* Move more macros and functions to cluautil.cc.Robert Vollmert2009-10-211-47/+1
|
* Move utility functions from clua.cc to cluautil.cc.Robert Vollmert2009-10-211-1/+12
| | | | | | | | 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.
* cosmetic: strip trailing whitespaceSteven Noonan2009-10-201-2/+2
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Comments and renaming for consistency.Robert Vollmert2009-10-201-2/+4
|
* Move remaining libraries from clua.cc.Robert Vollmert2009-10-201-1/+5
| | | | That's l_file.cc, l_food.cc, l_global.cc.
* Move library "item" from clua.cc to l_item.cc.Robert Vollmert2009-10-201-0/+5
|
* Move library "options" from clua.cc to l_option.cc.Robert Vollmert2009-10-201-0/+1
|
* Move monster libraries from clua.cc to l_mons.cc.Robert Vollmert2009-10-201-0/+1
|
* Move grd_lib out of clua.cc into l_mapgrd.cc.Robert Vollmert2009-10-201-2/+3
| | | | | | | | | | | | | | Rest of commit comment only as accurate as my understanding... Renaming from grd to mapgrd to avoid confusion with grd == env.grid: This grd is the maplines-section of a vault definition. Also move mapgrd_lib from clua to dlua since it's only used for dungeon building. clua and dlua need more descriptive names.
* Move clua you_lib to l_you.cc.Robert Vollmert2009-10-201-0/+1
| | | | | Also remove you.pos() from clua since grid coordinates aren't supposed to be known to the user.
* Change you_dlib load style.Robert Vollmert2009-10-201-2/+1
|
* Move clua crawl_lib from clua to l_crawl.cc.Robert Vollmert2009-10-201-14/+22
| | | | To avoid name clashes, rename dlua libs from *_lib to *_dlib.
* Split debug lua bindings out to new library "debug".Robert Vollmert2009-10-201-0/+1
|
* Split out grid and feature-related bindings.Robert Vollmert2009-10-201-0/+4
|
* Split builder functions out from l_dgn.cc.Robert Vollmert2009-10-201-0/+2
| | | | Now sub-2k lines of code.
* Split level and branch functions out of l_dgn.cc.Robert Vollmert2009-10-201-0/+2
|
* Split out tiles specific functions from l_dgn.cc.Robert Vollmert2009-10-201-1/+49
| | | | Also a little cleanup.
* Split some parts of lua library "dgn" out.Robert Vollmert2009-10-201-1/+9
| | | | | Specifically, item and monster-related functions to l_dgnit.cc and l_dgnmon.cc.
* Move part of dgn_lib out to l_dgnevt.cc.Robert Vollmert2009-10-201-1/+1
|
* Split out builder functions from dlua.cc.Robert Vollmert2009-10-201-1/+2
| | | | Also minor cleanup.
* Reduce #includes in dlua.cc.Robert Vollmert2009-10-191-0/+5
|
* Split out lib_mapmark from dlua.cc.Robert Vollmert2009-10-191-0/+2
|
* Split out dgnevent_lib from dlua.cc.Robert Vollmert2009-10-191-0/+1
|
* Split you_lib out from dlua.cc.Robert Vollmert2009-10-191-0/+1
|
* Split file_lib out.Robert Vollmert2009-10-191-0/+12
Move lua library headers to separate l_libs.h, fixing another compilation error...