mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add replacements to schematics
This commit is contained in:
parent
5e433fa913
commit
45589fae58
4 changed files with 49 additions and 4 deletions
|
@ -506,7 +506,12 @@ void DecoSchematic::resolveNodeNames(INodeDefManager *ndef) {
|
|||
}
|
||||
|
||||
for (size_t i = 0; i != node_names->size(); i++) {
|
||||
content_t c = ndef->getId(node_names->at(i));
|
||||
std::string name = node_names->at(i);
|
||||
std::map<std::string, std::string>::iterator it;
|
||||
it = replacements.find(name);
|
||||
if (it != replacements.end())
|
||||
name = it->second;
|
||||
content_t c = ndef->getId(name);
|
||||
if (c == CONTENT_IGNORE) {
|
||||
errorstream << "DecoSchematic::resolveNodeNames: node '"
|
||||
<< node_names->at(i) << "' not defined" << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue