mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-26 18:21:04 +00:00
working flags
This commit is contained in:
parent
060696be24
commit
8765654e46
5 changed files with 63 additions and 7 deletions
|
@ -148,13 +148,21 @@ bool parseModContents(ModSpec &spec)
|
|||
}
|
||||
} else {
|
||||
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, ',')) {
|
||||
std::string mg_flags = info.get("mg_flags");
|
||||
mg_flags.erase(std::remove_if(mg_flags.begin(), mg_flags.end(),
|
||||
static_cast<int (*)(int)>(&std::isspace)), mg_flags.end());
|
||||
for (const auto &flag : str_split(mg_flags, ',')) {
|
||||
spec.mg_flags.insert(flag);
|
||||
}
|
||||
}
|
||||
if (info.exists("lmg_flags")) {
|
||||
std::string lmg_flags = info.get("lmg_flags");
|
||||
lmg_flags.erase(std::remove_if(lmg_flags.begin(), lmg_flags.end(),
|
||||
static_cast<int (*)(int)>(&std::isspace)), lmg_flags.end());
|
||||
for (const auto &flag : str_split(lmg_flags, ',')) {
|
||||
spec.lmg_flags.insert(flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (info.exists("description"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue