request stuff to pick up without inscribing with =g. ban_pickup is now semi-deprecated.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@908 c06c8d41-db1a-0410-9941-cceddc491573
RREJL4WZKWFEMA62AC5G5UDTOXMW4UULIQXVA5RPFASPODMHQZ7AC YWYXUCZKGNIAWAUKUESIPFCAL5HZOKOEWHUEUW7X4DMAX2HG2FSAC CAHE52HL2ZGRJPBYZ3DS4BVKUD2XC7N3SG25TGG7JGHGJDST4P3QC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC 547JREUJXTZNYVGHNNAET5F5O5JYYGNTDQB6ABZNT7YX5EY64OHAC RVST2QHYJ757ZHK4AUJ5NGPDZ44AD6RVFVXYPKQIBJXZBDNUCHXQC UF4ODJOCV3ZL7DXRLLOFVWHUKKJX34FO4ZM6VJAWEJ3QVP3XZ2AAC EHSY6DVGUMI6C67WKET3GDJVLWJWGYBYQONNDK5JVT7BCTHBEZVAC for ( unsigned i = 0; i < Options.autoinscriptions.size(); ++i ) {if ( Options.autoinscriptions[i].first.matches(iname) ) {item.inscription += Options.autoinscriptions[i].second;}
for ( unsigned i = 0; i < Options.autoinscriptions.size(); ++i ){if ( Options.autoinscriptions[i].first.matches(iname) ){item.inscription += Options.autoinscriptions[i].second;}
static bool is_banned(const item_def &item) {static char name[ITEMNAME_SIZE];item_name(item, DESC_INVENTORY, name, false);
static bool is_denied_autopickup(const item_def &item){std::string iname = item_name(item, DESC_PLAIN);for (unsigned i = 0, size = Options.never_pickup.size(); i < size; ++i){if (Options.never_pickup[i].matches(iname))return (true);}return false;}
std::string iname = name;for (unsigned i = 0; i < Options.banned_objects.size(); ++i) {if (Options.banned_objects[i].matches(iname))return true;
static bool is_forced_autopickup(const item_def &item){std::string iname = item_name(item, DESC_PLAIN);for (unsigned i = 0, size = Options.always_pickup.size(); i < size; ++i){if (Options.always_pickup[i].matches(iname))return (true);
return (strstr(item.inscription.c_str(), "=g") != 0|| ((item.flags & ISFLAG_THROWN) && Options.pickup_thrown)|| (((Options.autopickups & (1L << item.base_type))
if (strstr(item.inscription.c_str(), "=g") != 0)return (true);if ((item.flags & ISFLAG_THROWN) && Options.pickup_thrown)return (true);return (((Options.autopickups & (1L << item.base_type))|| is_forced_autopickup(item)
append_vector(banned_objects, split_string(",", field));
append_vector(never_pickup, split_string(",", field));}else if (key == "autopickup_exceptions"){std::vector<std::string> args = split_string(",", field);for (int i = 0, size = args.size(); i < size; ++i){const std::string &s = args[i];if (s.empty())continue;if (s[0] == '>')never_pickup.push_back( s.substr(1) );else if (s[0] == '<')always_pickup.push_back( s.substr(1) );elsenever_pickup.push_back( s );}
std::vector<std::string> thesplit = split_string(":", field);autoinscriptions.push_back(std::pair<text_pattern,std::string>(thesplit[0],thesplit[1]));
std::vector<std::string> thesplit = split_string(":", field);autoinscriptions.push_back(std::pair<text_pattern,std::string>(thesplit[0],thesplit[1]));
# White space is stripped from the begining and end of the line, as# well as imediately before and after the '='. If the option allows multiple# comma/semicolon-separated terms (such as ban_pickup), all whitespace around# the separator is also trimmed. All other whitespace is left intact.
# White space is stripped from the begining and end of the line, as well as# imediately before and after the '='. If the option allows multiple# comma/semicolon-separated terms (such as autopickup_exceptions), all# whitespace around the separator is also trimmed. All other whitespace is left# intact.
autopickup, default_autopickup, safe_autopickup,autopickup_no_burden, safe_zero_exp, pickup_thrown,pickup_dropped, assign_item_slot, ban_pickup, drop_mode,pickup_mode, drop_filter;
autopickup, autopickup_exceptions, default_autopickup,safe_autopickup, autopickup_no_burden, safe_zero_exp,pickup_thrown, pickup_dropped, assign_item_slot,ban_pickup, drop_mode, pickup_mode, drop_filter;
autopickup_exceptions = <pickup-regex, >don't-pickup-regex, ...A set of regexes that force matching items to be picked up (if prefixedwith <), or never picked up (if prefixed with >). Excludes (>) takeprecedence over includes (<), so if the same item is matched by bothan exclude and an include, it will not be subject to autopickup.An example:autopickup_exceptions = <(poisoned|curare-tipped) needleForces autopickup to grab all poisoned and curare-tipped needles, evenif missiles are not set in the "autopickup" option.Whitespace between <> and the match expression is significant, so thisis a mistake:autopickup_exceptions = < ebony casketautopickup_exceptions is a superset of ban_pickup (see below). Usingautopickup_exceptions = >decay, >degenerationis the same as usingban_pickup = decay, degeneration