mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 18:01:14 +00:00
Set leader names to player names in MP...
...(can be overridden on per-faction/per-scenario basis)
This commit is contained in:
parent
435280f3eb
commit
0eb769dc3b
@ -2,6 +2,7 @@
|
||||
[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,6 +2,7 @@
|
||||
[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,6 +2,7 @@
|
||||
[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,6 +2,7 @@
|
||||
[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,6 +2,7 @@
|
||||
[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,6 +2,7 @@
|
||||
[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
|
||||
|
@ -223,6 +223,18 @@ 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…
x
Reference in New Issue
Block a user