mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Node resolver: Make error on fallback optional, disable for mapgen aliases
This commit is contained in:
parent
87ad4d8e7f
commit
0e554706ac
3 changed files with 19 additions and 17 deletions
|
@ -1621,7 +1621,7 @@ void NodeResolver::nodeResolveInternal()
|
|||
|
||||
|
||||
bool NodeResolver::getIdFromNrBacklog(content_t *result_out,
|
||||
const std::string &node_alt, content_t c_fallback)
|
||||
const std::string &node_alt, content_t c_fallback, bool error_on_fallback)
|
||||
{
|
||||
if (m_nodenames_idx == m_nodenames.size()) {
|
||||
*result_out = c_fallback;
|
||||
|
@ -1639,8 +1639,9 @@ bool NodeResolver::getIdFromNrBacklog(content_t *result_out,
|
|||
}
|
||||
|
||||
if (!success) {
|
||||
errorstream << "NodeResolver: failed to resolve node name '" << name
|
||||
<< "'." << std::endl;
|
||||
if (error_on_fallback)
|
||||
errorstream << "NodeResolver: failed to resolve node name '" << name
|
||||
<< "'." << std::endl;
|
||||
c = c_fallback;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue