From ca066cbdff4b735dbf04266147f9d2a98b91f4b8 Mon Sep 17 00:00:00 2001 From: pauldubois Date: Mon, 10 Mar 2008 00:16:41 +0000 Subject: For 1909388: command key changes Added init.txt option additional_macro_file, which does what you expect. Macros are read after the player's macro.txt. Documented new option. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3565 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/initfile.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/initfile.cc') diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 22fb404cfc..805d9d4312 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -598,6 +598,7 @@ void game_options::reset_options() #if !defined(SHORT_FILE_NAMES) && !defined(SAVE_DIR_PATH) morgue_dir = "morgue/"; #endif + additional_macro_files.clear(); player_name.clear(); @@ -1614,7 +1615,7 @@ void game_options::read_option_line(const std::string &str, bool runscript) trim_string( field ); // Keep unlowercased field around - std::string orig_field = field; + const std::string orig_field = field; if (key != "name" && key != "crawl_dir" && key != "race" && key != "class" && key != "ban_pickup" @@ -2696,7 +2697,10 @@ void game_options::read_option_line(const std::string &str, bool runscript) else pickup_mode = read_bool_or_number(field, pickup_mode, "auto:"); } - + else if (key == "additional_macro_file") + { + additional_macro_files.push_back(orig_field); + } #ifdef USE_TILE else if (key == "show_items") { -- cgit v1.2.3-54-g00ecf