aboutsummaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorJude Melton-Houghton <jwmhjwmh@gmail.com>2022-08-13 02:53:47 -0400
committerGitHub <noreply@github.com>2022-08-13 08:53:47 +0200
commitab8dfb45b4e1f6b2c331cc9b8a367ae81cd16f42 (patch)
treeffb0f65b0792eebdf87a68ab8a7351e87799c06f /doc/lua_api.txt
parent59601eb9229032f8126f9ff11598faf25357ca44 (diff)
downloadminetest-ab8dfb45b4e1f6b2c331cc9b8a367ae81cd16f42.tar.xz
Allow buffer argument to VoxelManip:get_light_data (#12682)
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 9e1633a14..9403de670 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -4386,12 +4386,15 @@ Methods
`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
+* `get_light_data([buffer])`: Gets the light data read into the
+ `VoxelManip` object
* Returns an array (indices 1 to volume) of integers ranging from `0` to
`255`.
* Each value is the bitwise combination of day and night light values
(`0` to `15` each).
* `light = day + (night * 16)`
+ * If the param `buffer` is present, this table will be used to store the
+ result instead.
* `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
@@ -4863,6 +4866,8 @@ Utilities
particlespawner_tweenable = true,
-- allows get_sky to return a table instead of separate values (5.6.0)
get_sky_as_table = true,
+ -- VoxelManip:get_light_data accepts an optional buffer argument (5.7.0)
+ get_light_data_buffer = true,
}
* `minetest.has_feature(arg)`: returns `boolean, missing_features`