aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt24
1 files changed, 23 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 6e7a1de68..16e662e0c 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2398,6 +2398,22 @@ and `minetest.auth_reload` call the authetification handler.
* increase level of leveled node by level, default `level` equals `1`
* if `totallevel > maxlevel`, returns rest (`total-max`)
* can be negative for decreasing
+* `minetest.fix_light(pos1, pos2)`: returns `true`/`false`
+ * resets the light in a cuboid-shaped part of
+ the map and removes lighting bugs.
+ * Loads the area if it is not loaded.
+ * `pos1` is the corner of the cuboid with the least coordinates
+ (in node coordinates), inclusive.
+ * `pos2` is the opposite corner of the cuboid, inclusive.
+ * The actual updated cuboid might be larger than the specified one,
+ because only whole map blocks can be updated.
+ The actual updated area consists of those map blocks that intersect
+ with the given cuboid.
+ * However, the neighborhood of the updated area might change
+ as well, as light can spread out of the cuboid, also light
+ might be removed.
+ * returns `false` if the area is not fully generated,
+ `true` otherwise
* `core.check_single_for_falling(pos)`
* causes an unsupported `group:falling_node` node to fall and causes an
unattached `group:attached_node` node to fall.
@@ -3421,8 +3437,14 @@ will place the schematic inside of the VoxelManip.
* `read_from_map(p1, p2)`: Loads a chunk of map into the VoxelManip object containing
the region formed by `p1` and `p2`.
* returns actual emerged `pmin`, actual emerged `pmax`
-* `write_to_map()`: Writes the data loaded from the `VoxelManip` back to the map.
+* `write_to_map([light])`: Writes the data loaded from the `VoxelManip` back to the map.
* **important**: data must be set using `VoxelManip:set_data()` before calling this
+ * if `light` is true, then lighting is automatically recalculated.
+ The default value is true.
+ If `light` is false, no light calculations happen, and you should correct
+ all modified blocks with `minetest.fix_light()` as soon as possible.
+ Keep in mind that modifying the map where light is incorrect can cause
+ more lighting bugs.
* `get_node_at(pos)`: Returns a `MapNode` table of the node currently loaded in
the `VoxelManip` at that position
* `set_node_at(pos, node)`: Sets a specific `MapNode` in the `VoxelManip` at that position