From 2639a385a237ff0b24e7e68bc1d18fcefef31e7f Mon Sep 17 00:00:00 2001 From: theFox6 Date: Mon, 16 Sep 2019 10:07:29 +0200 Subject: [PATCH] small fixes --- weather/rain.lua | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/weather/rain.lua b/weather/rain.lua index 7747e6f..96a413e 100644 --- a/weather/rain.lua +++ b/weather/rain.lua @@ -1,21 +1,3 @@ ---adding weather.conf - -local modpath = minetest.get_modpath(minetest.get_current_modname()) -local worldpath = minetest.get_worldpath() -local input = io.open(modpath.."/weather.conf", "r") -if input then - dofile(modpath.."/weather.conf") - input:close() - input = nil -end -input = io.open(worldpath.."/weather.conf", "r") -if input then - dofile(worldpath.."/weather.conf") - input:close() - input = nil -end - - -- Rain weather_mod.register_downfall("weather:rain",{ min_pos = {x=-9, y=7, z=-9}, @@ -27,13 +9,14 @@ weather_mod.register_downfall("weather:rain",{ texture="weather_rain.png", enable_lightning=true, }) + if minetest.is_yes(minetest.settings:get_bool('snow_covers_abm')) and minetest.get_modpath("waterplus") then minetest.register_abm({ nodenames = {"group:crumbly", "group:snappy", "group:cracky", "group:choppy"}, neighbors = {"default:air"}, - interval = 10.0, + interval = 10.0, chance = 80, - action = function (pos, node, active_object_count, active_object_count_wider) + action = function (pos, node) if weather == "rain" then if minetest.registered_nodes[node.name].drawtype == "normal" or minetest.registered_nodes[node.name].drawtype == "allfaces_optional" then