summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stash.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* In the interest of efficency only call StashTrack.update_corpses()zelgadis2008-06-061-0/+5
| | | | | | | | when absolutelty necessary, rather than whenever the player isn't delayed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5493 c06c8d41-db1a-0410-9941-cceddc491573
* Added two new stash options, stash_track_decay and stash_remove_decay. Ifzelgadis2008-06-051-5/+133
| | | | | | | | | | | | | | | | stash_track_decay is true then the stash tracker will remember how long it's been since you've seen a rottable object (corpses, skeletons and meat chunks) and tell you its condition by appending "rotten by now", "skeletalised by now" or "gone by now" to its name in the stash menu. If stash_remove_decay is also true then any item that would have been marked "gone by now" is instead removed from the stash tracker. Doesn't yet track decay of potions of blood. Breaks stash save data compatibility. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5485 c06c8d41-db1a-0410-9941-cceddc491573
* Added "error" channel for runtime errors, and changed error messages thatzelgadis2008-05-271-1/+1
| | | | | | | | | used the "danger" or "warning" channels to use that. Sending an error message to the error channel has the side effect of interrupting all activity. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5276 c06c8d41-db1a-0410-9941-cceddc491573
* Finally fix 1868761: Books in shops being noted as identified over andj-p-e-g2008-05-201-51/+58
| | | | | | | | | | | over again (when searching stashes). Also remove my recently added NOTE_FOUND_ORB_OR_RUNES in favour of the previously existing NOTE_GET_ITEM. Also I've noticed that this is probably already listed in the "milestones" - but what on earth are they? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5150 c06c8d41-db1a-0410-9941-cceddc491573
* Fixes to compile with Visual C++. Moved direct.cc and direct.h to directn.* ↵dshaligram2008-04-191-1/+1
| | | | | | to avoid conflict with VC++ direct.h header. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4390 c06c8d41-db1a-0410-9941-cceddc491573
* Another code cleanup.j-p-e-g2008-04-151-64/+76
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4244 c06c8d41-db1a-0410-9941-cceddc491573
* For David. Menu's draw_title_suffix can now accept a formatted_stringpauldubois2008-04-071-2/+2
| | | | | | | | | | | | instead of a string. See example in StashSearchMenu::draw_title. If you want everything in cyan, you might want to figure out who sets the StashSearchMenu's title->color and change that, too. Added formatted_string::substr(). Lightly tested, seems to work fine. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4091 c06c8d41-db1a-0410-9941-cceddc491573
* Prevent shafts from being created in corridors, at least untilj-p-e-g2008-03-291-2/+2
| | | | | | | | | | | | | | | | | around dungeon level 7. Rename ROCK_STAIRS to ESCAPE_HATCH, as well as the corresponding function, since I think that the escape hatches are such a cool concept that we won't be going back, and the current coding name is a bit confusing. Clean up dungeon.cc. I'll probably have to add stuff into our new conventions file as I've been making up a lot of new rules in trying to make the code more readable. (Rules concerning nested brackets, and function indentation, etc.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3927 c06c8d41-db1a-0410-9941-cceddc491573
* This was originally going to be a small refactor of stash.cc beforepauldubois2008-03-231-66/+60
| | | | | | | | | | | | | | | | | getting into stash/item finding, but it ended up big. Removed the read/writeThing API in favor of the marshall/unmarshallThing API. It was slightly awkward in a couple spots where the format of writeThing and marshallThing differed slightly (strings, level_id, level_pos). Doesn't affect savegames. When it's is okay to break savegames (maybe just before releasing 0.4?) it would be nice to remove the few remaining redundancies listed above. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3828 c06c8d41-db1a-0410-9941-cceddc491573
* "stashes" was both a global variable and a member variable... confusing!pauldubois2008-03-231-53/+56
| | | | | | | Renamed both of them. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3827 c06c8d41-db1a-0410-9941-cceddc491573
* Cleanup/refactoring of tags.cc. No functional changes. I've beenpauldubois2008-03-171-4/+4
| | | | | | | | | | | | | | | | | | | running with and without this patch applied for about a week, and none of my saves have broken, so I'm ready to commit it. - Tag system no longer uses one big (shared!) global buffer. This was the original impetus behind the change... - Change every use of tagHeader into reader or writer (touches a lot). - Split tagHeader into two classes: reader and writer. Turns out every place that used tagHeader only cared about reading or writing and not about tags at all. There was nothing left in tagHeader, so it disappeared along with a bunch of grotty special-case code. - Not done: merge the files.cc read/writeThing code with the tags.cc marshall/unmarshallThing code. This patch is big enough already. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3685 c06c8d41-db1a-0410-9941-cceddc491573
* Implement FR 1808966: j-p-e-g2008-03-091-1/+1
| | | | | | | | | | | | | | | | Your summoned Daevas leave you if TSO puts you under penance, and they'll actually attack you if you abandon TSO. While the former only applies to Daevas on your current level, the latter happens for all visited dungeon levels. The functions used are generic enough to work for other cases as well, e.g. Trog's "Brothers in Arms" now also turn hostile if you leave Trog. Also: * Make Beogh "protect you from harm" like Zin/TSO do, but only if you're not under penance. * Correct Amulet of inaccuracy description (Bug 1895810). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3558 c06c8d41-db1a-0410-9941-cceddc491573
* Fixing [1901305] stash search assert. Turned off drawing of tiles items ↵ennewalker2008-03-021-0/+7
| | | | | | when searching stashes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3504 c06c8d41-db1a-0410-9941-cceddc491573
* Apply patch 1901227: allow alphabetic stash search sorting.j-p-e-g2008-02-251-24/+97
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3462 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed bad stash-search prompt on DOS.dshaligram2008-01-281-1/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3374 c06c8d41-db1a-0410-9941-cceddc491573
* Added help for stash-search (dpeg).dshaligram2008-01-261-6/+47
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3338 c06c8d41-db1a-0410-9941-cceddc491573
* Fix collision between gotoxy(int,int,int) and DOS djgpp gotoxy().dshaligram2008-01-251-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3337 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed crashes when searching for randarts in stash-tracker.dshaligram2007-12-161-24/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3078 c06c8d41-db1a-0410-9941-cceddc491573
* Code cleanup in describe.cc randart descriptions.haranp2007-12-121-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3048 c06c8d41-db1a-0410-9941-cceddc491573
* Menus are now tagged. Menu colours now only apply to a menu with a matchingharanp2007-10-191-0/+2
| | | | | | | | | | | | tag, unless the menu colour tag is empty or "any". Menu colours are specified as tag:colour:pattern, where the "tag:" part is optional (default is empty tag, i.e., all menus.) The following menu tags exist: ability, description, equip, help, inventory, notes, resists, spell, stash. Default .crawlrc should probably be changed (and the docs, too...) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2493 c06c8d41-db1a-0410-9941-cceddc491573
* Fix for 1807899: stash-examining a shop will trigger ID noting.haranp2007-10-111-0/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2443 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed regex escapes for "." stash search.dshaligram2007-09-301-27/+36
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2266 c06c8d41-db1a-0410-9941-cceddc491573
* Introducing shortcut for searching the current level asj-p-e-g2007-09-301-7/+30
| | | | | | | | | | requested in FR 1801705. Also adding feedback when auto-travel fails to kick in. And trying to get out of a net no longer stops travel, only being caught in one does (FR 1800821). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2263 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+5
| | | | | | | | | | | | | crawl_environment, player and monsters classes have been left in externs.h, which necessitates that all of the enums references by those classes stay in enums.h, since you can't forward declare an enum. However, it's a start. Also, portions of misc.{cc,h} have been split off into traps.{cc,h}, place.{cc,h} and terrain.{cc,h} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2095 c06c8d41-db1a-0410-9941-cceddc491573
* Added two new message channels:j-p-e-g2007-08-301-1/+1
| | | | | | | | | | | * MSGCH_EXAMINE (examine surroundings in direct.cc), and * MSGCH_EXAMINE_FILTER (as above for "less important" cases) The latter is filtered out of the message history (hence the name) and includes items/features out of sight and "Floor." git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2037 c06c8d41-db1a-0410-9941-cceddc491573
* Allow inscription when viewing items. j-p-e-g2007-08-131-3/+4
| | | | | | | This also works in shops which I think is okay. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1994 c06c8d41-db1a-0410-9941-cceddc491573
* Reworked Bazaars as a special case of portal vaults. The level-type is nowdshaligram2007-07-271-1/+1
| | | | | | | | | | | | | called portal vault. The dungeon builder bases its behaviour on the level_type_name, which must be set as the "dst" property on the portal leading to the bazaar/portal vault. Added WELCOME: directive to .des files to allow maps to specify a welcome message when the player enters the level (only relevant to encompass maps). Readjusted kenku flight speed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1941 c06c8d41-db1a-0410-9941-cceddc491573
* Updated level-design.txt.dshaligram2007-07-211-0/+1
| | | | | | | | | | | Moved map markers to mapmark.cc. Added support for timer markers that remove a feature after a certain timeout. Need to hook up messaging to Lua. Added bazaars (need more bazaar layouts). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1899 c06c8d41-db1a-0410-9941-cceddc491573
* Minor type-safety.haranp2007-07-141-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1862 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed $ not correctly setting the deepest depth in branches from the ^G depthdshaligram2007-07-111-1/+1
| | | | | | prompt under certain circumstances (Erik). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1837 c06c8d41-db1a-0410-9941-cceddc491573
* [1737348] Allow stash.lua to annotate item names for autopickup so autopickupdshaligram2007-07-111-14/+10
| | | | | | can use matches like <Short Blades. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1832 c06c8d41-db1a-0410-9941-cceddc491573
* [1748162] Allow travel to the stair to a branch or level (using ^ will go todshaligram2007-07-051-1/+1
| | | | | | | | | the entrance to any level; can also enter 0 at the depth prompt to go to a branch entrance.) Also (experimentally) unifies the level-map and interlevel travel targets. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1754 c06c8d41-db1a-0410-9941-cceddc491573
* Experimental mouse support for ncurses (enable with mouse_input=yes indshaligram2007-06-201-0/+1
| | | | | | .crawlrc). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1610 c06c8d41-db1a-0410-9941-cceddc491573
* Correct "artifact" to "artefact".dshaligram2007-06-201-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1607 c06c8d41-db1a-0410-9941-cceddc491573
* [1738010] Stash-tracker now also tracks traps and other dungeon features.dshaligram2007-06-171-26/+79
| | | | | | | | Changed env.grid to dungeon_feature_type. (The special-level builder still stores map characters directly into env.grid and then translates them to features.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1592 c06c8d41-db1a-0410-9941-cceddc491573
* [1726243] Changed out-of-sight stash description for additional items from (+n)dshaligram2007-06-021-2/+2
| | | | | | to (...n). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1510 c06c8d41-db1a-0410-9941-cceddc491573
* sort_menus now allows the user to choose what menus to sort, and how todshaligram2007-05-311-1/+4
| | | | | | sort items, at the cost of obfuscating the sort_menus option massively. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1494 c06c8d41-db1a-0410-9941-cceddc491573
* Removed dud verbose_dump and detailed_stat_dump options, and dead code indshaligram2007-04-291-12/+10
| | | | | | shopping.cc (Haran). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1395 c06c8d41-db1a-0410-9941-cceddc491573
* Some code review and cleanup.haranp2007-04-281-19/+7
| | | | | | | extern char info[] is almost gone. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1387 c06c8d41-db1a-0410-9941-cceddc491573
* Made item_def::base_type into object_class_type, instead of unsigned char.haranp2007-04-261-13/+5
| | | | | | | | | | | Flushed out a few bugs as a result, specifically: 1. Some monsters (e.g., orcs) can now get blowguns as they were intended to (look at the makeitem.cc change); 2. Acquirement will no longer attempt to give you the books of minor magic if you've found them (look at the effects.cc change.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1374 c06c8d41-db1a-0410-9941-cceddc491573
* Minor speedup in stash item name generation: use const_cast<> instead ofharanp2007-04-261-14/+25
| | | | | | | copying a temporary. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1373 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up shop-handling code considerably.haranp2007-04-241-20/+22
| | | | | | | | | | | | | Instead of shops passing around global id_arr arrays, shops use the newly added third argument to item_def::name() which indicates whether to override item ID status. This means that the shop ID SIGHUP protection is now unnecessary; it's been removed. Hopefully I caught all the places where the stash tracker tries to get item names and fixed them, but I might have missed something. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1359 c06c8d41-db1a-0410-9941-cceddc491573
* Eliminated it_name(), in_name(), item_name(). The function to use isharanp2007-04-211-2/+3
| | | | | | | | now item_def::name(). Cleaned up a lot of code in the process. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1341 c06c8d41-db1a-0410-9941-cceddc491573
* Tweaked to allow building without CLUA_BINDINGS, but allowingdshaligram2007-04-161-2/+0
| | | | | | Lua-conditionalised search patterns. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1320 c06c8d41-db1a-0410-9941-cceddc491573
* Fixes for compiling without Lua. (Darshan, I hope I didn't break anything...)haranp2007-04-161-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1319 c06c8d41-db1a-0410-9941-cceddc491573
* Tweaked CLUA_BINDINGS so that the only thing it controls is running userdshaligram2007-04-141-2/+0
| | | | | | scripts. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1309 c06c8d41-db1a-0410-9941-cceddc491573
* Allow "any trap" and "any shop" (alternatives to "random trap" and "randomdshaligram2007-04-101-13/+0
| | | | | | | | | | shop") in des files. Allow using '8', '9' and '0' in monster specifications. Tossed out some unused functions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1281 c06c8d41-db1a-0410-9941-cceddc491573
* Kill hard tabs.dshaligram2007-03-061-1/+1
| | | | | | redraw_dexterity now implies redraw_evasion. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@987 c06c8d41-db1a-0410-9941-cceddc491573
* Tutorial (JPEG) and some formatting cleanup.dshaligram2007-02-061-0/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@924 c06c8d41-db1a-0410-9941-cceddc491573
* The stash-tracker also needs shop SIGHUP protection.dshaligram2007-01-171-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@859 c06c8d41-db1a-0410-9941-cceddc491573