From 3ec25f8eee737889189712ed08d0a858db87cf41 Mon Sep 17 00:00:00 2001 From: theFox6 Date: Thu, 17 May 2018 13:43:44 +0200 Subject: [PATCH] fixed lightning crash --- weather/api.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weather/api.lua b/weather/api.lua index 4019d7b..d4ac173 100644 --- a/weather/api.lua +++ b/weather/api.lua @@ -90,7 +90,9 @@ minetest.register_globalstep(function() else if math.random(1, 10000) == 1 then weather.type = "none" - lightning.auto = false + if minetest.get_modpath("lightning") then + lightning.auto = false + end end end local current_downfall = weather_mod.registered_downfalls[weather.type]