aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2015-12-02 03:28:03 +0000
committerparamat <mat.gregory@virginmedia.com>2015-12-07 03:18:24 +0000
commit49073ba2c34dfd8e286865ed2d108a4ec1eb3e3c (patch)
tree2372b48d5bfd846775ced52653afa92883e0a20c /doc
parenta78dd7f2b6b0e1fefdbaa1ae21b722dd4459e4f4 (diff)
downloadminetest-49073ba2c34dfd8e286865ed2d108a4ec1eb3e3c.tar.gz
minetest-49073ba2c34dfd8e286865ed2d108a4ec1eb3e3c.tar.bz2
minetest-49073ba2c34dfd8e286865ed2d108a4ec1eb3e3c.zip
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
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt8
1 files changed, 5 insertions, 3 deletions
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