aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-11-30 00:27:39 -0500
committerkwolekr <kwolekr@minetest.net>2013-11-30 00:27:39 -0500
commitff7d7080e3ea2d2ca1669cb8c47c35a6c4753d39 (patch)
treee599ebf2496f7c57523774b3d7c49d5f6541cc5b /doc
parent769b2d7c0582a6e294472aa9ac166d8d1064cd77 (diff)
downloadminetest-ff7d7080e3ea2d2ca1669cb8c47c35a6c4753d39.tar.gz
minetest-ff7d7080e3ea2d2ca1669cb8c47c35a6c4753d39.tar.bz2
minetest-ff7d7080e3ea2d2ca1669cb8c47c35a6c4753d39.zip
LuaVoxelManip: Add area parameters back to calc_lighting and set_lighting, made optional this time; also fixed a slight bug with night values being ignored
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index b8ad99ce7..7fa8870aa 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1815,18 +1815,19 @@ methods:
- 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(light): Set the lighting within the VoxelManip
+- set_lighting(light, p1, p2): Set the lighting within the VoxelManip to a uniform value
^ light is a table, {day=<0...15>, night=<0...15>}
^ To be used only by a VoxelManip object from minetest.get_mapgen_object
-
+ ^ (p1, p2) is the area in which lighting is set; defaults to the whole area if left out
- 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
+- calc_lighting(p1, p2): Calculate lighting within the VoxelManip
^ To be used only by a VoxelManip object from minetest.get_mapgen_object
+ ^ (p1, p2) is the area in which lighting is set; defaults to the whole area if left out
- update_liquids(): Update liquid flow
VoxelArea: A helper class for voxel areas