Replace any "colour" WML key by "color", "colour" is still supported.
This commit is contained in:
parent
ffe6d898d6
commit
0684320813
8 changed files with 20 additions and 20 deletions
|
@ -999,7 +999,7 @@ WML_HANDLER_FUNCTION(store_side, /*event_info*/, cfg)
|
|||
state_of_game->get_variable(var_name+".name") = teams[team_index].name();
|
||||
state_of_game->get_variable(var_name+".team_name") = teams[team_index].team_name();
|
||||
state_of_game->get_variable(var_name+".user_team_name") = teams[team_index].user_team_name();
|
||||
state_of_game->get_variable(var_name+".colour") = teams[team_index].map_colour_to();
|
||||
state_of_game->get_variable(var_name+".color") = teams[team_index].map_colour_to();
|
||||
|
||||
state_of_game->get_variable(var_name+".gold") = str_cast(teams[team_index].gold());
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ void write_players(game_state& gamestate, config& cfg, const bool use_snapshot,
|
|||
}
|
||||
(*scenario_side)["name"] = carryover_side["name"];
|
||||
(*scenario_side)["current_player"] = carryover_side["current_player"];
|
||||
(*scenario_side)["colour"] = carryover_side["colour"];
|
||||
(*scenario_side)["color"] = carryover_side.get_old_attribute("color","colour");
|
||||
//add recallable units
|
||||
foreach (const config &u, carryover_side.child_range("unit")) {
|
||||
scenario_side->add_child("unit", u);
|
||||
|
@ -904,7 +904,7 @@ protected:
|
|||
"current_player", "countdown_time", "action_bonus_count",
|
||||
"flag", "flag_icon", "objectives", "objectives_changed",
|
||||
"disallow_observers", "allow_player", "no_leader",
|
||||
"hidden", "music", "colour", "ai_config", "gold",
|
||||
"hidden", "music", "color", "ai_config", "gold",
|
||||
"start_gold", "team_rgb", "village_gold", "recall_cost",
|
||||
"controller", "persistent", "share_view",
|
||||
"share_maps", "recruit", "fog", "shroud", "shroud_data",
|
||||
|
|
|
@ -221,7 +221,7 @@ tline::tline(const config& cfg)
|
|||
, y1_(cfg["y1"])
|
||||
, x2_(cfg["x2"])
|
||||
, y2_(cfg["y2"])
|
||||
, colour_(decode_colour(cfg["colour"]))
|
||||
, colour_(decode_colour(cfg.get_old_attribute("color","colour")))
|
||||
, thickness_(cfg["thickness"])
|
||||
{
|
||||
/*WIKI
|
||||
|
@ -1038,7 +1038,7 @@ ttext::ttext(const config& cfg)
|
|||
, font_size_(cfg["font_size"])
|
||||
, font_style_(decode_font_style(cfg["font_style"]))
|
||||
, text_alignment_(cfg["text_alignment"])
|
||||
, colour_(decode_colour(cfg["colour"]))
|
||||
, colour_(decode_colour(cfg.get_old_attribute("color","colour")))
|
||||
, text_(cfg["text"])
|
||||
, text_markup_(cfg["text_markup"], false)
|
||||
, maximum_width_(cfg["maximum_width"], -1)
|
||||
|
|
|
@ -318,7 +318,7 @@ void terrain_label::read(const config &cfg)
|
|||
const variable_set &vs = *resources::state_of_game;
|
||||
loc_ = map_location(cfg, &vs);
|
||||
SDL_Color colour = font::LABEL_COLOR;
|
||||
std::string tmp_colour = cfg["colour"];
|
||||
std::string tmp_colour = cfg.get_old_attribute("color","colour");
|
||||
|
||||
text_ = cfg["text"];
|
||||
team_name_ = cfg["team_name"].str();
|
||||
|
@ -349,7 +349,7 @@ void terrain_label::write(config& cfg) const
|
|||
loc_.write(cfg);
|
||||
cfg["text"] = text();
|
||||
cfg["team_name"] = (this->team_name());
|
||||
cfg["colour"] = cfg_colour();
|
||||
cfg["color"] = cfg_colour();
|
||||
cfg["visible_in_fog"] = visible_in_fog_;
|
||||
cfg["visible_in_shroud"] = visible_in_shroud_;
|
||||
cfg["immutable"] = immutable_;
|
||||
|
|
|
@ -160,8 +160,8 @@ connect::side::side(connect& parent, const config& cfg, int index) :
|
|||
} else {
|
||||
team_ = itor - parent_->team_names_.begin();
|
||||
}
|
||||
if (cfg.has_attribute("colour")) {
|
||||
colour_ = game_config::color_info(cfg["colour"]).index() - 1;
|
||||
if (cfg.has_old_attribute("color","colour")) {
|
||||
colour_ = game_config::color_info(cfg.get_old_attribute("color","colour")).index() - 1;
|
||||
}
|
||||
llm_.set_colour(colour_);
|
||||
|
||||
|
@ -730,7 +730,7 @@ config connect::side::get_config() const
|
|||
res["team_name"] = parent_->team_names_[team_];
|
||||
res["user_team_name"] = parent_->user_team_names_[team_];
|
||||
res["allow_player"] = allow_player_;
|
||||
res["colour"] = colour_ + 1;
|
||||
res["color"] = colour_ + 1;
|
||||
res["gold"] = gold_;
|
||||
res["income"] = income_;
|
||||
|
||||
|
@ -751,7 +751,7 @@ config connect::side::get_config() const
|
|||
if(parent_->params_.use_map_settings && enabled_) {
|
||||
config trimmed = cfg_;
|
||||
static char const *attrs[] = { "side", "controller", "id",
|
||||
"team_name", "user_team_name", "colour", "gold",
|
||||
"team_name", "user_team_name", "color", "gold",
|
||||
"income", "allow_changes" };
|
||||
foreach (const char *attr, attrs) {
|
||||
trimmed.remove_attribute(attr);
|
||||
|
|
|
@ -266,7 +266,7 @@ void wait::join_game(bool observe)
|
|||
}
|
||||
|
||||
int color = side_num;
|
||||
const std::string color_str = (*side_choice)["colour"];
|
||||
const std::string color_str = (*side_choice).get_old_attribute("color","colour");
|
||||
if (!color_str.empty())
|
||||
color = game_config::color_info(color_str).index() - 1;
|
||||
|
||||
|
@ -466,7 +466,7 @@ void wait::generate_menu()
|
|||
#ifdef LOW_MEM
|
||||
leader_image = utg.image();
|
||||
#else
|
||||
std::string RCcolor = sd["colour"];
|
||||
std::string RCcolor = sd.get_old_attribute("color","colour");
|
||||
if (RCcolor.empty())
|
||||
RCcolor = sd["side"].str();
|
||||
leader_image = utg.image() + std::string("~RC(") + std::string(utg.flag_rgb() + ">" + RCcolor + ")");
|
||||
|
@ -510,10 +510,10 @@ void wait::generate_menu()
|
|||
}
|
||||
|
||||
str << COLUMN_SEPARATOR << t_string::from_serialized(sd["user_team_name"].str());
|
||||
int disp_color = sd["colour"];
|
||||
if(!sd["colour"].empty()) {
|
||||
int disp_color = sd.get_old_attribute("color","colour");
|
||||
if(!sd.get_old_attribute("color","colour").empty()) {
|
||||
try {
|
||||
disp_color = game_config::color_info(sd["colour"]).index();
|
||||
disp_color = game_config::color_info(sd.get_old_attribute("color","colour")).index();
|
||||
} catch(config::error&) {
|
||||
//ignore
|
||||
}
|
||||
|
|
|
@ -910,7 +910,7 @@ void playsingle_controller::store_gold(bool obs)
|
|||
if ((*side_it)["save_id"] == t.save_id()) {
|
||||
(*side_it)["gold"] = str_cast<int>(carryover_gold);
|
||||
(*side_it)["gold_add"] = end_level.carryover_add;
|
||||
(*side_it)["colour"] = t.colour();
|
||||
(*side_it)["color"] = t.colour();
|
||||
(*side_it)["current_player"] = t.current_player();
|
||||
(*side_it)["name"] = t.name();
|
||||
break;
|
||||
|
@ -924,7 +924,7 @@ void playsingle_controller::store_gold(bool obs)
|
|||
new_side["save_id"] = t.save_id();
|
||||
new_side["gold"] = str_cast<int>(carryover_gold);
|
||||
new_side["gold_add"] = end_level.carryover_add;
|
||||
new_side["colour"] = t.colour();
|
||||
new_side["color"] = t.colour();
|
||||
new_side["current_player"] = t.current_player();
|
||||
new_side["name"] = t.name();
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ team::team_info::team_info(const config& cfg) :
|
|||
no_leader(cfg["no_leader"].to_bool()),
|
||||
hidden(cfg["hidden"].to_bool()),
|
||||
music(cfg["music"]),
|
||||
colour(cfg.has_attribute("colour") ? cfg["colour"] : cfg["side"]),
|
||||
colour(cfg.has_old_attribute("color","colour") ? cfg.get_old_attribute("color","colour") : cfg["side"]),
|
||||
side(cfg["side"].to_int(1)),
|
||||
persistent(false)
|
||||
{
|
||||
|
@ -217,7 +217,7 @@ void team::team_info::write(config& cfg) const
|
|||
if(music.empty() == false)
|
||||
cfg["music"] = music;
|
||||
|
||||
cfg["colour"] = str_cast(colour);
|
||||
cfg["color"] = str_cast(colour);
|
||||
|
||||
cfg["persistent"] = persistent;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue