mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-26 18:21:04 +00:00
Change mg_flags for lua defiend mapgens
This commit is contained in:
parent
0275ab9f73
commit
63282704dc
4 changed files with 68 additions and 36 deletions
|
@ -147,12 +147,12 @@ bool parseModContents(ModSpec &spec)
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (info.exists("mapgen_flags")) {
|
||||
std::string dep = info.get("mapgen_flags");
|
||||
if (info.exists("mg_flags")) {
|
||||
std::string dep = info.get("mg_flags");
|
||||
dep.erase(std::remove_if(dep.begin(), dep.end(),
|
||||
static_cast<int (*)(int)>(&std::isspace)), dep.end());
|
||||
for (const auto &flag : str_split(dep, ',')) {
|
||||
spec.mapgen_flags.insert(flag);
|
||||
spec.mg_flags.insert(flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue