aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-06-27 21:12:44 -0400
committerkwolekr <kwolekr@minetest.net>2013-06-27 22:35:35 -0400
commit6b3169e4d0ebd82661d7cca9e3a381124a897f1a (patch)
tree2990953547b3188aee6e5dfa7c68670e0046d31d /doc
parent2e292b67a0a02b045969034c06aaf92b42a83a81 (diff)
downloadminetest-6b3169e4d0ebd82661d7cca9e3a381124a897f1a.tar.gz
minetest-6b3169e4d0ebd82661d7cca9e3a381124a897f1a.tar.bz2
minetest-6b3169e4d0ebd82661d7cca9e3a381124a897f1a.zip
LuaVoxelManip: Separate VoxelManip data get/set from emerging/blitting data back to map
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt22
1 files changed, 14 insertions, 8 deletions
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