mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add API to control shadow intensity from the game/mod (#11944)
* Also Disable shadows when sun/moon is hidden. Fixes #11972.
This commit is contained in:
parent
8d55702d13
commit
0f25fa7af6
24 changed files with 375 additions and 169 deletions
|
@ -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`
|
||||
-----------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue