Skip to content

Commit

Permalink
FLG Manager: sort faction choices alphabetically (FR #21458)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Dec 11, 2016
1 parent 5fdb73b commit cf412fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game_initialization/flg_manager.cpp
Expand Up @@ -413,6 +413,11 @@ void flg_manager::update_choosable_factions()
choosable_factions_.push_back(faction);
}
}

// Sort alphabetically, but with the 'random' option always first
std::sort(choosable_factions_.begin() + 1, choosable_factions_.end(), [](const config* c1, const config* c2) {
return translation::compare((*c1)["name"].str(), (*c2)["name"].str()) < 0;
});
}

void flg_manager::update_choosable_leaders()
Expand Down

0 comments on commit cf412fc

Please sign in to comment.