aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen.cpp
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-08-03 01:58:29 +0200
committerPilzAdam <pilzadam@minetest.net>2013-08-03 03:22:14 +0200
commit45589fae58157c8a66c640a1db5795a42a86fc1c (patch)
treeaafb4d39b821e2bff4d590a25b982cd4228b9657 /src/mapgen.cpp
parent5e433fa913cc21d4d3c9ba1ef341c3c7aedc128c (diff)
downloadminetest-45589fae58157c8a66c640a1db5795a42a86fc1c.tar.gz
minetest-45589fae58157c8a66c640a1db5795a42a86fc1c.tar.bz2
minetest-45589fae58157c8a66c640a1db5795a42a86fc1c.zip
Add replacements to schematics
Diffstat (limited to 'src/mapgen.cpp')
-rw-r--r--src/mapgen.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp
index f446d05b7..397e52f74 100644
--- a/src/mapgen.cpp
+++ b/src/mapgen.cpp
@@ -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;