fix apply_to=overlay effect
previously [unit] overlays= would overwrite it, even when no overlays= is given.
This commit is contained in:
parent
eb65c9b2ce
commit
e71033374c
1 changed files with 5 additions and 3 deletions
|
@ -511,9 +511,11 @@ void unit::init(const config& cfg, bool use_traits, const vconfig* vcfg)
|
|||
// Apply the unit type's data to this unit.
|
||||
advance_to(*type_, use_traits);
|
||||
|
||||
overlays_ = utils::parenthetical_split(cfg["overlays"], ',');
|
||||
if(overlays_.size() == 1 && overlays_.front().empty()) {
|
||||
overlays_.clear();
|
||||
if(const config::attribute_value* v = cfg.get("overlays")) {
|
||||
overlays_ = utils::parenthetical_split(v->str(), ',');
|
||||
if(overlays_.size() == 1 && overlays_.front().empty()) {
|
||||
overlays_.clear();
|
||||
}
|
||||
}
|
||||
|
||||
if(const config& variables = cfg.child("variables")) {
|
||||
|
|
Loading…
Add table
Reference in a new issue