diff options
author | x2048 <codeforsmile@gmail.com> | 2022-03-26 16:58:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-26 16:58:26 +0100 |
commit | 0f25fa7af655b98fa401176a523f269c843d1943 (patch) | |
tree | 1fa8762f53941d6c1250c0c3a7dc6b8557995a40 /doc | |
parent | 8d55702d139db739f8bf43eaa600f41446b29a16 (diff) | |
download | minetest-0f25fa7af655b98fa401176a523f269c843d1943.tar.gz minetest-0f25fa7af655b98fa401176a523f269c843d1943.tar.bz2 minetest-0f25fa7af655b98fa401176a523f269c843d1943.zip |
Add API to control shadow intensity from the game/mod (#11944)
* Also Disable shadows when sun/moon is hidden. Fixes #11972.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 52da17e9c..029c53616 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -7019,6 +7019,13 @@ object you are working with still exists. * Returns `false` if failed. * Resource intensive - use sparsely * To get blockpos, integer divide pos by 16 +* `set_lighting(light_definition)`: sets lighting for the player + * `light_definition` is a table with the following optional fields: + * `shadows` is a table that controls ambient shadows + * `intensity` sets the intensity of the shadows from 0 (no shadows, default) to 1 (blackness) + * Returns true on success. +* `get_lighting()`: returns the current state of lighting for the player. + * Result is a table with the same fields as `light_definition` in `set_lighting`. `PcgRandom` ----------- |