Remove some deprecated colour keys.
This commit is contained in:
parent
a9bb8f8d0d
commit
217dec545f
3 changed files with 6 additions and 13 deletions
|
@ -235,11 +235,7 @@ void write_players(game_state& gamestate, config& cfg, const bool use_snapshot,
|
||||||
(*scenario_side)["name"] = carryover_side["name"];
|
(*scenario_side)["name"] = carryover_side["name"];
|
||||||
(*scenario_side)["current_player"] = carryover_side["current_player"];
|
(*scenario_side)["current_player"] = carryover_side["current_player"];
|
||||||
|
|
||||||
///@deprecated 1.9.2 'colour' in [side]
|
(*scenario_side)["color"] = carryover_side["color"];
|
||||||
const std::string colour_error = "Usage of 'colour' in [side] is deprecated, support will be removed in 1.9.2.\n";
|
|
||||||
(*scenario_side)["color"] = carryover_side.get_old_attribute("color","colour",colour_error);
|
|
||||||
///@deprecated 1.9.2 'colour' also written in [side]
|
|
||||||
(*scenario_side)["colour"] = (*scenario_side)["color"];
|
|
||||||
|
|
||||||
//add recallable units
|
//add recallable units
|
||||||
foreach (const config &u, carryover_side.child_range("unit")) {
|
foreach (const config &u, carryover_side.child_range("unit")) {
|
||||||
|
|
|
@ -308,9 +308,7 @@ void terrain_label::read(const config &cfg)
|
||||||
loc_ = map_location(cfg, &vs);
|
loc_ = map_location(cfg, &vs);
|
||||||
SDL_Color color = font::LABEL_COLOR;
|
SDL_Color color = font::LABEL_COLOR;
|
||||||
|
|
||||||
///@deprecated 1.9.2 'colour' in [label]
|
std::string tmp_color = cfg["color"];
|
||||||
const std::string colour_error = "Usage of 'colour' in [label] is deprecated, support will be removed in 1.9.2.\n";
|
|
||||||
std::string tmp_color = cfg.get_old_attribute("color","colour", colour_error);
|
|
||||||
|
|
||||||
text_ = cfg["text"];
|
text_ = cfg["text"];
|
||||||
team_name_ = cfg["team_name"].str();
|
team_name_ = cfg["team_name"].str();
|
||||||
|
|
|
@ -110,12 +110,11 @@ void team::team_info::read(const config &cfg)
|
||||||
music = cfg["music"].str();
|
music = cfg["music"].str();
|
||||||
side = cfg["side"].to_int(1);
|
side = cfg["side"].to_int(1);
|
||||||
|
|
||||||
///@deprecated 1.9.2 Usage of 'colour' in [side]
|
if(cfg.has_attribute("color")) {
|
||||||
const std::string colour_error = "Usage of 'colour' in [side] is deprecated, support will be removed in 1.9.2.\n";
|
color = cfg["color"].str();
|
||||||
if(cfg.has_old_attribute("color","colour",colour_error))
|
} else {
|
||||||
color = cfg.get_old_attribute("color","colour").str();
|
|
||||||
else
|
|
||||||
color = cfg["side"].str();
|
color = cfg["side"].str();
|
||||||
|
}
|
||||||
|
|
||||||
// If arel starting new scenario overide settings from [ai] tags
|
// If arel starting new scenario overide settings from [ai] tags
|
||||||
if (!user_team_name.translatable())
|
if (!user_team_name.translatable())
|
||||||
|
|
Loading…
Add table
Reference in a new issue