aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2017-09-06 22:20:09 +0100
committerparamat <mat.gregory@virginmedia.com>2017-09-10 01:31:30 +0100
commit51002b1629c69adb0053bc36d3667d2b790e5c21 (patch)
tree1b92288c9c9403e3385371b2bc2589bfc70f711f /src/script
parent557bbc670451f82c384032383df80a1a92ffe724 (diff)
downloadminetest-51002b1629c69adb0053bc36d3667d2b790e5c21.tar.gz
minetest-51002b1629c69adb0053bc36d3667d2b790e5c21.tar.bz2
minetest-51002b1629c69adb0053bc36d3667d2b790e5c21.zip
Schematic decorations: Add 'place_offset_y' placement parameter
For precise control of schematic vertical position relative to the 'place_on' node. Avoids workarounds that add empty nodes to a schematic and therefore reduce performance. Also remove long-unused decoration cutoff code.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_mapgen.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp
index c2b256228..7757ea80c 100644
--- a/src/script/lua_api/l_mapgen.cpp
+++ b/src/script/lua_api/l_mapgen.cpp
@@ -1018,6 +1018,8 @@ bool read_deco_schematic(lua_State *L, SchematicManager *schemmgr, DecoSchematic
deco->rotation = (Rotation)getenumfield(L, index, "rotation",
ModApiMapgen::es_Rotation, ROTATE_0);
+ deco->place_offset_y = getintfield_default(L, index, "place_offset_y", 0);
+
StringMap replace_names;
lua_getfield(L, index, "replacements");
if (lua_istable(L, -1))