Not sure what to call this one: Destroying all cactuses in a column
So, I know I shouldn't compare this game to minecraft but a simple thing that I was missing was cactuses being destroyed when you dig the bottom one, so I added it to this game, It could be added to trees but it should use the axe's durability.

Edit: source is included, replace the same cactus bit of could in the nodes.lua file in the default folder.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_node("default:cactus", {
description = "Cactus",
tiles = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
is_ground_content = true,
groups = {snappy=1,choppy=3,flammable=2},
sounds = default.node_sound_wood_defaults(),
after_destruct = function(pos,oldnode)
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
if node.name == "default:cactus" then
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
minetest.add_item(pos,"default:cactus")
end
end,
})
Edit: source is included, replace the same cactus bit of could in the nodes.lua file in the default folder.