Put back the default campaign difficulty to -1(none), and update...
...the help for the command line option to reflect that
This commit is contained in:
parent
46a33b3c64
commit
6da33317be
2 changed files with 17 additions and 17 deletions
|
@ -149,9 +149,9 @@ commandline_options::commandline_options ( int argc, char** argv ) :
|
|||
|
||||
po::options_description campaign_opts("Campaign options");
|
||||
campaign_opts.add_options()
|
||||
("campaign,c", po::value<std::string>()->implicit_value(std::string()), "goes directly to the campaign with id <arg>. A selection menu will appear if no id was specified")
|
||||
("campaign-difficulty", po::value<int>(), "the difficulty of the specified campaign (1 to max - default is 1)")
|
||||
("campaign-scenario", po::value<std::string>(),"the id of the scenario from the specified campaign")
|
||||
("campaign,c", po::value<std::string>()->implicit_value(std::string()), "goes directly to the campaign with id <arg>. A selection menu will appear if no id was specified.")
|
||||
("campaign-difficulty", po::value<int>(), "The difficulty of the specified campaign (1 to max). If none specified, the campaign difficulty selection widget will appear.")
|
||||
("campaign-scenario", po::value<std::string>(),"The id of the scenario from the specified campaign. The default is the first scenario.")
|
||||
;
|
||||
|
||||
po::options_description display_opts("Display options");
|
||||
|
|
|
@ -85,9 +85,9 @@ game_controller::game_controller(const commandline_options& cmdline_opts, const
|
|||
state_(),
|
||||
multiplayer_server_(),
|
||||
jump_to_multiplayer_(false),
|
||||
jump_to_campaign_(false,-1,"","")
|
||||
,jump_to_editor_(false)
|
||||
,cache_(game_config::config_cache::instance())
|
||||
jump_to_campaign_(false, -1, "", ""),
|
||||
jump_to_editor_(false),
|
||||
cache_(game_config::config_cache::instance())
|
||||
{
|
||||
bool no_music = false;
|
||||
bool no_sound = false;
|
||||
|
@ -109,21 +109,21 @@ game_controller::game_controller(const commandline_options& cmdline_opts, const
|
|||
const std::string app_basename = file_name(appname);
|
||||
jump_to_editor_ = app_basename.find("editor") != std::string::npos;
|
||||
|
||||
if (cmdline_opts_.campaign)
|
||||
{
|
||||
if (cmdline_opts_.campaign) {
|
||||
jump_to_campaign_.jump_ = true;
|
||||
jump_to_campaign_.campaign_id_ = *cmdline_opts_.campaign;
|
||||
std::cerr<<"selected campaign id: ["<<jump_to_campaign_.campaign_id_<<"]\n";
|
||||
if (cmdline_opts_.campaign_difficulty)
|
||||
jump_to_campaign_.difficulty_ = *cmdline_opts_.campaign_difficulty;
|
||||
else
|
||||
jump_to_campaign_.difficulty_ = 1; // it's the default
|
||||
std::cerr<<"selected difficulty: ["<<jump_to_campaign_.difficulty_<<"]\n";
|
||||
std::cerr << "selected campaign id: [" << jump_to_campaign_.campaign_id_ << "]\n";
|
||||
|
||||
if (cmdline_opts_.campaign_scenario)
|
||||
{
|
||||
if (cmdline_opts_.campaign_difficulty) {
|
||||
jump_to_campaign_.difficulty_ = *cmdline_opts_.campaign_difficulty;
|
||||
std::cerr << "selected difficulty: [" << jump_to_campaign_.difficulty_ << "]\n";
|
||||
}
|
||||
else
|
||||
jump_to_campaign_.difficulty_ = -1; // let the user choose the difficulty
|
||||
|
||||
if (cmdline_opts_.campaign_scenario) {
|
||||
jump_to_campaign_.scenario_id_ = *cmdline_opts_.campaign_scenario;
|
||||
std::cerr<<"selected scenario id: ["<<jump_to_campaign_.scenario_id_<<"]\n";
|
||||
std::cerr << "selected scenario id: [" << jump_to_campaign_.scenario_id_ << "]\n";
|
||||
}
|
||||
}
|
||||
if (cmdline_opts_.clock)
|
||||
|
|
Loading…
Add table
Reference in a new issue