mirror of
https://github.com/t-affeldt/regional_weather.git
synced 2025-07-18 16:30:31 +02:00
Implement ABM system and damage effect
This commit is contained in:
21
abms/fire.lua
Normal file
21
abms/fire.lua
Normal file
@ -0,0 +1,21 @@
|
||||
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" },
|
||||
interval = 10,
|
||||
chance = 2,
|
||||
|
||||
conditions = {
|
||||
min_height = regional_weather.settings.min_height,
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_humidity = 55,
|
||||
max_heat = 85,
|
||||
min_light = 15
|
||||
},
|
||||
|
||||
action = function (pos, node, env)
|
||||
minetest.set_node(pos, { name = "air" })
|
||||
end
|
||||
})
|
Reference in New Issue
Block a user