From b2a89c04b22d51a9ec541c75cf530897dbbce8d9 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Sun, 12 Apr 2015 16:40:50 -0400 Subject: Schematics: Reorganize (de)serialization and add Lua serialization API --- doc/lua_api.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 0aa3691d8..25f9d53ca 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2170,6 +2170,15 @@ These functions return the leftover itemstack. * `force_placement` is a boolean indicating whether nodes other than `air` and `ignore` are replaced by the schematic +* `minetest.serialize_schematic(schematic, format, use_comments)` + * Return the serialized schematic specified by schematic (see: Schematic specifier) + * in the `format` of either "mts" or "lua". + * "mts" - a string containing the binary MTS data used in the MTS file format + * "lua" - a string containing Lua code representing the schematic in table format + * If `use_comments` is true, the Lua code generated will have (X, Z) position comments + * for every X row generated in the schematic data for easier reading. This parameter + * is ignored if `format` is not "lua". + ### Misc. * `minetest.get_connected_players()`: returns list of `ObjectRefs` * `minetest.hash_node_position({x=,y=,z=})`: returns an 48-bit integer -- cgit v1.2.3