1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

LuaVoxelManip: Add get_light_data() and set_light_data()

This commit is contained in:
kwolekr 2013-11-29 21:16:08 -05:00
parent 5be786c804
commit 769b2d7c05
3 changed files with 54 additions and 0 deletions

View file

@ -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