regional_weather/abms/fire.lua

25 lines
625 B
Lua
Raw Normal View History

2020-04-16 19:13:14 +02:00
if not regional_weather.settings.fire then return end
if not minetest.get_modpath("fire") then return end
climate_api.register_abm({
label = "extinguish fire at high humidity",
nodenames = { "fire:basic_flame" },
neighbors = { "air" },
2020-04-16 19:13:14 +02:00
interval = 10,
chance = 2,
catch_up = false,
2020-04-16 19:13:14 +02:00
conditions = {
min_height = regional_weather.settings.min_height,
max_height = regional_weather.settings.max_height,
2023-02-24 09:51:14 +01:00
min_humidity = 50,
min_biome_humidity = 26,
2020-04-16 19:13:14 +02:00
max_heat = 85,
2020-10-08 22:03:00 +02:00
daylight = 15,
indoors = false
2020-04-16 19:13:14 +02:00
},
action = function (pos, node, env)
minetest.set_node(pos, { name = "air" })
end
})