From 6b3169e4d0ebd82661d7cca9e3a381124a897f1a Mon Sep 17 00:00:00 2001 From: kwolekr Date: Thu, 27 Jun 2013 21:12:44 -0400 Subject: LuaVoxelManip: Separate VoxelManip data get/set from emerging/blitting data back to map --- doc/lua_api.txt | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index a4e1372da..622d292c4 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1553,17 +1553,23 @@ VoxelManip: An interface to the MapVoxelManipulator for Lua - Can be created via VoxelManip() - Also minetest.get_voxel_manip() methods: -- read_chunk(p1, p2): Read a chunk of map containing the region formed by p1 and p2. - ^ returns raw node data, actual emerged p1, actual emerged p2 - ^ raw node data is in the form of a table mapping indicies to node content ids -- write_chunk(data): Write back the data -- update_map(): Update map after writing chunk. - ^ To be used only by VoxelManip objects created by the mod itself; not VoxelManips passed to callbacks +- read_from_map(p1, p2): Reads a chunk of map from the map containing the region formed by p1 and p2. + ^ returns actual emerged pmin, actual emerged pmax +- write_to_map(): Writes the data loaded from the VoxelManip back to the map. + ^ important: data must be set using VoxelManip:set_data before calling this +- get_data(): Gets the data read into the VoxelManip object + ^ returns raw node data is in the form of an array of node content ids +- set_data(data): Sets the data contents of the VoxelManip object +- update_map(): Update map after writing chunk back to map. + ^ To be used only by VoxelManip objects created by the mod itself; not a VoxelManip that was + ^ retrieved from minetest.get_mapgen_object - set_lighting(p1, p2, light): Set the lighting in the region formed by p1 and p2 to light ^ light is a table containing two integer fields ranging from 0 to 15, day and night - ^ To be used only by VoxelManip objects passed to a callback; otherwise, set lighting will be ignored + ^ To be used only by a VoxelManip object from minetest.get_mapgen_object; otherwise, set lighting will + ^ be ignored - calc_lighting(p1, p2): Calculate lighting in the region formed by p1 and p2 - ^ To be used only by VoxelManip objects passed to a callback; otherwise, calculated lighting will be ignored + ^ To be used only by a VoxelManip object from minetest.get_mapgen_object; otherwise, calculated lighting + ^ will be ignored - update_liquids(): Update liquid flow Mapgen objects -- cgit v1.2.3