summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/initfile.cc
diff options
context:
space:
mode:
authorpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-10 00:16:41 +0000
committerpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-10 00:16:41 +0000
commitca066cbdff4b735dbf04266147f9d2a98b91f4b8 (patch)
tree390ed77c59f1eff6116afd2872194fdf5966308f /crawl-ref/source/initfile.cc
parent38ccc5f47d34e511bfeddf3a989ca0923b8af4c4 (diff)
downloadcrawl-ref-ca066cbdff4b735dbf04266147f9d2a98b91f4b8.tar.gz
crawl-ref-ca066cbdff4b735dbf04266147f9d2a98b91f4b8.zip
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
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r--crawl-ref/source/initfile.cc8
1 files changed, 6 insertions, 2 deletions
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")
{