summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/initfile.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-24 15:45:20 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-24 15:45:20 +0000
commita4cf0d15ce8bae7dbefe95b5709a403ab2f1ccaa (patch)
tree9d20ab89329eb4ef9c86d8292a9b39ea9dba1256 /crawl-ref/source/initfile.cc
parent1c46649f35b7423825ea143b614661bc502c9cc5 (diff)
downloadcrawl-ref-a4cf0d15ce8bae7dbefe95b5709a403ab2f1ccaa.tar.gz
crawl-ref-a4cf0d15ce8bae7dbefe95b5709a403ab2f1ccaa.zip
Change Options.autopickup_on from boolean to 3-state: 1 (autopick up), 0
(autopickup off), -1 (autopickup turned off automatically). Only in the latter case does killing an invisible monster turn autopickup (back) on. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9691 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r--crawl-ref/source/initfile.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 1f48e6a6d2..9083bf85ab 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -684,7 +684,7 @@ void game_options::reset_options()
verbose_monster_pane = true;
- autopickup_on = true;
+ autopickup_on = 1;
default_friendly_pickup = FRIENDLY_PICKUP_FRIEND;
show_more_prompt = true;
@@ -2108,7 +2108,13 @@ void game_options::read_option_line(const std::string &str, bool runscript)
}
#endif
else BOOL_OPTION(use_old_selection_order);
- else BOOL_OPTION_NAMED("default_autopickup", autopickup_on);
+ else if (key == "default_autopickup")
+ {
+ if (_read_bool(field, true))
+ autopickup_on = 1;
+ else
+ autopickup_on = 0;
+ }
else if (key == "default_friendly_pickup")
{
if (field == "none")