rework of 2009-08-15T19:59:42Z!terraninfo@terraninfo.net - set human leader names to player names,
...AI leader names to AI descriptions
This commit is contained in:
parent
1d211ce9f6
commit
d353870ad3
8 changed files with 9 additions and 20 deletions
|
@ -2,7 +2,6 @@
|
|||
[multiplayer_side]
|
||||
id=Drakes
|
||||
name= _"Drakes"
|
||||
rename_leader_to_player = "yes"
|
||||
image="units/drakes/flare.png"
|
||||
{MAGENTA_IS_THE_TEAM_COLOR}
|
||||
type=Drake Flare
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
[multiplayer_side]
|
||||
id=Knalgan Alliance
|
||||
name=_"Knalgan Alliance"
|
||||
rename_leader_to_player = "yes"
|
||||
image="units/dwarves/steelclad.png"
|
||||
{MAGENTA_IS_THE_TEAM_COLOR}
|
||||
type=Dwarvish Steelclad
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
[multiplayer_side]
|
||||
id=Loyalists
|
||||
name= _"Loyalists"
|
||||
rename_leader_to_player = "yes"
|
||||
image="units/human-loyalists/lieutenant.png"
|
||||
{MAGENTA_IS_THE_TEAM_COLOR}
|
||||
type=Lieutenant
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
[multiplayer_side]
|
||||
id=Northerners
|
||||
name= _"Northerners"
|
||||
rename_leader_to_player = "yes"
|
||||
image="units/orcs/warrior.png"
|
||||
{MAGENTA_IS_THE_TEAM_COLOR}
|
||||
type=Orcish Warrior
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
[multiplayer_side]
|
||||
id=Rebels
|
||||
name= _"Rebels"
|
||||
rename_leader_to_player = "yes"
|
||||
image="units/elves-wood/captain.png"
|
||||
{MAGENTA_IS_THE_TEAM_COLOR}
|
||||
type=Elvish Captain
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
[multiplayer_side]
|
||||
id=Undead
|
||||
name= _"Undead"
|
||||
rename_leader_to_player = "yes"
|
||||
image="units/undead-necromancers/dark-sorcerer.png"
|
||||
{MAGENTA_IS_THE_TEAM_COLOR}
|
||||
type=Dark Sorcerer
|
||||
|
|
|
@ -631,6 +631,7 @@ config connect::side::get_config() const
|
|||
if(enabled_ && !parent_->era_sides_.empty()) {
|
||||
// Merge the faction data to res
|
||||
res.append(*(parent_->era_sides_[faction_]));
|
||||
res["faction_name"] = res["name"];
|
||||
}
|
||||
res.append(cfg_);
|
||||
if (cfg_.get_attribute("side").empty()
|
||||
|
@ -662,9 +663,13 @@ config connect::side::get_config() const
|
|||
}
|
||||
{
|
||||
res["id"] = res["save_id"];
|
||||
res.add_child("ai",ai::configuration::get_ai_config_for(ai_algorithm_));
|
||||
const config &ai_cfg = ai::configuration::get_ai_config_for(ai_algorithm_);
|
||||
res.add_child("ai",ai_cfg);
|
||||
utils::string_map symbols;
|
||||
symbols["playername"] = ai_cfg["description"];
|
||||
symbols["side"] = res["side"].str();
|
||||
description = vgettext("$playername $side",symbols).c_str();
|
||||
}
|
||||
description = N_("Computer player");
|
||||
break;
|
||||
case CNTR_EMPTY:
|
||||
description = N_("(Empty slot)");
|
||||
|
@ -693,6 +698,8 @@ config connect::side::get_config() const
|
|||
res["user_description"] = id_;
|
||||
}
|
||||
|
||||
res["name"] = res["user_description"];
|
||||
|
||||
if(enabled_) {
|
||||
if (leader_.empty()) {
|
||||
res["type"] = llm_.get_leader();
|
||||
|
|
|
@ -223,18 +223,6 @@ LEVEL_RESULT play_game(display& disp, game_state& gamestate, const config& game_
|
|||
preload_lua_tags(game_config, gamestate.starting_pos);
|
||||
starting_pos = gamestate.starting_pos;
|
||||
scenario = &starting_pos;
|
||||
foreach (config &side, const_cast<config *>(scenario)->child_range("side"))
|
||||
{
|
||||
if (utils::string_bool(side["rename_leader_to_player"],false)) {
|
||||
if (!side["current_player"].empty()) {
|
||||
//human
|
||||
side["name"] = side["current_player"];
|
||||
} else {
|
||||
//AI
|
||||
side["name"] = side["save_id"];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//reload of the scenario, as starting_pos contains carryover information only
|
||||
LOG_G << "loading scenario: '" << gamestate.classification().scenario << "'\n";
|
||||
|
|
Loading…
Add table
Reference in a new issue