summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dat/clua/iter.lua
Commit message (Collapse)AuthorAgeFilesLines
* Add test case to generate branch ends and verify that runes and orb exist.Darshan Shaligram2010-01-071-2/+2
|
* Fix Shoal:$ generation bugs: stairs could be surrounded by deep water, hut ↵Darshan Shaligram2010-01-051-4/+13
| | | | | | entrances could be blocked by rock. shoal-hut.lua test generates 1k Shoal:$ levels and verifies that the levels pass sanity tests.
* Inventory and stash iterators for lua.Jude Brown2009-12-281-0/+72
|
* Monster-flavour LOS, adjacent, rectangle and circle iterators.Jude Brown2009-11-291-22/+102
|
* New Lua iterators: point_iterator, slave_iterator, tweaks.Jude Brown2009-11-291-8/+79
| | | | | | | | | | | | | | The first (point_iterator) accepts a table of points (such as the ones return by dgn.find_marker_positions_by_prop, or any other function which returns points) and is filterable and stateful. The second is a quick wrapper over dgn.find_marker_positions_by_prop. Tweaked rectangle_iterator to supply an "rvi" (return value instead) which will store the value of the filter instead of expecting the filter to return a true or false value. Setting this to false will behave as before; setting it to true allows us to have the filter alter the point (mons_at, items_at, marker_at_pos, etc).
* Subvaults.Enne Walker2009-11-281-0/+36
| | | | | | | | 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.
* Fix include center being broken.Jude Brown2009-11-271-3/+3
| | | | | Typo in the variable name ("y" instead of "_y") meant that the center was always being included, even if it was specifically excluded.
* Iteration-related functions: stack_search and stack_destroy.Jude Brown2009-11-221-0/+63
| | | | | | The first will return the first item whose name matches the search term in the relevant stack, while the second will destroy each item in the stack. Hopefully the precautions in stack_destroy will be enough.
* Some clean up of Lua iterator code.Jude Brown2009-11-211-31/+22
|
* New Lua iterator: circle_iterator. Fix LOS/adjactent iterator.Jude Brown2009-11-211-6/+61
| | | | | | LOS and adjacent iterators were only working if include_center was set to true; setting it to false (or nil) results in no points being returned.
* dat/clua/iter.lua: iterators for Lua.Jude Brown2009-11-191-0/+176
Currently only includes: rectangle_iterator: iterates points between two corners. los_iterator: iterates over currently visible points in LOS. adjacent_iterator: iterates over adjacent points to the center. Most iterators accept a "filter" parameter that is a function which should either return true if the point is acceptable for the iteration, or false if it is not. los_iterator is currently restricted to player LOS rather than actor or monster LOS, but could be expanded at a later date. All of the iterators seem to work as intended: hopefully I haven't made too many mistakes with them.