mirror of
https://github.com/minetest/minetest.git
synced 2025-02-19 19:33:44 +01:00
Add support back for resolving group names in NodeResolver
This commit is contained in:
@ -1356,13 +1356,21 @@ bool CNodeDefManager::getIdsFromResolveInfo(NodeResolveInfo *nri,
|
|||||||
std::string name = nri->nodenames.front();
|
std::string name = nri->nodenames.front();
|
||||||
nri->nodenames.pop_front();
|
nri->nodenames.pop_front();
|
||||||
|
|
||||||
if (getId(name, c)) {
|
if (name.substr(0,6) != "group:") {
|
||||||
result.push_back(c);
|
if (getId(name, c)) {
|
||||||
} else if (listinfo.all_required) {
|
result.push_back(c);
|
||||||
errorstream << "Resolver: Failed to resolve node name '" << name
|
} else if (listinfo.all_required) {
|
||||||
<< "'." << std::endl;
|
errorstream << "Resolver: Failed to resolve node name '" << name
|
||||||
result.push_back(listinfo.c_fallback);
|
<< "'." << std::endl;
|
||||||
success = false;
|
result.push_back(listinfo.c_fallback);
|
||||||
|
success = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
std::set<content_t> cids;
|
||||||
|
std::set<content_t>::iterator it;
|
||||||
|
getIds(name, cids);
|
||||||
|
for (it = cids.begin(); it != cids.end(); ++it)
|
||||||
|
result.push_back(*it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user