aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2018-02-23 13:42:48 +0000
committerparamat <mat.gregory@virginmedia.com>2018-02-27 19:39:05 +0000
commitc610643c4ca1d1c32ca3e400b5cb055f25401107 (patch)
tree73e1efd9fa3ba3c8269262d221a760e25a2b91e1 /doc
parent6c9df2ffa7ee81a05b28fdd6123a926abd284c72 (diff)
downloadminetest-c610643c4ca1d1c32ca3e400b5cb055f25401107.tar.gz
minetest-c610643c4ca1d1c32ca3e400b5cb055f25401107.tar.bz2
minetest-c610643c4ca1d1c32ca3e400b5cb055f25401107.zip
Place schematic (on vmanip): Enable use of 'place center' flags
For 'place schematic' and 'place schematic on vmanip' APIs. Fix 'place center' code to properly centre schematics. Fix some comments.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 962a56e10..29be2a98c 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -3276,7 +3276,7 @@ These functions return the leftover itemstack.
* If slice probability list equals `nil`, no slice probabilities are applied.
* Saves schematic in the Minetest Schematic format to filename.
-* `minetest.place_schematic(pos, schematic, rotation, replacements, force_placement)`
+* `minetest.place_schematic(pos, schematic, rotation, replacements, force_placement, flags)`
* Place the schematic specified by schematic (see: Schematic specifier) at `pos`.
* `rotation` can equal `"0"`, `"90"`, `"180"`, `"270"`, or `"random"`.
* If the `rotation` parameter is omitted, the schematic is not rotated.
@@ -3288,14 +3288,22 @@ These functions return the leftover itemstack.
will always use the cached version and the replacement list defined for it,
regardless of whether the file or the replacement list parameter have changed.
The only way to load the file anew is to restart the server.
+ * `flags` is a flag field with the available flags:
+ * place_center_x
+ * place_center_y
+ * place_center_z
-* `minetest.place_schematic_on_vmanip(vmanip, pos, schematic, rotation, replacement, force_placement)`:
+* `minetest.place_schematic_on_vmanip(vmanip, pos, schematic, rotation, replacement, force_placement, flags)`:
* This function is analogous to minetest.place_schematic, but places a schematic onto the
specified VoxelManip object `vmanip` instead of the whole map.
* Returns false if any part of the schematic was cut-off due to the VoxelManip not
containing the full area required, and true if the whole schematic was able to fit.
* Returns nil if the schematic could not be loaded.
* After execution, any external copies of the VoxelManip contents are invalidated.
+ * `flags` is a flag field with the available flags:
+ * place_center_x
+ * place_center_y
+ * place_center_z
* `minetest.serialize_schematic(schematic, format, options)`
* Return the serialized schematic specified by schematic (see: Schematic specifier)