mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-20 02:10:15 +00:00
Some C++ changes that go with using id= in SingleUnitWML.
They don't solve the recall problem, alas.
This commit is contained in:
parent
1c5348cdb9
commit
bed5efe49b
@ -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){
|
||||
|
@ -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()) {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user