diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-01 16:20:14 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-01 16:20:14 +0000 |
commit | fcac38d55bb7edbc230723166daf079c56f6736e (patch) | |
tree | 06b15c64f65d497dd719abd5189af3d8394c5f08 /crawl-ref/source/initfile.cc | |
parent | 66e1e32d8164d27c9491b638d5344c527b91a4bc (diff) | |
download | crawl-ref-fcac38d55bb7edbc230723166daf079c56f6736e.tar.gz crawl-ref-fcac38d55bb7edbc230723166daf079c56f6736e.zip |
Added extra entry vaults and option to load them.
Undead should not drown in deep water.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@970 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r-- | crawl-ref/source/initfile.cc | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index d5ae9102d1..50bcb190b7 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -728,6 +728,7 @@ void game_options::reset_options() channels[i] = MSGCOL_DEFAULT; // Clear vector options. + extra_levels.clear(); dump_order.clear(); new_dump_fields("header,stats,misc,inventory,skills," "spells,,overview,mutations,messages,screenshot," @@ -1301,7 +1302,8 @@ void game_options::read_option_line(const std::string &str, bool runscript) && key != "note_monsters" && key != "note_messages" && key.find("cset") != 0 && key != "dungeon" && key != "feature" && key != "fire_items_start" - && key != "menu_colour" && key != "menu_color") + && key != "menu_colour" && key != "menu_color" + && key != "levels" && key != "level" && key != "entries") { tolower_string( field ); } @@ -1387,13 +1389,13 @@ void game_options::read_option_line(const std::string &str, bool runscript) } else if (key == "default_autopickup") { - // should autopickup default to on or off? - autopickup_on = read_bool( field, autopickup_on ); + // should autopickup default to on or off? + autopickup_on = read_bool( field, autopickup_on ); } else if (key == "default_autoprayer") { - // should autoprayer default to on or off? - autoprayer_on = read_bool( field, autoprayer_on ); + // should autoprayer default to on or off? + autoprayer_on = read_bool( field, autoprayer_on ); } else if (key == "detailed_stat_dump") { @@ -1545,6 +1547,10 @@ void game_options::read_option_line(const std::string &str, bool runscript) // As a suggestion, try "rxvt -rv -fn 10x20" under Un*xes friend_brand = curses_attribute(field); } + else if (key == "levels" || key == "level" || key == "entries") + { + extra_levels.push_back(field); + } else if (key == "stab_brand") { stab_brand = curses_attribute(field); @@ -1885,19 +1891,19 @@ void game_options::read_option_line(const std::string &str, bool runscript) } else if (key == "note_skill_levels") { - std::vector<std::string> thesplit = split_string(",", field); - for ( unsigned i = 0; i < thesplit.size(); ++i ) + std::vector<std::string> thesplit = split_string(",", field); + for ( unsigned i = 0; i < thesplit.size(); ++i ) { - int num = atoi(thesplit[i].c_str()); - if ( num > 0 && num <= 27 ) - note_skill_levels.push_back(num); - else + int num = atoi(thesplit[i].c_str()); + if ( num > 0 && num <= 27 ) + note_skill_levels.push_back(num); + else { - fprintf(stderr, "Bad skill level to note -- %s\n", - thesplit[i].c_str()); - continue; - } - } + fprintf(stderr, "Bad skill level to note -- %s\n", + thesplit[i].c_str()); + continue; + } + } } else if (key == "pickup_thrown") { |