mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Fill cauldrons while raining
This commit is contained in:
parent
8c14966e9f
commit
df9f0d4c1c
1 changed files with 31 additions and 13 deletions
|
@ -170,8 +170,8 @@ if weather.reg_weathers.rain == nil then
|
|||
}
|
||||
end
|
||||
|
||||
-- ABM for extinguish fire
|
||||
if weather.allow_abm then
|
||||
-- ABM for extinguish fire
|
||||
minetest.register_abm({
|
||||
nodenames = {"mcl_fire:fire"},
|
||||
interval = 4.0,
|
||||
|
@ -184,4 +184,22 @@ if weather.allow_abm then
|
|||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- Slowly fill up cauldrons
|
||||
minetest.register_abm({
|
||||
nodenames = {"mcl_cauldrons:cauldron", "mcl_cauldrons:cauldron_1", "mcl_cauldrons:cauldron_2"},
|
||||
interval = 56.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_cauldrons:cauldron" then
|
||||
minetest.set_node(pos, {name="mcl_cauldrons:cauldron_1"})
|
||||
elseif node.name == "mcl_cauldrons:cauldron_1" then
|
||||
minetest.set_node(pos, {name="mcl_cauldrons:cauldron_2"})
|
||||
elseif node.name == "mcl_cauldrons:cauldron_2" then
|
||||
minetest.set_node(pos, {name="mcl_cauldrons:cauldron_3"})
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue