surface_effect/register_abm.lua

25 lines
709 B
Lua

local speed = minetest.setting_get("time_speed")/96
minetest.register_abm({
nodenames = {"default:dirt_with_grass"},
interval = 10/speed,
chance = 50,
action = function(pos)
if pos.y > -10 and pos.y < 1500 then
minetest.env:add_node(pos, {name="surface_effect:radioactive_earth"})
end
end,
})
if minetest.get_modpath("areas") then
minetest.register_abm({
nodenames = {"ethereal:grove_dirt"},
interval = 10/speed,
chance = 50,
action = function(pos)
if pos.y > -10 and pos.y < 1500 then
minetest.env:add_node(pos, {name="surface_effect:radioactive_earth"})
end
end,
})
end