Stop lightning striking positions that doesn't have rain

This commit is contained in:
teknomunk 2024-06-03 17:51:12 -05:00
parent 65d6cb1d83
commit 5aa946069f
1 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,10 @@ mcl_weather.thunder = {
init_done = false,
}
lightning.register_on_strike(function(pos, pos2, objects)
if not mcl_weather.has_rain(pos) then return nil, true end
end)
minetest.register_globalstep(function(dtime)
if mcl_weather.get_weather() ~= "thunder" then
return false