Prevented creation of blank attributes.
Removed 'placement' from [unit] 'to_variable' since the attribute makes sense for [unit] itself only. Since it doesn't support variables, it is pointless.
This commit is contained in:
parent
28678cbee7
commit
6525cab0cb
1 changed files with 2 additions and 3 deletions
|
@ -1630,9 +1630,8 @@ WML_HANDLER_FUNCTION(unit, /*event_info*/, cfg)
|
|||
config &var = resources::state_of_game->get_variable_cfg(to_variable);
|
||||
var.clear();
|
||||
new_unit.write(var);
|
||||
var["placement"] = parsed_cfg["placement"];
|
||||
var["x"] = parsed_cfg["x"];
|
||||
var["y"] = parsed_cfg["y"];
|
||||
if (const config::attribute_value *v = parsed_cfg.get("x")) var["x"] = *v;
|
||||
if (const config::attribute_value *v = parsed_cfg.get("y")) var["y"] = *v;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue