Some C++ changes that go with using id= in SingleUnitWML.

They don't solve the recall problem, alas.
This commit is contained in:
Eric S. Raymond 2008-03-18 21:28:39 +00:00
parent 1c5348cdb9
commit bed5efe49b
3 changed files with 4 additions and 4 deletions

View File

@ -386,7 +386,7 @@ namespace dfool {
temp["y"] = ys.str();
units_[i].write(temp_unit);
temp.add_child("unit",temp_unit);
// std::cout<<"ai write: "<<temp_unit["description"]<<"\n";
// std::cout<<"ai write: "<<temp_unit["id"]<<"\n";
}
void unit_memory::known_map(unit_map& u, size_t turn){

View File

@ -36,7 +36,7 @@ std::string get_unique_saveid(const config& cfg, std::set<std::string>& seen_sav
std::string save_id = cfg["save_id"];
if(save_id.empty()) {
save_id=cfg["description"];
save_id=cfg["id"];
}
if(save_id.empty()) {

View File

@ -540,7 +540,7 @@ static void write_player(const player_info& player, config& cfg)
config new_cfg;
i->write(new_cfg);
cfg.add_child("unit",new_cfg);
DBG_NG << "added unit '" << new_cfg["description"] << "' to player '" << player.name << "'\n";
DBG_NG << "added unit '" << new_cfg["id"] << "' to player '" << player.name << "'\n";
}
std::stringstream can_recruit;
@ -569,7 +569,7 @@ static void write_player(config_writer &out, const player_info& player)
config new_cfg;
i->write(new_cfg);
out.write_child("unit",new_cfg);
DBG_NG << "added unit '" << new_cfg["description"] << "' to player '" << player.name << "'\n";
DBG_NG << "added unit '" << new_cfg["id"] << "' to player '" << player.name << "'\n";
}
std::stringstream can_recruit;