From a77e1d86ee4ce3d49c49750bee70a0fabfcf17a1 Mon Sep 17 00:00:00 2001 From: nlanza Date: Fri, 27 Feb 2009 02:54:00 +0000 Subject: FR 2533562: Move the CRAWL_PIZZA / -pizza options into the init file so that they're more easily accessible in hosted games. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9250 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/initfile.cc | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'crawl-ref/source/initfile.cc') diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 671264c652..d4d5f1d25f 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -855,7 +855,9 @@ void game_options::reset_options() false); item_stack_summary_minimum = 5; - + + pizza.clear(); + #ifdef WIZARD fsim_rounds = 40000L; fsim_mons = "worm"; @@ -2291,6 +2293,11 @@ void game_options::read_option_line(const std::string &str, bool runscript) { set_fire_order(field, plus_equal); } + else if (key == "pizza") + { + // field is already cleaned up from trim_string() + pizza = field; + } BOOL_OPTION(random_pick); else BOOL_OPTION(good_random); @@ -3313,9 +3320,6 @@ void get_system_environment(void) // The player's name SysEnv.crawl_name = check_string( getenv("CRAWL_NAME") ); - // The player's pizza - SysEnv.crawl_pizza = check_string( getenv("CRAWL_PIZZA") ); - // The directory which contians init.txt, macro.txt, morgue.txt // This should end with the appropriate path delimiter. SysEnv.crawl_dir = check_string( getenv("CRAWL_DIR") ); @@ -3359,7 +3363,6 @@ enum commandline_option_type { CLO_NAME, CLO_RACE, CLO_CLASS, - CLO_PIZZA, CLO_PLAIN, CLO_DIR, CLO_RC, @@ -3376,7 +3379,7 @@ enum commandline_option_type { }; static const char *cmd_ops[] = { - "scores", "name", "race", "class", "pizza", "plain", "dir", "rc", + "scores", "name", "race", "class", "plain", "dir", "rc", "rcdir", "tscores", "vscores", "scorefile", "morgue", "macro", "mapstat", "arena" }; @@ -3569,16 +3572,6 @@ bool parse_args( int argc, char **argv, bool rc_only ) nextUsed = true; break; - case CLO_PIZZA: - if (!next_is_param) - return (false); - - if (!rc_only) - SysEnv.crawl_pizza = next_arg; - - nextUsed = true; - break; - case CLO_PLAIN: if (next_is_param) return (false); -- cgit v1.2.3-54-g00ecf