1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-07-01 06:10:22 +02:00

Improve example in documentation

This commit is contained in:
Till Affeldt
2023-03-11 23:21:40 +01:00
committed by GitHub
parent 84377a829f
commit ed3bdceabb

View File

@ -1167,9 +1167,9 @@ and also to modify weather effects before they are applied to the player.
* Setting this to `false` is only advised if you want to disable the weather effects __permanently__ and for every player.
Re-enabling effects later on will work but might conflict with other mods doing the same.
Override `weather.on_update` if you want to disable temporarily or need a higher level of control.
* If the `enable_weather` setting is set to `false` in minetest.conf then this function will __not__ do nothing.
* If the `enable_weather` setting is set to `false` in minetest.conf then this function will not do anything.
`weather.on_update(player, overrides)`
`weather.on_update = function(player, overrides)`
* Override this function to manipulate weather effects before they are applied to the player.
* Calling this function on its own will do nothing. You have to override it in order to modify its behavior.
@ -1179,4 +1179,4 @@ and also to modify weather effects before they are applied to the player.
* `overrides.lighting` A table (or `nil`) with lighting data following the same format as used for `player:set_lighting()`.
* This function is expected to return a table in the same format as `overrides`.
When overriding this function, the return value will be applied to the player instead of the original values.
Setting `clouds` or `lighting` to `nil` will __prevent__ that table from getting updated.
Setting `clouds` or `lighting` to `nil` will __prevent__ that table from getting updated.