diff options
author | Paramat <paramat@users.noreply.github.com> | 2018-04-20 20:26:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-20 20:26:30 +0100 |
commit | 0e554706ac244b9eebc62e52fccb1a4b9e81d2a4 (patch) | |
tree | 25453cc7f520495e167527c90f2f0044860a1872 /src/nodedef.cpp | |
parent | 87ad4d8e7f25210cd28d9f2b372aa00aa3dab929 (diff) | |
download | minetest-0e554706ac244b9eebc62e52fccb1a4b9e81d2a4.tar.gz minetest-0e554706ac244b9eebc62e52fccb1a4b9e81d2a4.tar.bz2 minetest-0e554706ac244b9eebc62e52fccb1a4b9e81d2a4.zip |
Node resolver: Make error on fallback optional, disable for mapgen aliases
Diffstat (limited to 'src/nodedef.cpp')
-rw-r--r-- | src/nodedef.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp index eb1763166..e40a45f97 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -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; } |