Skip to content

Commit

Permalink
MP Game Settings: removed show_connect member
Browse files Browse the repository at this point in the history
Early in the 1.13 development cycle there used to be an option to show the mp_connect screen
(now mp_staging) before starting an SP campaign. That was scrapped and the only code that used
it (in the SP initialization process) commented it out. Since we're not going to restore it,
might as well remove this flag.

Also removes the one instance remaining of a "show_configure" flag. Pretty sure this might have
also been a relic from the same time as show_connect, but it looks like it was since removed.
SP now has a dedicated screen for configuring active modifications in SP, which was the only
reason to show the configure dialog anyway (plus the mp create and configure screens were combined
later in 1.13 anyway).
  • Loading branch information
Vultraz authored and GregoryLundberg committed Nov 30, 2017
1 parent 23fcec5 commit 2cbba7e
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 33 deletions.
3 changes: 0 additions & 3 deletions src/game_initialization/create_engine.cpp
Expand Up @@ -255,11 +255,8 @@ create_engine::create_engine(saved_game& state)
// Restore game config for multiplayer.
game_classification::CAMPAIGN_TYPE type = state_.classification().campaign_type;

bool connect = state_.mp_settings().show_connect;

state_.clear();
state_.classification().campaign_type = type;
state_.mp_settings().show_connect = connect;

game_config_manager::get()->load_game_config_for_create(type == game_classification::CAMPAIGN_TYPE::MULTIPLAYER);

Expand Down
2 changes: 0 additions & 2 deletions src/game_initialization/mp_game_utils.cpp
Expand Up @@ -130,10 +130,8 @@ config initial_level_config(saved_game& state)
void level_to_gamestate(const config& level, saved_game& state)
{
game_classification::CAMPAIGN_TYPE type = state.classification().campaign_type;
bool show_connect = state.mp_settings().show_connect;
state = saved_game(level);
state.classification().campaign_type = type;
state.mp_settings().show_connect = show_connect;
}

void check_response(bool res, const config& data)
Expand Down
18 changes: 0 additions & 18 deletions src/game_initialization/singleplayer.cpp
Expand Up @@ -140,24 +140,6 @@ bool enter_configure_mode(const config& game_config, saved_game& state, ng::crea
bool enter_connect_mode(const config& /*game_config*/, saved_game& state)
{
ng::connect_engine connect_eng(state, true, nullptr);

// TODO: fix. Dialog starts game regardless of selection
#if 0
if(state.mp_settings().show_connect) {
lobby_info li(game_config, std::vector<std::string>());

gui2::dialogs::mp_staging dlg(connect_eng, li);
dlg.show();

if(dlg.get_retval() != gui2::window::OK) {
// TODO: enable the workflow loops from GUI1
//return enter_create_mode(game_config, state, jump_to_campaign_info(false, -1, "", ""));

return false;
}
}
#endif

connect_eng.start_game();

return true;
Expand Down
3 changes: 0 additions & 3 deletions src/game_launcher.cpp
Expand Up @@ -461,7 +461,6 @@ void game_launcher::set_test(const std::string& id)
state_.classification().campaign_define = "TEST";

state_.mp_settings().mp_era = "era_default";
state_.mp_settings().show_connect = false;

state_.set_carryover_sides_start(
config {"next_scenario", id}
Expand Down Expand Up @@ -696,7 +695,6 @@ void game_launcher::set_tutorial()
state_.classification().campaign_type = game_classification::CAMPAIGN_TYPE::TUTORIAL;
state_.classification().campaign_define = "TUTORIAL";
state_.mp_settings().mp_era = "era_default";
state_.mp_settings().show_connect = false;
state_.set_carryover_sides_start(
config {"next_scenario", "tutorial"}
);
Expand All @@ -714,7 +712,6 @@ bool game_launcher::new_campaign()
{
state_.clear();
state_.classification().campaign_type = game_classification::CAMPAIGN_TYPE::SCENARIO;
state_.mp_settings().show_connect = false;
play_replay_ = false;

return sp::enter_create_mode(game_config_manager::get()->game_config(),
Expand Down
3 changes: 0 additions & 3 deletions src/mp_game_settings.cpp
Expand Up @@ -39,7 +39,6 @@ mp_game_settings::mp_game_settings() :
mp_campaign(),
active_mods(),
side_users(),
show_connect(true),
num_turns(0),
village_gold(0),
village_support(1),
Expand Down Expand Up @@ -73,7 +72,6 @@ mp_game_settings::mp_game_settings(const config& cfg)
, mp_campaign(cfg["mp_campaign"].str())
, active_mods(utils::split(cfg["active_mods"], ','))
, side_users(utils::map_split(cfg["side_users"]))
, show_connect(cfg["show_connect"].to_bool(true))
, num_turns(cfg["mp_num_turns"])
, village_gold(cfg["mp_village_gold"])
, village_support(cfg["mp_village_support"])
Expand Down Expand Up @@ -115,7 +113,6 @@ config mp_game_settings::to_config() const
cfg["mp_campaign"] = mp_campaign;
cfg["active_mods"] = utils::join(active_mods, ",");
cfg["side_users"] = utils::join_map(side_users);
cfg["show_connect"] = show_connect;
cfg["experience_modifier"] = xp_modifier;
cfg["mp_countdown"] = mp_countdown;
cfg["mp_countdown_init_time"] = mp_countdown_init_time;
Expand Down
2 changes: 0 additions & 2 deletions src/mp_game_settings.hpp
Expand Up @@ -43,8 +43,6 @@ struct mp_game_settings
std::vector<std::string> active_mods;
std::map<std::string, std::string> side_users;

bool show_connect;

int num_turns;
int village_gold;
int village_support;
Expand Down
2 changes: 0 additions & 2 deletions src/savegame.cpp
Expand Up @@ -776,8 +776,6 @@ static void convert_old_saves_1_13_0(config& cfg)
if(!cfg.has_child("multiplayer")) {
cfg.add_child("multiplayer", config {
"mp_era", "era_blank",
"show_connect", false,
"show_configure", false,
"mp_use_map_settings", true,
});
}
Expand Down

0 comments on commit 2cbba7e

Please sign in to comment.