1
0
mirror of https://gitlab.com/rautars/weather_pack.git synced 2025-07-16 05:40:22 +02:00

start using happy_weather_api, fix #8 sky reseting issue

This commit is contained in:
Arturas Norkus
2017-05-22 13:40:16 +03:00
parent dcde7bdd2d
commit 9ec1790b16
30 changed files with 1420 additions and 680 deletions

21
abm.lua Normal file
View File

@ -0,0 +1,21 @@
--------------------------------
-- Happy Weather: ABM registers
-- License: MIT
-- Credits: xeranas
--------------------------------
-- ABM for extinguish fire
minetest.register_abm({
nodenames = {"fire:basic_flame"},
interval = 4.0,
chance = 2,
action = function(pos, node, active_object_count, active_object_count_wider)
if happy_weather.is_weather_active("heavy_rain") or happy_weather.is_weather_active("rain") then
if hw_utils.is_outdoor(pos) then
minetest.remove_node(pos)
end
end
end
})