Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool enter_configure_mode(CVideo& video, const config& game_config, saved_game& state, ng::create_engine& create_eng, bool local_players_only)
- {
- std::set<std::string> activemods(create_eng.active_mods().begin(), create_eng.active_mods().end());
- if(activemods.empty()) {
- return true;
- }
- const bool mods_have_options = std::find_if_not(activemods.begin(), activemods.end(), [&create_eng](const std::string& mod) {
- return (*create_eng.get_extra_by_id(ng::create_engine::MP_EXTRA::MOD, mod)->cfg).has_child("options");
- }) != activemods.end();
- if(mods_have_options) {
- gui2::tsp_options_configure dlg(create_eng);
- dlg.show(video);
- if(dlg.get_retval() != gui2::twindow::OK) {
- return false;
- }
- }
- create_eng.prepare_for_new_level();
- create_eng.get_parameters();
- enter_connect_mode(video, game_config, state, local_players_only);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment