From 1384108f8c32f309852c1d1665a613f2a3e3fcc2 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Wed, 4 Nov 2015 03:33:12 -0500 Subject: Schematics: Add core.place_schematic_on_vmanip API Fix memory leak in minetest.place_schematic Slightly refactor Schematic code --- doc/lua_api.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/lua_api.txt') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 57940a5dd..b337be1f0 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2294,6 +2294,15 @@ These functions return the leftover itemstack. * `replacements` = `{["old_name"] = "convert_to", ...}` * `force_placement` is a boolean indicating whether nodes other than `air` and `ignore` are replaced by the schematic + * Returns nil if the schematic could not be loaded. + +* `minetest.place_schematic_on_vmanip(vmanip, pos, schematic, rotation, replacement, force_placement)`: + * This function is analagous 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. * `minetest.serialize_schematic(schematic, format, options)` * Return the serialized schematic specified by schematic (see: Schematic specifier) -- cgit v1.2.3