Skip to content
Snippets Groups Projects
Commit fb8144f7 authored by PilzAdam's avatar PilzAdam
Browse files

Don't grow papyrus into trees

parent df2fdba2
No related branches found
No related tags found
No related merge requests found
......@@ -69,14 +69,26 @@ end
function default.make_papyrus(pos, size)
for y=0,size-1 do
local p = {x=pos.x, y=pos.y+y, z=pos.z}
minetest.env:set_node(p, {name="default:papyrus"})
local nn = minetest.env:get_node(p).name
if minetest.registered_nodes[nn] and
minetest.registered_nodes[nn].buildable_to then
minetest.env:set_node(p, {name="default:papyrus"})
else
return
end
end
end
function default.make_cactus(pos, size)
for y=0,size-1 do
local p = {x=pos.x, y=pos.y+y, z=pos.z}
minetest.env:set_node(p, {name="default:cactus"})
local nn = minetest.env:get_node(p).name
if minetest.registered_nodes[nn] and
minetest.registered_nodes[nn].buildable_to then
minetest.env:set_node(p, {name="default:cactus"})
else
return
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment