summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/initfile.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-30 04:52:33 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-30 04:52:33 +0000
commit38ebcee4627305ea124f2802fc9498e1acb97764 (patch)
tree160c889b466700e411b10c0d152984b1bb7706d2 /crawl-ref/source/initfile.cc
parent96a64a6214f7c68b0aa6b94836e77cdf6984d728 (diff)
downloadcrawl-ref-38ebcee4627305ea124f2802fc9498e1acb97764.tar.gz
crawl-ref-38ebcee4627305ea124f2802fc9498e1acb97764.zip
Added two new options, rest_wait_both and chunks_autopickup, both defaulting
to false. If rest_wait_both is true then resting will only stop when both HP and MP are both fully restored, not when only one or the other is restored. If chunks_autopickup is true then flesh chunks generated from butchering will automatically be picked up (respecting the other autopickup settings). My implementation of rest_wait_both has a few side effects. I got rid of check_hp() and check_mp() from the runrest class, since player AI interruption code seems to be able to take care of that. I also added a rather kuldgey block_interruptions() so that the activity interrupts code could use mpr() without going into infinite recursion because of AI_MESSAGE interrutps. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5337 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r--crawl-ref/source/initfile.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 841e78e782..f6be423732 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -485,7 +485,7 @@ void game_options::set_default_activity_interrupts()
"interrupt_travel = interrupt_butcher, statue, hungry, "
"burden, monster, hit_monster",
"interrupt_run = interrupt_travel, message",
- "interrupt_rest = interrupt_run",
+ "interrupt_rest = interrupt_run, full_hp, full_mp",
// Stair ascents/descents cannot be interrupted, attempts to interrupt
// the delay will just trash all queued delays, including travel.
@@ -671,6 +671,7 @@ void game_options::reset_options()
easy_unequip = true;
easy_butcher = true;
always_confirm_butcher = false;
+ chunks_autopickup = false;
list_rotten = true;
easy_confirm = CONFIRM_SAFE_EASY;
easy_quit_item_prompts = true;
@@ -886,6 +887,8 @@ void game_options::reset_options()
clear_feature_overrides();
mon_glyph_overrides.clear();
+ rest_wait_both = false;
+
// Map each category to itself. The user can override in init.txt
kill_map[KC_YOU] = KC_YOU;
kill_map[KC_FRIENDLY] = KC_FRIENDLY;
@@ -1875,6 +1878,7 @@ void game_options::read_option_line(const std::string &str, bool runscript)
else BOOL_OPTION_NAMED("easy_armor", easy_unequip);
else BOOL_OPTION(easy_butcher);
else BOOL_OPTION(always_confirm_butcher);
+ else BOOL_OPTION(chunks_autopickup);
else BOOL_OPTION(list_rotten);
else if (key == "lua_file" && runscript)
{
@@ -2568,6 +2572,7 @@ void game_options::read_option_line(const std::string &str, bool runscript)
}
}
}
+ else BOOL_OPTION(rest_wait_both);
else if (key == "dump_message_count")
{
// Capping is implicit