forked from VoxeLibre/VoxeLibre
Stop lightning striking positions that doesn't have rain
This commit is contained in:
parent
65d6cb1d83
commit
5aa946069f
|
@ -10,6 +10,10 @@ mcl_weather.thunder = {
|
||||||
init_done = false,
|
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)
|
minetest.register_globalstep(function(dtime)
|
||||||
if mcl_weather.get_weather() ~= "thunder" then
|
if mcl_weather.get_weather() ~= "thunder" then
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in New Issue