summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/initfile.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-02 16:58:08 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-02 16:58:08 +0000
commit46c9bd1b88d14d148bed88ca834afaddc7108197 (patch)
tree904f3f8101d71068c6b656e99833558013a2d8ed /crawl-ref/source/initfile.cc
parent80011c222ee25d7f12fce572c9058a7276355f85 (diff)
downloadcrawl-ref-46c9bd1b88d14d148bed88ca834afaddc7108197.tar.gz
crawl-ref-46c9bd1b88d14d148bed88ca834afaddc7108197.zip
[2029973] Saner autopickup exceptions (doy).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6868 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r--crawl-ref/source/initfile.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 4b5c252c9a..65cbdeee9f 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -901,8 +901,7 @@ void game_options::reset_options()
mp_colour.push_back(std::pair<int, int>(50, YELLOW));
mp_colour.push_back(std::pair<int, int>(25, RED));
- never_pickup.clear();
- always_pickup.clear();
+ force_autopickup.clear();
note_monsters.clear();
note_messages.clear();
autoinscriptions.clear();
@@ -2401,7 +2400,14 @@ void game_options::read_option_line(const std::string &str, bool runscript)
}
else if (key == "ban_pickup")
{
- append_vector(never_pickup, split_string(",", field));
+ 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;
+ force_autopickup.push_back(std::make_pair(s, false));
+ }
}
else if (key == "autopickup_exceptions")
{
@@ -2413,11 +2419,11 @@ void game_options::read_option_line(const std::string &str, bool runscript)
continue;
if (s[0] == '>')
- never_pickup.push_back( s.substr(1) );
+ force_autopickup.push_back(std::make_pair(s.substr(1), false));
else if (s[0] == '<')
- always_pickup.push_back( s.substr(1) );
+ force_autopickup.push_back(std::make_pair(s.substr(1), true));
else
- never_pickup.push_back( s );
+ force_autopickup.push_back(std::make_pair(s, false));
}
}
else if (key == "note_items")