From 49073ba2c34dfd8e286865ed2d108a4ec1eb3e3c Mon Sep 17 00:00:00 2001 From: paramat Date: Wed, 2 Dec 2015 03:28:03 +0000 Subject: Mapgen: Add propagate_shadow bool to calcLighting To terminate unwanted shadows from floatlands or realms above Also add to LuaVoxelManip calc_lighting for use in mapgen mods Remove the 2 argument calcLighting, mapgens now use the 5 argument form to specify the volumes for propagateSunlight and spreadLight In mgsinglenode replace calcLighting with setLighting and clean-up use of tabs and spaces --- doc/lua_api.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 6e7a5446c..98442f395 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2996,7 +2996,7 @@ will place the schematic inside of the VoxelManip. * `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, p1, p2)`: Set the lighting within the `VoxelManip` to a uniform value +* `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; @@ -3010,10 +3010,12 @@ will place the schematic inside of the VoxelManip. * expects lighting data in the same format that `get_light_data()` returns * `get_param2_data()`: Gets the raw `param2` data read into the `VoxelManip` object * `set_param2_data(param2_data)`: Sets the `param2` contents of each node in the `VoxelManip` -* `calc_lighting(p1, p2)`: Calculate lighting within the `VoxelManip` +* `calc_lighting([p1, p2], [propagate_shadow])`: 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 + if left out or nil + * `propagate_shadow` is an optional boolean deciding whether shadows in a generated + mapchunk above are propagated down into the mapchunk; defaults to `true` if left out * `update_liquids()`: Update liquid flow * `was_modified()`: Returns `true` or `false` if the data in the voxel manipulator had been modified since the last read from map, due to a call to -- cgit v1.2.3