From 91527afd3e9c0e92ddb79cdc63e89ccf2fa536fe Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Tue, 13 Oct 2009 18:12:47 -0700 Subject: New option explore_delay, which lets you make the delay between auto-explore moves be different than the delay between the moves of other types of travel. By default (explore_delay == -1) the auto-explore delay is the same as travel_delay, preserving the old behaviour. --- crawl-ref/docs/changelog.txt | 3 +++ crawl-ref/docs/options_guide.txt | 17 +++++++++++++---- crawl-ref/settings/init.txt | 1 + crawl-ref/source/delay.cc | 2 ++ crawl-ref/source/externs.h | 1 + crawl-ref/source/initfile.cc | 10 ++++++++++ crawl-ref/source/travel.cc | 7 ++++++- crawl-ref/source/view.cc | 4 +++- 8 files changed, 39 insertions(+), 6 deletions(-) diff --git a/crawl-ref/docs/changelog.txt b/crawl-ref/docs/changelog.txt index 15037476d0..0f4636672a 100644 --- a/crawl-ref/docs/changelog.txt +++ b/crawl-ref/docs/changelog.txt @@ -46,6 +46,9 @@ Stone Soup 0.6 * More generous stacking of ammunition. * Tiles: re-added doll editing screen ('-' command). * Tiles: added clickable spells display (toggle with '_' command). +* Added option explore_delay, which can be used to make the delay + between auto-explore moves different than the delay between other + types of of travel moves. Stone Soup 0.5.2 (20091008) diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt index e8b8bed767..50874506e5 100644 --- a/crawl-ref/docs/options_guide.txt +++ b/crawl-ref/docs/options_guide.txt @@ -46,7 +46,7 @@ The contents of this text are: symmetric_scroll, scroll_margin_x, scroll_margin_y, scroll_margin 4-g Travel and Exploration. - travel_delay, travel_avoid_terrain, + travel_delay, explore_delay, travel_avoid_terrain, explore_greedy, explore_stop, explore_improved, tc_reachable, tc_dangerous, tc_disconnected, tc_excluded, tc_exclude_circle, travel_stop_message, @@ -775,9 +775,18 @@ scroll_margin = 2 ------------------------------- travel_delay = 20 - How long travel waits after each move (milliseconds). Depends on - platform. Setting to -1 will jump to end of travel - you will - not see the individual moves. + How long travel waits after each move (milliseconds), and also + how long auto-explore waits after each move unless explore_delay + is set. Depends on platform. Setting to -1 will jump to end of + travel - you will not see the individual moves. + +explore_delay = -1 + How long auto-explore waits after each move (milliseconds). Depends on + platform. In particular, setting travel_delay = -1 and + explore_delay = 20 means you will see the invividual moves of + autoexplore, but not the invidivual moves of other forms of travel. + Setting to -1 means the auto-explore delay will be the same as + travel_delay. travel_avoid_terrain = (shallow water | deep water) Prevent travel from routing through shallow water. By default, diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt index 04fb12f73e..d49fc6812b 100644 --- a/crawl-ref/settings/init.txt +++ b/crawl-ref/settings/init.txt @@ -160,6 +160,7 @@ drop_filter = useless_item ##### 4-g Travel and Exploration ################# # # travel_delay = 20 +# explore_delay = -1 # travel_avoid_terrain = shallow water # # explore_greedy = false diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index 771f97cad2..f7b4ef06bd 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -1611,6 +1611,8 @@ static command_type _get_running_command() } return CMD_MOVE_NOWHERE; } + else if (you.running.is_explore() && Options.explore_delay > -1) + delay(Options.explore_delay); else if (Options.travel_delay > 0) delay(Options.travel_delay); diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 619295a303..80517c81c7 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -2061,6 +2061,7 @@ public: bool pickup_thrown; // Pickup thrown missiles bool pickup_dropped; // Pickup dropped objects int travel_delay; // How long to pause between travel moves + int explore_delay; // How long to pause between explore moves int arena_delay; bool arena_dump_msgs; diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index e256359f2c..8370797f44 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -780,6 +780,7 @@ void game_options::reset_options() pickup_thrown = true; travel_delay = 20; + explore_delay = -1; travel_stair_cost = 500; arena_delay = 600; @@ -2791,6 +2792,15 @@ void game_options::read_option_line(const std::string &str, bool runscript) if (travel_delay > 2000) travel_delay = 2000; } + else if (key == "explore_delay") + { + // Read explore delay in milliseconds. + explore_delay = atoi( field.c_str() ); + if (explore_delay < -1) + explore_delay = -1; + if (explore_delay > 2000) + explore_delay = 2000; + } else if (key == "level_map_cursor_step") { level_map_cursor_step = atoi( field.c_str() ); diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index 9715c41e33..0775a16c29 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -1423,12 +1423,17 @@ command_type travel() stop_running(); } } + else if (you.running.is_explore() && Options.explore_delay > -1) + delay(Options.explore_delay); else if (Options.travel_delay > 0) delay(Options.travel_delay); } - if (!you.running && Options.travel_delay == -1) + if (!you.running && Options.travel_delay == -1 + && (!you.running.is_explore() || Options.explore_delay == -1)) + { viewwindow(true, false); + } if (!you.running) return CMD_NO_CMD; diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index e9499f2181..99f5a20707 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -4125,7 +4125,9 @@ void viewwindow(bool draw_it, bool do_updates) #ifdef USE_TILE !is_resting() && #endif - (!you.running || Options.travel_delay > -1) && !you.asleep(); + (!you.running || Options.travel_delay > -1 + || you.running.is_explore() && Options.explore_delay > -1) + && !you.asleep(); int bufcount = 0; -- cgit v1.2.3-54-g00ecf