Changed the debug messages in [move_units_fake] handler...

...so that they need --log-debug=engine (used in most of the other
handlers) so that it doesn't output messages which are useless for the
wml author just because debug mode is on. (part #1 of bug #16906)
This commit is contained in:
Anonymissimus 2010-10-20 20:30:43 +00:00
parent 46b040dc71
commit 472c607c71

View file

@ -1048,7 +1048,7 @@ WML_HANDLER_FUNCTION(move_unit_fake, /*event_info*/, cfg)
WML_HANDLER_FUNCTION(move_units_fake, /*event_info*/, cfg)
{
LOG_WML << "Processing [move_units_fake]\n";
LOG_NG << "Processing [move_units_fake]\n";
const vconfig::child_list unit_cfgs = cfg.get_children("fake_unit");
size_t num_units = unit_cfgs.size();
@ -1057,7 +1057,7 @@ WML_HANDLER_FUNCTION(move_units_fake, /*event_info*/, cfg)
paths.reserve(num_units);
game_display* disp = game_display::get_singleton();
LOG_WML << "Moving " << num_units << " units\n";
LOG_NG << "Moving " << num_units << " units\n";
size_t longest_path = 0;
@ -1070,22 +1070,22 @@ WML_HANDLER_FUNCTION(move_units_fake, /*event_info*/, cfg)
if(skip_steps > 0)
paths.back().insert(paths.back().begin(), skip_steps, paths.back().front());
longest_path = std::max(longest_path, paths.back().size());
DBG_WML << "Path " << paths.size() - 1 << " has length " << paths.back().size() << '\n';
DBG_NG << "Path " << paths.size() - 1 << " has length " << paths.back().size() << '\n';
units.back().set_location(paths.back().front());
disp->place_temporary_unit(&units.back());
}
LOG_WML << "Units placed, longest path is " << longest_path << " long\n";
LOG_NG << "Units placed, longest path is " << longest_path << " long\n";
std::vector<map_location> path_step(2);
path_step.resize(2);
for(size_t step = 1; step < longest_path; ++step) {
DBG_WML << "Doing step " << step << "...\n";
DBG_NG << "Doing step " << step << "...\n";
for(size_t un = 0; un < num_units; ++un) {
if(step >= paths[un].size() || paths[un][step - 1] == paths[un][step])
continue;
DBG_WML << "Moving unit " << un << ", doing step " << step << '\n';
DBG_NG << "Moving unit " << un << ", doing step " << step << '\n';
path_step[0] = paths[un][step - 1];
path_step[1] = paths[un][step];
unit_display::move_unit(path_step, units[un], *resources::teams);
@ -1094,12 +1094,12 @@ WML_HANDLER_FUNCTION(move_units_fake, /*event_info*/, cfg)
}
}
LOG_WML << "Units moved\n";
LOG_NG << "Units moved\n";
foreach(unit& u, units)
disp->remove_temporary_unit(&u);
LOG_WML << "Units removed\n";
LOG_NG << "Units removed\n";
}
WML_HANDLER_FUNCTION(set_variable, /*event_info*/, cfg)