removed gamestatus usage, where it is not needed

This commit is contained in:
Iurii Chernyi 2009-06-10 14:22:40 +00:00
parent 55659c7577
commit acb6f7b734
3 changed files with 5 additions and 5 deletions

View File

@ -343,7 +343,7 @@ bool ai_default::recruit_usage(const std::string& usage)
//FIXME: This message should be suppressed when WML author
//chooses the default recruitment pattern.
const std::string warning = "At difficulty level " +
state_.sog().classification().difficulty + ", trying to recruit a:" +
get_info().game_state_.classification().difficulty + ", trying to recruit a:" +
usage + " but no unit of that type (usage=) is"
" available. Check the recruit and [ai]"
" recruitment_pattern keys for team '" +

View File

@ -156,8 +156,8 @@ static lg::log_domain log_ai("ai/dfool");
std::string type = com["type"];
std::string e = com["test"];
std::map<std::string, evaluator*> function_map;
arithmetic_evaluator eval(get_info().state.sog(),&function_map);
distance_evaluator dist(get_info().state.sog(),&function_map);
arithmetic_evaluator eval(get_info().game_state_,&function_map);
distance_evaluator dist(get_info().game_state_,&function_map);
function_map["eval"]=&eval;
function_map["distance"]=&dist;
LOG_AI << "eval: " << type << ':' << e << " = " << eval.value(e) << '\n';

View File

@ -2277,7 +2277,7 @@ variant formula_ai::get_value(const std::string& key) const
} else if(key == "my_side")
{
return variant(new team_callable((*get_info().state.teams)[get_side()-1]));
return variant(new team_callable((get_info().teams)[get_side()-1]));
} else if(key == "my_side_number")
{
@ -2286,7 +2286,7 @@ variant formula_ai::get_value(const std::string& key) const
} else if(key == "teams")
{
std::vector<variant> vars;
for(std::vector<team>::const_iterator i = get_info().state.teams->begin(); i != get_info().state.teams->end(); ++i) {
for(std::vector<team>::const_iterator i = get_info().teams.begin(); i != get_info().teams.end(); ++i) {
vars.push_back(variant(new team_callable(*i)));
}
return variant(&vars);