aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-11-29 21:16:08 -0500
committerkwolekr <kwolekr@minetest.net>2013-11-30 00:01:43 -0500
commit769b2d7c0582a6e294472aa9ac166d8d1064cd77 (patch)
tree945cc7b07be020247d9f8b68a538d8da8d8b08e9 /doc
parent5be786c804d36e9950598a01cf39f05574af2acc (diff)
downloadminetest-769b2d7c0582a6e294472aa9ac166d8d1064cd77.tar.gz
minetest-769b2d7c0582a6e294472aa9ac166d8d1064cd77.tar.bz2
minetest-769b2d7c0582a6e294472aa9ac166d8d1064cd77.zip
LuaVoxelManip: Add get_light_data() and set_light_data()
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index cd9e27b7a..b8ad99ce7 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1818,6 +1818,13 @@ methods:
- set_lighting(light): Set the lighting within the VoxelManip
^ light is a table, {day=<0...15>, night=<0...15>}
^ To be used only by a VoxelManip object from minetest.get_mapgen_object
+
+- get_light_data(): Gets the light data read into the VoxelManip object
+ ^ Returns an array (indicies 1 to volume) of integers ranging from 0 to 255
+ ^ Each value is the bitwise combination of day and night light values (0..15 each)
+ ^ light = day + (night * 16)
+- set_light_data(light_data): Sets the param1 (light) contents of each node in the VoxelManip
+ ^ expects lighting data in the same format that get_light_data() returns
- calc_lighting(): Calculate lighting within the VoxelManip
^ To be used only by a VoxelManip object from minetest.get_mapgen_object
- update_liquids(): Update liquid flow