surface_effect/nodes.lua

28 lines
979 B
Lua

local S = minetest.get_translator("surface_effect")
minetest.register_node("surface_effect:radioactive_earth", {
description = S("Irradiated Earth"),
tiles = {
"surface_effect_radioactive_earth_up.png",
"surface_effect_radioactive_eartha_front.png",
"surface_effect_radioactive_eartha_front.png",
"surface_effect_radioactive_eartha_front.png",
"surface_effect_radioactive_eartha_front.png",
"surface_effect_radioactive_eartha_front.png",
},
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.25},
}),
})
minetest.register_abm({
nodenames = {"default:dirt_with_grass"},
interval = 10,
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,
})