diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-02 14:44:15 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-02 14:44:15 +0000 |
commit | 49401e18692e235ddd101c51073d93d96a33954e (patch) | |
tree | cb0b7ebf262dbef83021c6e0497407d47993373a /crawl-ref/source/initfile.cc | |
parent | e37ab8471fcc8761a0d4a4954918ec4c679ed1bb (diff) | |
download | crawl-ref-49401e18692e235ddd101c51073d93d96a33954e.tar.gz crawl-ref-49401e18692e235ddd101c51073d93d96a33954e.zip |
Added allow_self_target option, with possible values yes, no, prompt.
Added brief documentation (could be improved.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6339 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r-- | crawl-ref/source/initfile.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index c1c59a9d37..9127da00d7 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -676,6 +676,7 @@ void game_options::reset_options() list_rotten = true; easy_confirm = CONFIRM_SAFE_EASY; easy_quit_item_prompts = true; + allow_self_target = CONFIRM_PROMPT; hp_warning = 10; magic_point_warning = 0; default_target = true; @@ -1942,6 +1943,15 @@ void game_options::read_option_line(const std::string &str, bool runscript) easy_confirm = CONFIRM_SAFE_EASY; } else BOOL_OPTION(easy_quit_item_prompts); + else if (key == "allow_self_target") + { + if (field == "yes") + allow_self_target = CONFIRM_NONE; + else if (field == "no") + allow_self_target = CONFIRM_CANCEL; + else if (field == "prompt") + allow_self_target = CONFIRM_PROMPT; + } else BOOL_OPTION_NAMED("easy_quit_item_lists", easy_quit_item_prompts); else BOOL_OPTION(easy_open); else BOOL_OPTION(easy_unequip); |