remove name= attribute in [side]
this was only used in debug messages.
This commit is contained in:
parent
f329b1e431
commit
31ae13da1e
8 changed files with 5 additions and 21 deletions
|
@ -258,7 +258,7 @@ bool ai_default_recruitment_stage::recruit_usage(const std::string& usage)
|
|||
usage + " but no unit of that type (usage=) is"
|
||||
" available. Check the recruit and [ai]"
|
||||
" recruitment_pattern keys for team '" +
|
||||
current_team().name() + "' (" +
|
||||
current_team().current_player() + "' (" +
|
||||
lexical_cast<std::string>(get_side()) + ")"
|
||||
" against the usage key of the"
|
||||
" units in question! Removing invalid"
|
||||
|
|
|
@ -92,9 +92,8 @@ void ai_testing::log_game_start()
|
|||
for (std::vector<team>::const_iterator tm = resources::teams->begin(); tm != resources::teams->end(); ++tm) {
|
||||
int side = tm-resources::teams->begin()+1;
|
||||
LOG_AI_TESTING << "AI_IDENTIFIER"<<side<<": " << ai::manager::get_active_ai_identifier_for_side(side) <<std::endl;
|
||||
LOG_AI_TESTING << "TEAM"<<side<<": " << tm->name() << std::endl;
|
||||
LOG_AI_TESTING << "TEAM"<<side<<": " << tm->side() << std::endl;
|
||||
resources::recorder->add_log_data("ai_log","ai_id"+str_cast(side),ai::manager::get_active_ai_identifier_for_side(side));
|
||||
resources::recorder->add_log_data("ai_log","faction"+str_cast(side),tm->name());
|
||||
///@todo 1.9: add information about ai_config
|
||||
}
|
||||
LOG_AI_TESTING << "VERSION: " << game_config::revision << std::endl;
|
||||
|
|
|
@ -370,7 +370,7 @@ bool recruitment_phase::recruit_usage(const std::string& usage)
|
|||
usage + " but no unit of that type (usage=) is"
|
||||
" available. Check the recruit and [ai]"
|
||||
" recruitment_pattern keys for team '" +
|
||||
current_team().name() + "' (" +
|
||||
current_team().current_player() + "' (" +
|
||||
lexical_cast<std::string>(get_side()) + ")"
|
||||
" against the usage key of the"
|
||||
" units in question! Removing invalid"
|
||||
|
|
|
@ -205,7 +205,6 @@ CALLABLE_WRAPPER_FN(gold)
|
|||
CALLABLE_WRAPPER_FN(base_income)
|
||||
CALLABLE_WRAPPER_FN(village_gold)
|
||||
CALLABLE_WRAPPER_FN(village_support)
|
||||
CALLABLE_WRAPPER_FN(name)
|
||||
CALLABLE_WRAPPER_FN2(is_human, is_local_human)
|
||||
CALLABLE_WRAPPER_FN2(is_ai, is_local_ai)
|
||||
CALLABLE_WRAPPER_FN(is_network)
|
||||
|
|
|
@ -59,10 +59,7 @@ tlabel_settings::tlabel_settings(display_context& dc) : viewer(dc) {
|
|||
labels_display[label_cat_key] = "";
|
||||
continue;
|
||||
}
|
||||
std::string team_id = team.name();
|
||||
if(team_id.empty()) {
|
||||
team_id = team.current_player();
|
||||
}
|
||||
std::string team_id = team.current_player();
|
||||
if(team_id.empty()) {
|
||||
team_id = team.team_name();
|
||||
}
|
||||
|
|
|
@ -69,7 +69,6 @@ static int impl_side_get(lua_State *L)
|
|||
return_string_attrib("flag_icon", t.flag_icon());
|
||||
return_tstring_attrib("team_name", t.team_name());
|
||||
return_string_attrib("team_id", t.team_id());
|
||||
return_string_attrib("name", t.name());
|
||||
return_string_attrib("color", t.color());
|
||||
return_cstring_attrib("controller", t.controller().to_string().c_str());
|
||||
return_string_attrib("defeat_condition", t.defeat_condition().to_string());
|
||||
|
|
|
@ -75,7 +75,6 @@ const boost::container::flat_set<std::string> team::attributes = boost::assign::
|
|||
("disallow_shuffle")("description").convert_to_container<boost::container::flat_set<std::string> >();
|
||||
|
||||
team::team_info::team_info() :
|
||||
name(),
|
||||
gold(0),
|
||||
start_gold(0),
|
||||
income(0),
|
||||
|
@ -119,7 +118,6 @@ team::team_info::team_info() :
|
|||
|
||||
void team::team_info::read(const config &cfg)
|
||||
{
|
||||
name = cfg["name"].str();
|
||||
gold = cfg["gold"];
|
||||
income = cfg["income"];
|
||||
team_id = cfg["user_team_name"].blank() ? cfg["team_id"].str() : cfg["team_name"];
|
||||
|
@ -240,7 +238,6 @@ void team::team_info::write(config& cfg) const
|
|||
cfg["gold"] = gold;
|
||||
cfg["start_gold"] = start_gold;
|
||||
cfg["income"] = income;
|
||||
cfg["name"] = name;
|
||||
cfg["team_id"] = team_id;
|
||||
cfg["team_name"] = team_name;
|
||||
cfg["save_id"] = save_id;
|
||||
|
@ -341,7 +338,7 @@ void team::build(const config &cfg, const gamemap& map, int gold)
|
|||
if (map.is_village(loc)) {
|
||||
villages_.insert(loc);
|
||||
} else {
|
||||
WRN_NG << "[side] " << name() << " [village] points to a non-village location " << loc << std::endl;
|
||||
WRN_NG << "[side] " << current_player() << " [village] points to a non-village location " << loc << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,6 @@ private:
|
|||
team_info();
|
||||
void read(const config &cfg);
|
||||
void write(config& cfg) const;
|
||||
std::string name;
|
||||
int gold;
|
||||
int start_gold;
|
||||
int income;
|
||||
|
@ -232,13 +231,7 @@ public:
|
|||
int minimum_recruit_price() const;
|
||||
const std::string& last_recruit() const { return last_recruit_; }
|
||||
void last_recruit(const std::string & u_type) { last_recruit_ = u_type; }
|
||||
// TODO: This attribute is never used for user messages. (currently
|
||||
// current_player is used there). It's only used for debug messages
|
||||
// and it's accessible to wml via [store_side]. Do we really need it?
|
||||
const std::string& name() const
|
||||
{ return info_.name; }
|
||||
|
||||
void set_name(const std::string& name) { info_.name = name; }
|
||||
const std::string& save_id() const { return info_.save_id; }
|
||||
void set_save_id(const std::string& save_id) { info_.save_id = save_id; }
|
||||
const std::string& current_player() const { return info_.current_player; }
|
||||
|
|
Loading…
Add table
Reference in a new issue