summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stash.h
Commit message (Collapse)AuthorAgeFilesLines
* Show visible changes to status of stack toppers.Neil Moore2014-06-071-1/+2
| | | | | | | | | | | | If two corpses were sitting on a visible square, ctrl-x would never show the rotting of the visible top corpse; and the stash tracker itself would show it as "rotten by now" even though we can actually see the corpse rotting. This also affects recharging rods since the previous commit. Now if the seen item and the remembered top item are "the same" but not identical (because of rotting, recharging, etc.), we update the stash anyway.
* Drop pointless empty lines after or before a brace.Adam Borowski2013-12-211-1/+0
| | | | | I left them only where the contents is not indented, like in a namespace or a template.
* More formatting fixes for return (...);Neil Moore2013-11-151-3/+3
|
* Restore match count to search results and move toggle status into help textBlackSheep2013-08-281-1/+2
|
* Add toggle to filter useless items from search resultsBlackSheep2013-08-281-1/+2
|
* Typo fix.Adam Borowski2013-04-111-2/+2
|
* Allow toggling stack to expand shop inventory in search results.Raphael Langella2013-01-141-0/+1
| | | | Search for "shop" and press - to quickly see all available goods on the market.
* Indentation fixes.Adam Borowski2012-12-051-1/+1
|
* Crudely clean up some explicit stash code.Adam Borowski2012-11-131-20/+3
|
* Remove unnecessary includes from header files.Jay3.14152012-10-231-1/+0
| | | | | | | | | | For most header files, this only saves on having to recompile a small number of source files, but there are also a few headers where small changes would now take significantly less time. This is most obvious for the Tiles build for which the dependencies have been greatly reduced, so that the only additional includes when compared to console are strictly library or tile related.
* Fix auto_sacrifice stopping on coprse piles.Raphael Langella2012-10-041-2/+6
| | | | | It only stops if the stack contains at least one unknown non-sacrificeable item.
* Provide a shortcut for restricting stash searches to the current level.elliptic2012-09-231-1/+2
| | | | Prefixing a search with @ restricts it to the level you are on.
* Use std namespace.Raphael Langella2012-08-261-38/+37
| | | | | | | | | | | | | 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.
* s/sacrificiable/sacrificeable/Raphael Langella2012-08-211-2/+2
| | | | sacrificable and sacrificiable are also accepted.
* Some optimizations to the greedy_sacrificiable.Raphael Langella2012-08-101-1/+1
| | | | | Move the "can autopickup" and "god wants sacrifices" checks to the beginning of the travel instead of doing it for each stash.
* New option for explore_stop: greedy_sacrificiable.Raphael Langella2012-08-061-0/+7
| | | | | | Defaults on. Makes explore go to sacrificiable items without the mess of the previous implementation. Should fix #5849, #6002 and #6003.
* Revert "Autoexplore visit items that can be sacrificed."Raphael Langella2012-08-061-1/+0
| | | | | | | | | This reverts commit 1999034cde46cf2d91178cd9cd31ebe0bd955616. This reverts commit 754e3deff9543a2be398699c2565d589cfdc95d2. This reverts commit 47a8935d7344bcb8e316d8b8265ababa51ac09ba. This reverts commit 2048c011fb284325fb243a8a3821e38bc88fe4a9. This reverts commit ad1d6ef9a29b776e46d23243e5714b201667e922. This reverts commit f20ff8e91eea9143669102363f13858a12206814.
* Use correct feature name in stashes.Neil Moore2012-07-061-0/+1
| | | | | | | | | | | | | | We were looking up the feature description for the item's (x,y) position... on the current level. The problem was introduced by commit 84529d6, but portals had the same problem before then (which is why Ctrl-F trove never worked). Now we also store the feature's description in the stash. For old saves, we use the default description for that type of feature (ignoring overrides) until we next update the stash. Floor and other uninteresting features are stored as the empty string. Fixes #5880.
* Don't double tops of stacks.Neil Moore2012-07-061-0/+1
| | | | | | | | | | | | We now track in the stash whether we saw a stack, even if we only saw the top item. On update, we add the top item if it differs from the remembered old items, or if we noticed a change from not-a-stack to a stack. Previously, the second condition also triggered if we remembered only a single item of the stack, which would lead to that item being added to the stash again. Fixes #5850. Stacks in old saves will continue to exhibit duplication until they are verified by visiting the square.
* Some more return deparenthesization.Adam Borowski2012-07-051-1/+1
|
* Let ^F and item memory work in Labs and the Abyss.Adam Borowski2012-04-241-5/+3
| | | | | | It's a pain in the butt to have to return to every item you just ran past (LOS in the Abyss tends to be spotty). This commit makes the memory last until the map cell rots away.
* Merge branch 'master' into portal_branchesAdam Borowski2011-12-281-8/+0
|\
| * Drop an option aggressive_verify you can't turn off anymore.Adam Borowski2011-12-271-8/+0
| |
* | Fix losing stash data upon a trip to the Abyss or a Ziggurat.Adam Borowski2011-11-041-3/+0
|/
* Toggle between locations and items when searchingkittel2011-10-271-1/+6
|
* Remove stash_filter completely.Adam Borowski2011-10-251-6/+0
| | | | | | | | | | It's a remnant of old explicit stashes, not needed with the new interface. And its primary mode of operation relies on the user specifying base_type / sub_type numbers, something even the code doesn't do anymore for years. The ability to use names was half-baked. If you're searching for a scroll, "useless" ones being not shown is surprising and leads to bug reports.
* Rename player_in_mappable_area(), re-use of the old name brings confusion.Adam Borowski2011-10-091-1/+1
| | | | | The old function by that name returned mappability, the new one returns map rot (Abyss, Lab). Map does exist, you can detect stuff, etc.
* Remove unused level flags, forbid exclusions in Abyss and Lab.Adam Borowski2011-10-091-2/+1
| | | | | | | | Old unmappable levels are gone for good, and good riddance. Thus, player_in_mappable_area() is obsolete; I removed it and stolen the name for "Lab or Abyss" check, done inconsistently in several places. Also, exclusions there were problematic -- I removed them for now, please change this back if you can fix them.
* Apply the new feature mimic implementation to all types.Raphael Langella2011-09-051-1/+1
| | | | | | | | | | Starting from D:10, any door, stairs, escape hatch, shop fountain and portal has one chance in 100 of being a mimic. Branch entry vaults can be placed with a branch entry mimic. No mimics in the temple and the vestibule. For now, those are the only excluded places.
* Allow searching by equipment slot.Raphael Langella2011-07-211-0/+3
| | | | | The keywords are: cloak helmet gloves boots shield body
* Waypoint search.Raphael Langella2011-06-031-0/+1
| | | | | | | | Searching for a single digit yields the content of the stash located at the waypoint. Searching for * returns the content of all the waypoints. Since waypoints are often used to mark player's stash, it is very useful to quickly check the content of a stash (or all of them).
* Search: when showing stash content, only show items matching the search.Raphael Langella2011-05-171-16/+10
| | | | Maybe we need a toggle to allow showing the whole stash (previous behaviour)
* Merge branch 'unicode'.Adam Borowski2011-04-011-9/+4
|\ | | | | | | | | There are some issues left, like incorrect wrapping in some cases, but we can fix them later.
| * Convert ofstream to fprintf() for stash dumps. Translate charsets.Adam Borowski2010-12-161-9/+4
| | | | | | | | | | Using ofstream requires huge hacks on Polish/Russian/etc Windows, and is outright impossible on Vietnamese.
* | Ashenzari: retroactive identification.Raphael Langella2011-03-281-0/+3
| | | | | | | | | | Whenever a search is started, the stash is updated and all item identification is updated according to current piety and bounded slots.
* | Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-5/+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.
* | [2930] Fix stash search results not being coloured correctly when matching ↵Darshan Shaligram2011-03-171-1/+35
|/ | | | | | | | | | item heaps. This alters menu colouring to prefer a menu item's preset colour value over using menu_colour on the item string. This is really a bit of a hack: we should probably switch the stash tracker to use real InvEntrys at some point and remove this shim.
* Feature mimics appearing in search resultsArxale2010-12-011-0/+2
| | | | Signed-off-by: Johanna Ploog <j-p-e-g@users.sourceforge.net>
* Get rid of some more insidious longs.Adam Borowski2010-10-041-3/+3
| | | | | | | | | | Especially constructs like: long foo = x.props[].get_int() can get you by surprise on 32 bit arches -- even worse now that most devs are on amd64. Item flags I typedeffed as iflags_t, as it's likely we'll have to extend it soon, yet defining it as uint64_t now would be misleading since there are so many places it's used in a 32 bit manner.
* Rename chars used as numbers to int8_t/uint8_t. Fix some other type usage.Adam Borowski2010-07-301-2/+2
| | | | | | | | | | This should help against the signed char problems, and is good for code readability. Now, if you have a char, it's either an untyped in-memory byte, or a symbol inside a string. Small numbers are instead [u]int8_t, ints, an enum type, or, in so many cases, bools. I didn't touch any of the tiles code, as it's currently broken and I don't want to risk making it unbroken harder.
* Bring sanity to enums by making them diffable/patchable.Adam Borowski2010-06-081-2/+2
|
* Add greedy_pickup_gold and greedy_visited_item_stack explore stop options.Darshan Shaligram2010-03-281-0/+4
| | | | | | | | | The old explore behaviour of stopping when visiting a previously unknown item stack was useful. This is now controlled by the explore_stop option greedy_visited_item_stack, enabled by default. Some players prefer explore to stop when picking up gold. This can be enabled by greedy_pickup_gold (not enabled by default).
* stash_filter now affects only ^F search; filtered items are still remembered ↵Darshan Shaligram2010-02-281-1/+4
| | | | | | | | | | by the stash tracker. Making stash_filter affect only display prevents players from gaming Troves by tweaking their stash_filter settings. It will also help players who accidentally filter too much; when they discover their error they can just fix their filters without having to re-explore the dungeon to locate filtered items.
* stash.{cc,h}: remove meaningless qualifier on return typeSteven Noonan2010-02-241-1/+1
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Don't have stash tracking use separate versioning. Drop another ↵Adam Borowski2010-02-051-2/+2
| | | | int-in-float abuse.
* Some movement from x,y to coord_def.Haran Pilpel2010-01-261-31/+18
|
* Handle out-of-sight cells better in targetting. Also minor cleanups elsewhere.Haran Pilpel2010-01-261-4/+4
|
* Save stash tracker reply to stash tracker.Robert Vollmert2010-01-221-1/+1
| | | | | | Also don't redraw the prompt each iteration, since the message window can now redisplay the prompt after exiting the help menu.
* Reduce dependency on travel.hMatthew Cline2009-11-291-1/+0
| | | | | | | | Removed inclusion of travel.h from most .h files to reduce the number of .cc files dependant on it. This involved moving the level_pos declaration to externs.h, moving the flood_find template to it's own header file, and moving two typedefs from travel.h to travel_defs.h because typedefs can't be forward declared (argh).
* Manipulate shopping list from stash trackerMatthew Cline2009-11-271-2/+4
|