summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/clua.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix compile with newer gcc.Robert Vollmert2009-11-241-1/+1
|
* Add "maybe_bool CLua::callmbooleanfn".Robert Vollmert2009-11-241-0/+3
| | | | This allows Lua hooks to say they don't have an opinion.
* lmark.synchronized_markers(): apply one marker's effects to multiple points ↵Darshan Shaligram2009-10-311-0/+2
| | | | | | | | | | | | | | | simultaneously. synchronized_markers() takes a marker, and a list of method names to override, and returns a set of markers that fire simultaneously, to allow, say, fog machines that fire at random intervals, but always fire in unison. lm_mslav.lua has details. volcano.des has an example volcano entry vault that uses this. Allow fetching a list of Lua markers/marker positions by property value. Renamed dgn.find_marker_prop -> dgn.find_marker_position_by_prop. s/helper/listener/ for fog machine listeners.
* Move print_?lua_stack into CLua.Robert Vollmert2009-10-211-2/+2
|
* Move userdata templates to cluautil.h.Robert Vollmert2009-10-211-64/+0
|
* Move clua_register_metatable to cluautil.Robert Vollmert2009-10-211-4/+0
|
* Move utility functions from clua.cc to cluautil.cc.Robert Vollmert2009-10-211-19/+0
| | | | | | | | 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 grd_lib out of clua.cc into l_mapgrd.cc.Robert Vollmert2009-10-201-2/+2
| | | | | | | | | | | | | | 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.
* Lua map improvements.Enne Walker2009-10-181-0/+2
| | | | | | | | | | | | | | | | | | | | The previous dungeon layout.des functions all apply directly to the grid and so are unsuitable for use in vaults. This aims to correct that by providing lua functions that can manipulate maps (of glyphs). grd[x][y] in a .des file can now be used to get and set glyphs in the current map. This should allow for less cumbersome map variations than what you can do with just SUBST and SHUFFLE. To support that, map_def no longer batches up transforms--it applies them all immediately. This resulted in a good bit of refactoring. FTILE/RTILE map commands now support setting the tile for multiple features at once. There are also a small number of new lua functions that apply to maps (map_octa_room, map_smear, and map_extend). Ideally, these will eventually replace the existing builder funcs that work on grd.
* headers: remove 'AppHdr.h' include from .h filesSteven Noonan2009-10-101-2/+0
| | | | | | | | This breaks the GCC if you're using precompiled headers, and we don't need this included in these headers anyway. All the .cc files have AppHdr.h included first anyway. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Include the Lua stack trace and currently acting monsters in the crash report.zelgadis2009-01-221-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8694 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed slow ziggurat level build, fixed ziggurat dismissals of simulacra ↵dshaligram2008-11-281-2/+15
| | | | | | resulting in messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7679 c06c8d41-db1a-0410-9941-cceddc491573
* Place external loot chamber for ziggurat levels with jellies.dshaligram2008-11-251-1/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7625 c06c8d41-db1a-0410-9941-cceddc491573
* Fix compile warnings (Napkin).dshaligram2008-11-251-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7620 c06c8d41-db1a-0410-9941-cceddc491573
* Ziggurat portals charge gold for entry.dshaligram2008-11-251-0/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7610 c06c8d41-db1a-0410-9941-cceddc491573
* More steps toward ziggurats.dshaligram2008-11-231-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7553 c06c8d41-db1a-0410-9941-cceddc491573
* Spadework for ziggurats and other multilevel portal vaults.dshaligram2008-11-201-0/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7520 c06c8d41-db1a-0410-9941-cceddc491573
* Lua marker code is now converted into an anonymous function in the same ↵dshaligram2008-11-181-0/+4
| | | | | | scope as the rest of the map Lua code so that locals defined in the map Lua are visible to the marker code. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7479 c06c8d41-db1a-0410-9941-cceddc491573
* Added lua_datum to wrap the common task of retaining references to Lua ↵dshaligram2008-11-181-0/+35
| | | | | | objects in the Lua registry. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7477 c06c8d41-db1a-0410-9941-cceddc491573
* Add yet more whitespace fixes.dolorous2008-06-101-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5685 c06c8d41-db1a-0410-9941-cceddc491573
* Fix crash on shutdown caused by bad order of static destruction (ugh).pauldubois2008-03-091-0/+1
| | | | | | | | | | | | crawl_environment's destructor uses dlua, but dlua was getting destroyed first. Rather than mess with stupidly complicated singleton patterns, I've moved the definition of clua and dlua into acr.cc, to just before crawl_environment. This makes the order of construction/destruction well-defined and should be a workable long-term solution. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3559 c06c8d41-db1a-0410-9941-cceddc491573
* [Bug 1907221] Add "Modified for Crawl Reference" statement and author to aj-p-e-g2008-03-081-0/+8
| | | | | | | | huge number of files. Also correct file name comments. No coding changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3539 c06c8d41-db1a-0410-9941-cceddc491573
* This change moves the logic for when a level or branch prohibitszelgadis2007-09-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | teleport control from the C++ code into the vault .des files. This is done with the additions of two things: * Changeable, persistent per-level and per-branch flags which affect game play. * Dungeon events for the killing of monsters, picking up of objects and changing of features. The current level and branch flags are for teleport control prevention, making a level unmappable (like the Abyss or a Labyrinth), and preventing magic mapping from working (like the Abyss or a Labyrinth). Some related changes: * The new .des header KMASK allows for dungeon grid masks like no_monster_gen to be applied to specific symbols rather than the entire vault. * If the wizard mapping command (&{) is used in a place which is unmappable, it will ask if you wish to force the area to be mappable (so you can see what an entire Labyrinth or Abyss level looks like without having to hack the source). * A new wizard-mode level-map command, 'T', will teleport the player to wherever the cursor is pointing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2146 c06c8d41-db1a-0410-9941-cceddc491573
* Replaced timed markers with Lua markers. Breaks save compatibility.dshaligram2007-07-261-2/+29
| | | | | | KFEAT: feature names are now as in the dungeon_feature_type enum. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1930 c06c8d41-db1a-0410-9941-cceddc491573
* Added glyphs_connected and friends for maps to test connectedness of pointsdshaligram2007-06-271-0/+3
| | | | | | | | after map transforms are applied. Fixed conflicts in bison grammar. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1669 c06c8d41-db1a-0410-9941-cceddc491573
* The dungeon builder now caches compiled Lua chunks instead of Lua source in thedshaligram2007-06-271-0/+1
| | | | | | .dsc to save on compile time (at the expense of larger .dsc files). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1663 c06c8d41-db1a-0410-9941-cceddc491573
* Croak if necessary Lua files are missing, instead of failing subtly later.dshaligram2007-06-251-2/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1651 c06c8d41-db1a-0410-9941-cceddc491573
* Step 1 of .des file Lua-isation. The dungeon compiler converts .des files todshaligram2007-06-231-1/+46
| | | | | | | | | | Lua (Lua code can be embedded with {{ <lua code here> }} constructs) that is run to produce the final map. Some maps may be broken, this is untested, lots more work needs to be done. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1629 c06c8d41-db1a-0410-9941-cceddc491573
* Pull c_macro out of the code and into clua/macro.lua.dshaligram2007-06-221-3/+3
| | | | | | | | User-script dofile and loadfile check for "clua" anywhere in the file name and refuse to load the file in that case; only core Crawl code can load Lua files from clua/*. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1622 c06c8d41-db1a-0410-9941-cceddc491573
* Override loadfile and dofile in the Lua user-script interpreter so they have todshaligram2007-06-211-1/+2
| | | | | | | | use datafile_path, and cannot use shell metacharacters (not that it matters) and ../ paths. Multiple loading is not prevented; we could probably add another function that does that. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1614 c06c8d41-db1a-0410-9941-cceddc491573
* Added support for limiting memory used by the Lua interpreter.dshaligram2007-06-211-0/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1613 c06c8d41-db1a-0410-9941-cceddc491573
* Set debug hooks in the Lua VM and interrupt scripts that are running too long.dshaligram2007-06-191-1/+39
| | | | | | (Necessary to make Lua usable on public servers.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1605 c06c8d41-db1a-0410-9941-cceddc491573
* Tweaked CLUA_BINDINGS so that the only thing it controls is running userdshaligram2007-04-141-4/+0
| | | | | | scripts. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1309 c06c8d41-db1a-0410-9941-cceddc491573
* These files shouldn't be executable.nlanza2006-08-131-0/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@13 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up a mistake in the SVN import.nlanza2006-08-131-0/+122
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10 c06c8d41-db1a-0410-9941-cceddc491573