Added inline comment. Diff comments:
> > === modified file 'src/ui_fsmenu/launch_spg.cc' > --- src/ui_fsmenu/launch_spg.cc 2018-07-07 20:22:12 +0000 > +++ src/ui_fsmenu/launch_spg.cc 2018-08-26 11:35:09 +0000 > @@ -283,7 +283,14 @@ > Widelands::PlayerNumber const nrplayers = map.get_nrplayers(); > for (uint8_t i = 0; i < nrplayers; ++i) { > settings_->set_player_name(i, map.get_scenario_player_name(i + > 1)); > - settings_->set_player_tribe(i, map.get_scenario_player_tribe(i > + 1)); > + const std::string playertribe = map.get_scenario_player_tribe(i > + 1); > + if (playertribe.empty()) { > + // Set tribe selection to random > + settings_->set_player_tribe(i, "", true); I would clean-up the interface of set_player_tribe() through-out the codebase to remove the flag for random_tribe and use the empty-string convention instead, then check for the string's emptiness inside set_player_tribe() . > + } else { > + // Set tribe selection from map > + settings_->set_player_tribe(i, playertribe); > + } > } > } > -- https://code.launchpad.net/~widelands-dev/widelands/bug-1783878_editor_random_map_tribe/+merge/352943 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1783878_editor_random_map_tribe. _______________________________________________ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp