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:
21
abm.lua
Normal file
21
abm.lua
Normal 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
|
||||
})
|
Reference in New Issue
Block a user