mirror of
https://github.com/minetest/minetest.git
synced 2024-11-10 01:33:46 +01:00
Add support back for resolving group names in NodeResolver
This commit is contained in:
parent
f12118c38b
commit
c6df2bc42c
@ -1356,6 +1356,7 @@ bool CNodeDefManager::getIdsFromResolveInfo(NodeResolveInfo *nri,
|
||||
std::string name = nri->nodenames.front();
|
||||
nri->nodenames.pop_front();
|
||||
|
||||
if (name.substr(0,6) != "group:") {
|
||||
if (getId(name, c)) {
|
||||
result.push_back(c);
|
||||
} else if (listinfo.all_required) {
|
||||
@ -1364,6 +1365,13 @@ bool CNodeDefManager::getIdsFromResolveInfo(NodeResolveInfo *nri,
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
return success;
|
||||
|
Loading…
Reference in New Issue
Block a user