From 4d869497fa8ede338029da8d5fc8cf7c5549a09f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 2 Mar 2017 18:24:19 +0100 Subject: [PATCH] Make soil wet when raining --- mods/ENVIRONMENT/weather_pack/rain.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mods/ENVIRONMENT/weather_pack/rain.lua b/mods/ENVIRONMENT/weather_pack/rain.lua index 2229e750f1..015c8982f8 100644 --- a/mods/ENVIRONMENT/weather_pack/rain.lua +++ b/mods/ENVIRONMENT/weather_pack/rain.lua @@ -203,4 +203,18 @@ if weather.allow_abm then end end }) + + -- Wetten the soil + minetest.register_abm({ + nodenames = {"mcl_farming:soil"}, + interval = 27.0, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + if rain.raining and weather.is_outdoor(pos) then + if node.name == "mcl_farming:soil" then + minetest.set_node(pos, {name="mcl_farming:soil_wet"}) + end + end + end + }) end