1
0
Fork 0
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:
PilzAdam 2013-08-03 01:58:29 +02:00
parent 5e433fa913
commit 45589fae58
4 changed files with 49 additions and 4 deletions

View file

@ -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;