mirror of
				https://github.com/luanti-org/minetest_game.git
				synced 2025-11-04 09:15:29 +01:00 
			
		
		
		
	Don't grow papyrus into trees
This commit is contained in:
		@@ -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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user