AI configuration: invert mp_rank based ordering
This is supposed to be equivalent to the campaign rank, so it should be in ascending order.
This commit is contained in:
parent
650a780603
commit
4d43b218ee
6 changed files with 8 additions and 8 deletions
|
@ -8,7 +8,7 @@
|
|||
id=ai_default_rca
|
||||
description=_"Multiplayer_AI^Default AI (RCA)" # wmllint: no spellcheck
|
||||
# RCA := Register Candidate Action; more info at https://forums.wesnoth.org/viewtopic.php?p=419625#p419625
|
||||
mp_rank=1010
|
||||
mp_rank=1000
|
||||
[stage]
|
||||
id=main_loop
|
||||
name=ai_default_rca::candidate_action_evaluation_loop
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
[ai]
|
||||
id=experimental_ai
|
||||
description=_"Multiplayer_AI^Experimental AI" # wmllint: no spellcheck
|
||||
mp_rank=1000
|
||||
mp_rank=1010
|
||||
{EXPERIMENTAL_AI}
|
||||
[/ai]
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
id=ai_default_rca_alternate_recruiting
|
||||
description=_"Multiplayer_AI^Dev AI: Default AI (RCA) with Alternate Recruiting" # wmllint: no spellcheck
|
||||
# RCA := Register Candidate Action; more info at https://forums.wesnoth.org/viewtopic.php?p=419625#p419625
|
||||
mp_rank=100
|
||||
mp_rank=100000
|
||||
[stage]
|
||||
id=main_loop
|
||||
name=ai_default_rca::candidate_action_evaluation_loop
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
[ai]
|
||||
id=formula_ai # id is needed to uniquely identify a MP AI, it is not needed in the scenario AI
|
||||
description=_"Multiplayer_AI^Dev AI: Default + Experimental Recruitment (Formula AI)" # wmllint: no spellcheck
|
||||
mp_rank=100
|
||||
mp_rank=100000
|
||||
# this description is, again, needed for MP AI (it shows in AI list under this description
|
||||
|
||||
[stage]
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
[ai]
|
||||
id=formula_ai_poisoning
|
||||
description=_"Multiplayer_AI^Dev AI: Default + Poisoning (Formula AI)" # wmllint: no spellcheck
|
||||
mp_rank=100
|
||||
mp_rank=100000
|
||||
[stage]
|
||||
id=main_loop
|
||||
name=ai_default_rca::candidate_action_evaluation_loop
|
||||
|
|
|
@ -69,7 +69,7 @@ void configuration::init(const config &game_config)
|
|||
|
||||
description desc;
|
||||
desc.id=id;
|
||||
desc.mp_rank=ai_configuration["mp_rank"].to_int(0);
|
||||
desc.mp_rank=ai_configuration["mp_rank"].to_int(std::numeric_limits<int>::max());
|
||||
desc.text = ai_configuration["description"].t_str();
|
||||
desc.cfg=ai_configuration;
|
||||
|
||||
|
@ -96,7 +96,7 @@ void extract_ai_configurations(std::map<std::string, description> &storage, cons
|
|||
description desc;
|
||||
desc.id=id;
|
||||
desc.text = ai_configuration["description"].t_str();
|
||||
desc.mp_rank = ai_configuration["mp_rank"].to_int(0);
|
||||
desc.mp_rank = ai_configuration["mp_rank"].to_int(std::numeric_limits<int>::max());
|
||||
desc.cfg=ai_configuration;
|
||||
|
||||
storage.emplace(id, desc);
|
||||
|
@ -148,7 +148,7 @@ std::vector<description*> configuration::get_available_ais()
|
|||
// Sort by mp_rank. For same mp_rank, keep alphabetical order.
|
||||
std::stable_sort(ais_list.begin(), ais_list.end(),
|
||||
[](const description* a, const description* b) {
|
||||
return a->mp_rank > b->mp_rank;
|
||||
return a->mp_rank < b->mp_rank;
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue