Yea, sometimes I explain things just to be sure I did understand it right by self :-/ I see myself still as a lua/minetest noob
Now I looked to the mod and tested it. Great (and new) idea to use the surface node types to define the weather!
My Feedback I did as pull request on github. In short:
1. get the mod multiplayer-ready: removed PLAYER setting, loop over all players
Usage of minetest.conf settings should not be used as storage for internal data. The Weather was enabeled for the last logged in player only. Now each player get own weather according his position
- note: this commit does not change much code as visible in the diff-view. I indented the code because of a new loop.
2 Use local variables instead of global. Pls. note the globals could be overridden by other mods if any other dev decides to call his globals with the same names
3 randomize check position. Before the weather change was to instantly if the player moves from gras to snow and back
4. randomize start yes_or_no and define a loop with loopsize / ranges for this variable. Before the weather was started allways with precipitation. Without the ranges it was possible to get infinite sunshine.
EDIT: I do not see any indoor-detection, but the mod seems to be work correctly by spawning the paticles above usual ceiling hight. Other weather mods does additional check the particle spawn position using
Code: Select all
if minetest.get_node_light(pos, 0.5) == 15 then
the place is outdoor