30 lines
712 B
Lua
30 lines
712 B
Lua
minetest.register_abm({
|
|
label = "Sponge Loop",
|
|
nodenames = {"pyutest_core:water_source", "pyutest_core:water_flowing"},
|
|
neighbors = {"pyutest_core:sponge"},
|
|
interval = 0.1,
|
|
chance = 1,
|
|
action = function (pos)
|
|
minetest.remove_node(pos)
|
|
end
|
|
})
|
|
|
|
local blocks = {}
|
|
for k, v in pairs(minetest.registered_nodes) do
|
|
if v.groups["block"] ~= nil and k:find("acid") == nil then
|
|
table.insert(blocks, k)
|
|
end
|
|
end
|
|
|
|
minetest.register_abm({
|
|
label = "Contagious Acid Spread",
|
|
nodenames = blocks,
|
|
neighbors = {"pyutest_core:contagious_acid"},
|
|
interval = 3.4,
|
|
chance = 3.7,
|
|
catchup = true,
|
|
action = function (pos)
|
|
minetest.set_node(pos, {name = "pyutest_core:contagious_acid"})
|
|
end
|
|
})
|