mirror of
				https://github.com/mt-mods/plantlife_modpack.git
				synced 2025-11-03 23:25:26 +01:00 
			
		
		
		
	cleanfile run: remove trailing whitespace.
				
					
				
			When it's this far out of hand you really need to clean up or else everyone will be submitting patches with more whitespace problems.
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
local title		= "Along the Shore"
 | 
					local title		= "Along the Shore"
 | 
				
			||||||
local version 	= "0.0.4"
 | 
					local version	= "0.0.4"
 | 
				
			||||||
local mname		= "along_shore"
 | 
					local mname		= "along_shore"
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,17 +4,17 @@
 | 
				
			|||||||
-- bush leaf textures are cc-by-sa 3.0.  from VannessaE's moretrees mod.  (Leaf texture created by RealBadAngel or VanessaE)
 | 
					-- bush leaf textures are cc-by-sa 3.0.  from VannessaE's moretrees mod.  (Leaf texture created by RealBadAngel or VanessaE)
 | 
				
			||||||
-- Branch textures created by Neuromancer.
 | 
					-- Branch textures created by Neuromancer.
 | 
				
			||||||
-- Licence for Code and Non-Bush leaf code is WTFPL.
 | 
					-- Licence for Code and Non-Bush leaf code is WTFPL.
 | 
				
			||||||
 
 | 
					
 | 
				
			||||||
-- support for i18n
 | 
					-- support for i18n
 | 
				
			||||||
local S = plantlife_i18n.gettext
 | 
					local S = plantlife_i18n.gettext
 | 
				
			||||||
  abstract_bushes = {} 
 | 
					  abstract_bushes = {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  minetest.register_node("bushes:youngtree2_bottom", {
 | 
					  minetest.register_node("bushes:youngtree2_bottom", {
 | 
				
			||||||
	description = S("Young Tree 2 (bottom)"),
 | 
						description = S("Young Tree 2 (bottom)"),
 | 
				
			||||||
 drawtype="nodebox",
 | 
					 drawtype="nodebox",
 | 
				
			||||||
 tiles = {"bushes_youngtree2trunk.png"},
 | 
					 tiles = {"bushes_youngtree2trunk.png"},
 | 
				
			||||||
 	inventory_image = "bushes_youngtree2trunk_inv.png",
 | 
						inventory_image = "bushes_youngtree2trunk_inv.png",
 | 
				
			||||||
	wield_image = "bushes_youngtree2trunk_inv.png", 
 | 
						wield_image = "bushes_youngtree2trunk_inv.png",
 | 
				
			||||||
paramtype = "light",
 | 
					paramtype = "light",
 | 
				
			||||||
	walkable = false,
 | 
						walkable = false,
 | 
				
			||||||
	is_ground_content = true,
 | 
						is_ground_content = true,
 | 
				
			||||||
@@ -29,11 +29,11 @@ node_box = {
 | 
				
			|||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
	drop = 'default:stick'
 | 
						drop = 'default:stick'
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
  
 | 
					
 | 
				
			||||||
  local BushBranchCenter 			= { {1,1}, {3,2} }
 | 
					  local BushBranchCenter			= { {1,1}, {3,2} }
 | 
				
			||||||
for i in pairs(BushBranchCenter) do
 | 
					for i in pairs(BushBranchCenter) do
 | 
				
			||||||
	local Num 		= BushBranchCenter[i][1]
 | 
						local Num		= BushBranchCenter[i][1]
 | 
				
			||||||
	local TexNum 	= BushBranchCenter[i][2]
 | 
						local TexNum	= BushBranchCenter[i][2]
 | 
				
			||||||
	minetest.register_node("bushes:bushbranches"..Num, {
 | 
						minetest.register_node("bushes:bushbranches"..Num, {
 | 
				
			||||||
		description = S("Bush Branches @1", Num),
 | 
							description = S("Bush Branches @1", Num),
 | 
				
			||||||
		drawtype = "nodebox",
 | 
							drawtype = "nodebox",
 | 
				
			||||||
@@ -58,8 +58,8 @@ for i in pairs(BushBranchCenter) do
 | 
				
			|||||||
				sunlight_propagates = true,
 | 
									sunlight_propagates = true,
 | 
				
			||||||
		groups = {
 | 
							groups = {
 | 
				
			||||||
		--	tree=1, -- MM: disabled because some recipes use group:tree for trunks
 | 
							--	tree=1, -- MM: disabled because some recipes use group:tree for trunks
 | 
				
			||||||
			snappy=3, 
 | 
								snappy=3,
 | 
				
			||||||
			flammable=2, 
 | 
								flammable=2,
 | 
				
			||||||
			leaves=1
 | 
								leaves=1
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		sounds = default.node_sound_leaves_defaults(),
 | 
							sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
@@ -67,20 +67,20 @@ for i in pairs(BushBranchCenter) do
 | 
				
			|||||||
	})
 | 
						})
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
local BushBranchSide 			= { {2,1}, {4,2} }
 | 
					local BushBranchSide			= { {2,1}, {4,2} }
 | 
				
			||||||
for i in pairs(BushBranchSide) do
 | 
					for i in pairs(BushBranchSide) do
 | 
				
			||||||
	local Num 		= BushBranchSide[i][1]
 | 
						local Num		= BushBranchSide[i][1]
 | 
				
			||||||
	local TexNum 	= BushBranchSide[i][2]
 | 
						local TexNum	= BushBranchSide[i][2]
 | 
				
			||||||
	minetest.register_node("bushes:bushbranches"..Num, {
 | 
						minetest.register_node("bushes:bushbranches"..Num, {
 | 
				
			||||||
		description = S("Bush Branches @1", Num),
 | 
							description = S("Bush Branches @1", Num),
 | 
				
			||||||
		drawtype = "nodebox",
 | 
							drawtype = "nodebox",
 | 
				
			||||||
		tiles = {
 | 
							tiles = {
 | 
				
			||||||
--[[top]] 	"bushes_leaves_"..TexNum..".png",
 | 
					--[[top]]	"bushes_leaves_"..TexNum..".png",
 | 
				
			||||||
--[[bottom]]"bushes_branches_center_"..TexNum..".png",
 | 
					--[[bottom]]"bushes_branches_center_"..TexNum..".png",
 | 
				
			||||||
--[[right]]	"bushes_branches_left_"..TexNum..".png",
 | 
					--[[right]]	"bushes_branches_left_"..TexNum..".png",
 | 
				
			||||||
--[[left]]	"bushes_branches_right_"..TexNum..".png", -- MM: We could also mirror the previous here,
 | 
					--[[left]]	"bushes_branches_right_"..TexNum..".png", -- MM: We could also mirror the previous here,
 | 
				
			||||||
--[[back]]	"bushes_branches_center_"..TexNum..".png",--     unless U really want 'em 2 B different 
 | 
					--[[back]]	"bushes_branches_center_"..TexNum..".png",--     unless U really want 'em 2 B different
 | 
				
			||||||
--[[front]]	"bushes_branches_right_"..TexNum..".png"  
 | 
					--[[front]]	"bushes_branches_right_"..TexNum..".png"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		node_box = {
 | 
							node_box = {
 | 
				
			||||||
			type = "fixed",
 | 
								type = "fixed",
 | 
				
			||||||
@@ -101,8 +101,8 @@ for i in pairs(BushBranchSide) do
 | 
				
			|||||||
				sunlight_propagates = true,
 | 
									sunlight_propagates = true,
 | 
				
			||||||
		groups = {
 | 
							groups = {
 | 
				
			||||||
		--	tree=1, -- MM: disabled because some recipes use group:tree for trunks
 | 
							--	tree=1, -- MM: disabled because some recipes use group:tree for trunks
 | 
				
			||||||
			snappy=3, 
 | 
								snappy=3,
 | 
				
			||||||
			flammable=2, 
 | 
								flammable=2,
 | 
				
			||||||
			leaves=1
 | 
								leaves=1
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		sounds = default.node_sound_leaves_defaults(),
 | 
							sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
@@ -110,25 +110,25 @@ for i in pairs(BushBranchSide) do
 | 
				
			|||||||
	})
 | 
						})
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
local BushLeafNode 			= { {1}, {2}}
 | 
					local BushLeafNode			= { {1}, {2}}
 | 
				
			||||||
for i in pairs(BushLeafNode) do
 | 
					for i in pairs(BushLeafNode) do
 | 
				
			||||||
	local Num = BushLeafNode[i][1]	
 | 
						local Num = BushLeafNode[i][1]
 | 
				
			||||||
	minetest.register_node("bushes:BushLeaves"..Num, {
 | 
						minetest.register_node("bushes:BushLeaves"..Num, {
 | 
				
			||||||
		description = S("Bush Leaves @1", Num),
 | 
							description = S("Bush Leaves @1", Num),
 | 
				
			||||||
		drawtype = "allfaces_optional",
 | 
							drawtype = "allfaces_optional",
 | 
				
			||||||
		tiles = {"bushes_leaves_"..Num..".png"},
 | 
							tiles = {"bushes_leaves_"..Num..".png"},
 | 
				
			||||||
		paramtype = "light",
 | 
							paramtype = "light",
 | 
				
			||||||
		groups = {	-- MM: Should we add leafdecay?	
 | 
							groups = {	-- MM: Should we add leafdecay?
 | 
				
			||||||
			snappy=3,
 | 
								snappy=3,
 | 
				
			||||||
			flammable=2,
 | 
								flammable=2,
 | 
				
			||||||
			attached_node=1
 | 
								attached_node=1
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		sounds = default.node_sound_leaves_defaults(),    
 | 
							sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
	})	
 | 
						})
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract_bushes.grow_bush = function(pos)
 | 
					abstract_bushes.grow_bush = function(pos)
 | 
				
			||||||
	local leaf_type = math.random(1,2)	
 | 
						local leaf_type = math.random(1,2)
 | 
				
			||||||
	local bush_side_height = math.random(0,1)
 | 
						local bush_side_height = math.random(0,1)
 | 
				
			||||||
		local chance_of_bush_node_right = math.random(1,10)
 | 
							local chance_of_bush_node_right = math.random(1,10)
 | 
				
			||||||
		if chance_of_bush_node_right> 5 then
 | 
							if chance_of_bush_node_right> 5 then
 | 
				
			||||||
@@ -146,25 +146,25 @@ abstract_bushes.grow_bush = function(pos)
 | 
				
			|||||||
			bush_side_height = math.random(0,1)
 | 
								bush_side_height = math.random(0,1)
 | 
				
			||||||
			local front_pos = {x=pos.x, y=pos.y+bush_side_height, z=pos.z+1}
 | 
								local front_pos = {x=pos.x, y=pos.y+bush_side_height, z=pos.z+1}
 | 
				
			||||||
			abstract_bushes.grow_bush_node(front_pos,2,leaf_type)
 | 
								abstract_bushes.grow_bush_node(front_pos,2,leaf_type)
 | 
				
			||||||
		end		
 | 
							end
 | 
				
			||||||
		local chance_of_bush_node_back = math.random(1,10)
 | 
							local chance_of_bush_node_back = math.random(1,10)
 | 
				
			||||||
		if chance_of_bush_node_back> 5 then
 | 
							if chance_of_bush_node_back> 5 then
 | 
				
			||||||
			bush_side_height = math.random(0,1)
 | 
								bush_side_height = math.random(0,1)
 | 
				
			||||||
			local back_pos = {x=pos.x, y=pos.y+bush_side_height, z=pos.z-1}
 | 
								local back_pos = {x=pos.x, y=pos.y+bush_side_height, z=pos.z-1}
 | 
				
			||||||
			abstract_bushes.grow_bush_node(back_pos,0,leaf_type)
 | 
								abstract_bushes.grow_bush_node(back_pos,0,leaf_type)
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
		
 | 
					
 | 
				
			||||||
abstract_bushes.grow_bush_node(pos,5,leaf_type)
 | 
					abstract_bushes.grow_bush_node(pos,5,leaf_type)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
 | 
					abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
 | 
						local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
 | 
				
			||||||
	local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
 | 
						local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	local bush_branch_type = 2
 | 
						local bush_branch_type = 2
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	-- MM: I'm not sure if it's slower now than before...
 | 
						-- MM: I'm not sure if it's slower now than before...
 | 
				
			||||||
	if dir ~= 5 and leaf_type == 1 then
 | 
						if dir ~= 5 and leaf_type == 1 then
 | 
				
			||||||
		bush_branch_type = 2
 | 
							bush_branch_type = 2
 | 
				
			||||||
@@ -180,7 +180,7 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
 | 
				
			|||||||
		bush_branch_type = 3
 | 
							bush_branch_type = 3
 | 
				
			||||||
		dir = 1
 | 
							dir = 1
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	if minetest.get_node(right_here).name == "air"  -- instead of check_air = true,
 | 
						if minetest.get_node(right_here).name == "air"  -- instead of check_air = true,
 | 
				
			||||||
	or minetest.get_node(right_here).name == "default:junglegrass" then
 | 
						or minetest.get_node(right_here).name == "default:junglegrass" then
 | 
				
			||||||
		minetest.set_node(right_here, {name="bushes:bushbranches"..bush_branch_type , param2=dir})
 | 
							minetest.set_node(right_here, {name="bushes:bushbranches"..bush_branch_type , param2=dir})
 | 
				
			||||||
@@ -198,7 +198,7 @@ end
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
biome_lib:register_generate_plant({
 | 
					biome_lib:register_generate_plant({
 | 
				
			||||||
    surface = {
 | 
					    surface = {
 | 
				
			||||||
		"default:dirt_with_grass", 
 | 
							"default:dirt_with_grass",
 | 
				
			||||||
		"stoneage:grass_with_silex",
 | 
							"stoneage:grass_with_silex",
 | 
				
			||||||
		"sumpf:peat",
 | 
							"sumpf:peat",
 | 
				
			||||||
		"sumpf:sumpf"
 | 
							"sumpf:sumpf"
 | 
				
			||||||
@@ -209,21 +209,21 @@ biome_lib:register_generate_plant({
 | 
				
			|||||||
	plantlife_limit = -0.9,
 | 
						plantlife_limit = -0.9,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  abstract_bushes.grow_bush
 | 
					  abstract_bushes.grow_bush
 | 
				
			||||||
)		
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 abstract_bushes.grow_youngtree2 = function(pos)
 | 
					 abstract_bushes.grow_youngtree2 = function(pos)
 | 
				
			||||||
	local height = math.random(4,5)	
 | 
						local height = math.random(4,5)
 | 
				
			||||||
	abstract_bushes.grow_youngtree_node2(pos,height)
 | 
						abstract_bushes.grow_youngtree_node2(pos,height)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract_bushes.grow_youngtree_node2 = function(pos, height)
 | 
					abstract_bushes.grow_youngtree_node2 = function(pos, height)
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
 | 
						local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
 | 
				
			||||||
	local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
 | 
						local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
 | 
				
			||||||
	local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
 | 
						local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
 | 
				
			||||||
	local three_above_right_here = {x=pos.x, y=pos.y+4, z=pos.z}
 | 
						local three_above_right_here = {x=pos.x, y=pos.y+4, z=pos.z}
 | 
				
			||||||
	 
 | 
					
 | 
				
			||||||
	if minetest.get_node(right_here).name == "air"  -- instead of check_air = true,
 | 
						if minetest.get_node(right_here).name == "air"  -- instead of check_air = true,
 | 
				
			||||||
	or minetest.get_node(right_here).name == "default:junglegrass" then
 | 
						or minetest.get_node(right_here).name == "default:junglegrass" then
 | 
				
			||||||
		if height == 4 then
 | 
							if height == 4 then
 | 
				
			||||||
@@ -236,14 +236,14 @@ abstract_bushes.grow_youngtree_node2 = function(pos, height)
 | 
				
			|||||||
				minetest.set_node(three_above_right_here, {name="bushes:BushLeaves1" })
 | 
									minetest.set_node(three_above_right_here, {name="bushes:BushLeaves1" })
 | 
				
			||||||
				minetest.set_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
 | 
									minetest.set_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
		 
 | 
					
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
biome_lib:register_generate_plant({
 | 
					biome_lib:register_generate_plant({
 | 
				
			||||||
    surface = {
 | 
					    surface = {
 | 
				
			||||||
		"default:dirt_with_grass", 
 | 
							"default:dirt_with_grass",
 | 
				
			||||||
		"stoneage:grass_with_silex",
 | 
							"stoneage:grass_with_silex",
 | 
				
			||||||
		"sumpf:peat",
 | 
							"sumpf:peat",
 | 
				
			||||||
		"sumpf:sumpf"
 | 
							"sumpf:sumpf"
 | 
				
			||||||
@@ -254,6 +254,6 @@ biome_lib:register_generate_plant({
 | 
				
			|||||||
	plantlife_limit = -0.9,
 | 
						plantlife_limit = -0.9,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  abstract_bushes.grow_youngtree2
 | 
					  abstract_bushes.grow_youngtree2
 | 
				
			||||||
)	
 | 
					)
 | 
				
			||||||
	 
 | 
					
 | 
				
			||||||
		--http://dev.minetest.net/Node_Drawtypes
 | 
							--http://dev.minetest.net/Node_Drawtypes
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
local title		= "Cave Stuff"
 | 
					local title		= "Cave Stuff"
 | 
				
			||||||
local version 	= "0.0.3"
 | 
					local version	= "0.0.3"
 | 
				
			||||||
local mname		= "cavestuff"
 | 
					local mname		= "cavestuff"
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,7 +28,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
 | 
				
			|||||||
						break
 | 
											break
 | 
				
			||||||
					end
 | 
										end
 | 
				
			||||||
				end
 | 
									end
 | 
				
			||||||
				
 | 
					
 | 
				
			||||||
				if ground_y then
 | 
									if ground_y then
 | 
				
			||||||
					local p = {x=x,y=ground_y+1,z=z}
 | 
										local p = {x=x,y=ground_y+1,z=z}
 | 
				
			||||||
					local nn = minetest.get_node(p).name
 | 
										local nn = minetest.get_node(p).name
 | 
				
			||||||
@@ -44,7 +44,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
 | 
				
			|||||||
					    end
 | 
										    end
 | 
				
			||||||
					end
 | 
										end
 | 
				
			||||||
				end
 | 
									end
 | 
				
			||||||
				
 | 
					
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,360 +1,360 @@
 | 
				
			|||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Dry Plants - Recipes 0.1.0 -- Short Grass -> Dirt
 | 
					-- Dry Plants - Recipes 0.1.0 -- Short Grass -> Dirt
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- by Mossmanikin
 | 
					-- by Mossmanikin
 | 
				
			||||||
-- License (everything): 	WTFPL		
 | 
					-- License (everything):	WTFPL
 | 
				
			||||||
-- Looked at code from:		darkage, default, farming, sickle, stairs
 | 
					-- Looked at code from:		darkage, default, farming, sickle, stairs
 | 
				
			||||||
-- Dependencies: 			default, farming
 | 
					-- Dependencies:			default, farming
 | 
				
			||||||
-- Supports:				flint, stoneage, sumpf			
 | 
					-- Supports:				flint, stoneage, sumpf
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Short Grass
 | 
					-- Short Grass
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	output = "default:dirt",
 | 
						output = "default:dirt",
 | 
				
			||||||
	recipe = {
 | 
						recipe = {
 | 
				
			||||||
		{"dryplants:grass_short"},
 | 
							{"dryplants:grass_short"},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Cut Grass
 | 
					-- Cut Grass
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- grass recipes (remove roots)
 | 
					-- grass recipes (remove roots)
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	output = "dryplants:grass",
 | 
						output = "dryplants:grass",
 | 
				
			||||||
	recipe = {
 | 
						recipe = {
 | 
				
			||||||
		{"default:grass_1"},
 | 
							{"default:grass_1"},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	output = "dryplants:grass",
 | 
						output = "dryplants:grass",
 | 
				
			||||||
	recipe = {
 | 
						recipe = {
 | 
				
			||||||
		{"default:junglegrass"},
 | 
							{"default:junglegrass"},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
if minetest.get_modpath("sumpf") ~= nil then
 | 
					if minetest.get_modpath("sumpf") ~= nil then
 | 
				
			||||||
	minetest.register_craft({
 | 
						minetest.register_craft({
 | 
				
			||||||
		output = "dryplants:grass",
 | 
							output = "dryplants:grass",
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{"sumpf:gras"},
 | 
								{"sumpf:gras"},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Sickle
 | 
					-- Sickle
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	output = "dryplants:sickle",
 | 
						output = "dryplants:sickle",
 | 
				
			||||||
	recipe = {
 | 
						recipe = {
 | 
				
			||||||
		{"group:stone",""},
 | 
							{"group:stone",""},
 | 
				
			||||||
		{"", "default:stick"},
 | 
							{"", "default:stick"},
 | 
				
			||||||
		{"default:stick",""}
 | 
							{"default:stick",""}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
if minetest.get_modpath("flint") ~= nil then
 | 
					if minetest.get_modpath("flint") ~= nil then
 | 
				
			||||||
	minetest.register_craft({
 | 
						minetest.register_craft({
 | 
				
			||||||
		output = "dryplants:sickle",
 | 
							output = "dryplants:sickle",
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{"flint:flintstone",""},
 | 
								{"flint:flintstone",""},
 | 
				
			||||||
			{"", "default:stick"},
 | 
								{"", "default:stick"},
 | 
				
			||||||
			{"default:stick",""}
 | 
								{"default:stick",""}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
if minetest.get_modpath("stoneage") ~= nil then
 | 
					if minetest.get_modpath("stoneage") ~= nil then
 | 
				
			||||||
	minetest.register_craft({
 | 
						minetest.register_craft({
 | 
				
			||||||
		output = "dryplants:sickle",
 | 
							output = "dryplants:sickle",
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{"stoneage:silex",""},
 | 
								{"stoneage:silex",""},
 | 
				
			||||||
			{"", "default:stick"},
 | 
								{"", "default:stick"},
 | 
				
			||||||
			{"default:stick",""}
 | 
								{"default:stick",""}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Hay
 | 
					-- Hay
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
--cooking
 | 
					--cooking
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "cooking",
 | 
						type = "cooking",
 | 
				
			||||||
	output = "dryplants:hay",
 | 
						output = "dryplants:hay",
 | 
				
			||||||
	recipe = "dryplants:grass",
 | 
						recipe = "dryplants:grass",
 | 
				
			||||||
	cooktime = 2,
 | 
						cooktime = 2,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "fuel",
 | 
						type = "fuel",
 | 
				
			||||||
	recipe = "dryplants:hay",
 | 
						recipe = "dryplants:hay",
 | 
				
			||||||
	burntime = 1,
 | 
						burntime = 1,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Wet Reed
 | 
					-- Wet Reed
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_craft({ -- papyrus -> wetreed
 | 
					minetest.register_craft({ -- papyrus -> wetreed
 | 
				
			||||||
	output = "dryplants:wetreed 2",
 | 
						output = "dryplants:wetreed 2",
 | 
				
			||||||
	recipe = {
 | 
						recipe = {
 | 
				
			||||||
		{"default:papyrus","default:papyrus"},
 | 
							{"default:papyrus","default:papyrus"},
 | 
				
			||||||
		{"default:papyrus","default:papyrus"},
 | 
							{"default:papyrus","default:papyrus"},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
minetest.register_craft({ -- reedmace_sapling -> wetreed
 | 
					minetest.register_craft({ -- reedmace_sapling -> wetreed
 | 
				
			||||||
	output = "dryplants:wetreed 2",
 | 
						output = "dryplants:wetreed 2",
 | 
				
			||||||
	recipe = {
 | 
						recipe = {
 | 
				
			||||||
		{"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
 | 
							{"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
 | 
				
			||||||
		{"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
 | 
							{"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
minetest.register_craft({ -- reedmace_top -> wetreed
 | 
					minetest.register_craft({ -- reedmace_top -> wetreed
 | 
				
			||||||
	output = "dryplants:wetreed 2",
 | 
						output = "dryplants:wetreed 2",
 | 
				
			||||||
	recipe = {
 | 
						recipe = {
 | 
				
			||||||
		{"dryplants:reedmace_top","dryplants:reedmace_top"},
 | 
							{"dryplants:reedmace_top","dryplants:reedmace_top"},
 | 
				
			||||||
		{"dryplants:reedmace_top","dryplants:reedmace_top"},
 | 
							{"dryplants:reedmace_top","dryplants:reedmace_top"},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
minetest.register_craft({ -- reedmace -> wetreed
 | 
					minetest.register_craft({ -- reedmace -> wetreed
 | 
				
			||||||
	output = "dryplants:wetreed 2",
 | 
						output = "dryplants:wetreed 2",
 | 
				
			||||||
	recipe = {
 | 
						recipe = {
 | 
				
			||||||
		{"dryplants:reedmace","dryplants:reedmace"},
 | 
							{"dryplants:reedmace","dryplants:reedmace"},
 | 
				
			||||||
		{"dryplants:reedmace","dryplants:reedmace"},
 | 
							{"dryplants:reedmace","dryplants:reedmace"},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
minetest.register_craft({ -- reedmace_bottom -> wetreed
 | 
					minetest.register_craft({ -- reedmace_bottom -> wetreed
 | 
				
			||||||
	output = "dryplants:wetreed 2",
 | 
						output = "dryplants:wetreed 2",
 | 
				
			||||||
	recipe = {
 | 
						recipe = {
 | 
				
			||||||
		{"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
 | 
							{"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
 | 
				
			||||||
		{"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
 | 
							{"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
local ReeD = {
 | 
					local ReeD = {
 | 
				
			||||||
	{"wetreed"},
 | 
						{"wetreed"},
 | 
				
			||||||
	{"reed"}
 | 
						{"reed"}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
for i in pairs(ReeD) do
 | 
					for i in pairs(ReeD) do
 | 
				
			||||||
	local reed = "dryplants:"..ReeD[i][1]
 | 
						local reed = "dryplants:"..ReeD[i][1]
 | 
				
			||||||
	local slab = reed.."_slab"
 | 
						local slab = reed.."_slab"
 | 
				
			||||||
	local roof = reed.."_roof"
 | 
						local roof = reed.."_roof"
 | 
				
			||||||
	local corner = roof.."_corner"
 | 
						local corner = roof.."_corner"
 | 
				
			||||||
	local corner_2 = corner.."_2"
 | 
						local corner_2 = corner.."_2"
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Block
 | 
					-- Block
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
	minetest.register_craft({ -- slab -> block
 | 
						minetest.register_craft({ -- slab -> block
 | 
				
			||||||
		output = reed,
 | 
							output = reed,
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{slab},
 | 
								{slab},
 | 
				
			||||||
			{slab},
 | 
								{slab},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	minetest.register_craft({ -- roof -> block
 | 
						minetest.register_craft({ -- roof -> block
 | 
				
			||||||
		output = reed,
 | 
							output = reed,
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{roof},
 | 
								{roof},
 | 
				
			||||||
			{roof},
 | 
								{roof},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	minetest.register_craft({ -- corner -> block
 | 
						minetest.register_craft({ -- corner -> block
 | 
				
			||||||
		type = "shapeless",
 | 
							type = "shapeless",
 | 
				
			||||||
		output = reed.." 3",
 | 
							output = reed.." 3",
 | 
				
			||||||
		recipe = {corner,corner,corner,corner,corner,corner,corner,corner}, -- 8x
 | 
							recipe = {corner,corner,corner,corner,corner,corner,corner,corner}, -- 8x
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	minetest.register_craft({ -- corner_2 -> block
 | 
						minetest.register_craft({ -- corner_2 -> block
 | 
				
			||||||
		type = "shapeless",
 | 
							type = "shapeless",
 | 
				
			||||||
		output = reed.." 3",
 | 
							output = reed.." 3",
 | 
				
			||||||
		recipe = {corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2}, -- 8x
 | 
							recipe = {corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2}, -- 8x
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Slab
 | 
					-- Slab
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
	minetest.register_craft({ -- block -> slab
 | 
						minetest.register_craft({ -- block -> slab
 | 
				
			||||||
		output = slab.." 6",
 | 
							output = slab.." 6",
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{reed,reed,reed},
 | 
								{reed,reed,reed},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	minetest.register_craft({ -- roof -> slab
 | 
						minetest.register_craft({ -- roof -> slab
 | 
				
			||||||
		output = slab,
 | 
							output = slab,
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{roof},
 | 
								{roof},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	minetest.register_craft({ -- corner -> slab
 | 
						minetest.register_craft({ -- corner -> slab
 | 
				
			||||||
		output = slab.." 3",
 | 
							output = slab.." 3",
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{corner,corner},
 | 
								{corner,corner},
 | 
				
			||||||
			{corner,corner},
 | 
								{corner,corner},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	minetest.register_craft({ -- corner_2 -> slab
 | 
						minetest.register_craft({ -- corner_2 -> slab
 | 
				
			||||||
		output = slab.." 3",
 | 
							output = slab.." 3",
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{corner_2,corner_2},
 | 
								{corner_2,corner_2},
 | 
				
			||||||
			{corner_2,corner_2},
 | 
								{corner_2,corner_2},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Roof
 | 
					-- Roof
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
	minetest.register_craft({ -- block -> roof
 | 
						minetest.register_craft({ -- block -> roof
 | 
				
			||||||
		output = roof.." 4",
 | 
							output = roof.." 4",
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{reed,""},
 | 
								{reed,""},
 | 
				
			||||||
			{"",reed},
 | 
								{"",reed},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	minetest.register_craft({ -- block -> roof
 | 
						minetest.register_craft({ -- block -> roof
 | 
				
			||||||
		output = roof.." 4",
 | 
							output = roof.." 4",
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{"",reed},
 | 
								{"",reed},
 | 
				
			||||||
			{reed,""},
 | 
								{reed,""},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	minetest.register_craft({ -- slab -> roof
 | 
						minetest.register_craft({ -- slab -> roof
 | 
				
			||||||
		output = roof,
 | 
							output = roof,
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{slab},
 | 
								{slab},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})	
 | 
						})
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Roof Corner
 | 
					-- Roof Corner
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
	minetest.register_craft({ -- block -> corner
 | 
						minetest.register_craft({ -- block -> corner
 | 
				
			||||||
		output = corner.." 8",
 | 
							output = corner.." 8",
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{"",reed,""},
 | 
								{"",reed,""},
 | 
				
			||||||
			{reed,"",reed},
 | 
								{reed,"",reed},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	minetest.register_craft({ -- corner_2 -> corner
 | 
						minetest.register_craft({ -- corner_2 -> corner
 | 
				
			||||||
		output = corner,
 | 
							output = corner,
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{corner_2},
 | 
								{corner_2},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Roof Corner 2
 | 
					-- Roof Corner 2
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
	minetest.register_craft({ -- block -> corner_2
 | 
						minetest.register_craft({ -- block -> corner_2
 | 
				
			||||||
		output = corner_2.." 8",
 | 
							output = corner_2.." 8",
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{reed,"",reed},
 | 
								{reed,"",reed},
 | 
				
			||||||
			{"",reed,""},
 | 
								{"",reed,""},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	minetest.register_craft({ -- corner -> corner_2
 | 
						minetest.register_craft({ -- corner -> corner_2
 | 
				
			||||||
		output = corner_2,
 | 
							output = corner_2,
 | 
				
			||||||
		recipe = {
 | 
							recipe = {
 | 
				
			||||||
			{corner},
 | 
								{corner},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Reed
 | 
					-- Reed
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_craft({ -- hay -> reed
 | 
					minetest.register_craft({ -- hay -> reed
 | 
				
			||||||
	output = "dryplants:reed 2",
 | 
						output = "dryplants:reed 2",
 | 
				
			||||||
	recipe = {
 | 
						recipe = {
 | 
				
			||||||
		{"dryplants:hay","dryplants:hay"},
 | 
							{"dryplants:hay","dryplants:hay"},
 | 
				
			||||||
		{"dryplants:hay","dryplants:hay"},
 | 
							{"dryplants:hay","dryplants:hay"},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
--cooking
 | 
					--cooking
 | 
				
			||||||
minetest.register_craft({ -- wetreed -> reed
 | 
					minetest.register_craft({ -- wetreed -> reed
 | 
				
			||||||
	type = "cooking",
 | 
						type = "cooking",
 | 
				
			||||||
	output = "dryplants:reed",
 | 
						output = "dryplants:reed",
 | 
				
			||||||
	recipe = "dryplants:wetreed",
 | 
						recipe = "dryplants:wetreed",
 | 
				
			||||||
	cooktime = 2,
 | 
						cooktime = 2,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
--fuel
 | 
					--fuel
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "fuel",
 | 
						type = "fuel",
 | 
				
			||||||
	recipe = "dryplants:reed",
 | 
						recipe = "dryplants:reed",
 | 
				
			||||||
	burntime = 4,
 | 
						burntime = 4,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Reed Slab
 | 
					-- Reed Slab
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
--cooking
 | 
					--cooking
 | 
				
			||||||
minetest.register_craft({ -- wetreed_slab -> reed_slab
 | 
					minetest.register_craft({ -- wetreed_slab -> reed_slab
 | 
				
			||||||
	type = "cooking",
 | 
						type = "cooking",
 | 
				
			||||||
	output = "dryplants:reed_slab",
 | 
						output = "dryplants:reed_slab",
 | 
				
			||||||
	recipe = "dryplants:wetreed_slab",
 | 
						recipe = "dryplants:wetreed_slab",
 | 
				
			||||||
	cooktime = 1,
 | 
						cooktime = 1,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
--fuel
 | 
					--fuel
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "fuel",
 | 
						type = "fuel",
 | 
				
			||||||
	recipe = "dryplants:reed_slab",
 | 
						recipe = "dryplants:reed_slab",
 | 
				
			||||||
	burntime = 2,
 | 
						burntime = 2,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Reed Roof
 | 
					-- Reed Roof
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
--cooking
 | 
					--cooking
 | 
				
			||||||
minetest.register_craft({ -- wetreed_roof -> reed_roof
 | 
					minetest.register_craft({ -- wetreed_roof -> reed_roof
 | 
				
			||||||
	type = "cooking",
 | 
						type = "cooking",
 | 
				
			||||||
	output = "dryplants:reed_roof",
 | 
						output = "dryplants:reed_roof",
 | 
				
			||||||
	recipe = "dryplants:wetreed_roof",
 | 
						recipe = "dryplants:wetreed_roof",
 | 
				
			||||||
	cooktime = 1,
 | 
						cooktime = 1,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
--fuel
 | 
					--fuel
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "fuel",
 | 
						type = "fuel",
 | 
				
			||||||
	recipe = "dryplants:reed_roof",
 | 
						recipe = "dryplants:reed_roof",
 | 
				
			||||||
	burntime = 2,
 | 
						burntime = 2,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Reed Roof Corner
 | 
					-- Reed Roof Corner
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
--cooking
 | 
					--cooking
 | 
				
			||||||
minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
 | 
					minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
 | 
				
			||||||
	type = "cooking",
 | 
						type = "cooking",
 | 
				
			||||||
	output = "dryplants:reed_roof_corner",
 | 
						output = "dryplants:reed_roof_corner",
 | 
				
			||||||
	recipe = "dryplants:wetreed_roof_corner",
 | 
						recipe = "dryplants:wetreed_roof_corner",
 | 
				
			||||||
	cooktime = 1,
 | 
						cooktime = 1,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
--fuel
 | 
					--fuel
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "fuel",
 | 
						type = "fuel",
 | 
				
			||||||
	recipe = "dryplants:reed_roof_corner",
 | 
						recipe = "dryplants:reed_roof_corner",
 | 
				
			||||||
	burntime = 2,
 | 
						burntime = 2,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Wet Reed Roof Corner 2
 | 
					-- Wet Reed Roof Corner 2
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
--cooking
 | 
					--cooking
 | 
				
			||||||
minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
 | 
					minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
 | 
				
			||||||
	type = "cooking",
 | 
						type = "cooking",
 | 
				
			||||||
	output = "dryplants:reed_roof_corner_2",
 | 
						output = "dryplants:reed_roof_corner_2",
 | 
				
			||||||
	recipe = "dryplants:wetreed_roof_corner_2",
 | 
						recipe = "dryplants:wetreed_roof_corner_2",
 | 
				
			||||||
	cooktime = 1,
 | 
						cooktime = 1,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
--fuel
 | 
					--fuel
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "fuel",
 | 
						type = "fuel",
 | 
				
			||||||
	recipe = "dryplants:reed_roof_corner_2",
 | 
						recipe = "dryplants:reed_roof_corner_2",
 | 
				
			||||||
	burntime = 2,
 | 
						burntime = 2,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Dandelion Leave 
 | 
					-- Dandelion Leave
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
--[[minetest.register_craftitem("dryplants:dandelion_leave", {
 | 
					--[[minetest.register_craftitem("dryplants:dandelion_leave", {
 | 
				
			||||||
	description = "Dandelion Leave",
 | 
						description = "Dandelion Leave",
 | 
				
			||||||
	inventory_image = "dryplants_dandelion_leave.png",
 | 
						inventory_image = "dryplants_dandelion_leave.png",
 | 
				
			||||||
	on_use = minetest.item_eat(1),
 | 
						on_use = minetest.item_eat(1),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "shapeless",
 | 
						type = "shapeless",
 | 
				
			||||||
	output = "dryplants:dandelion_leave 4",
 | 
						output = "dryplants:dandelion_leave 4",
 | 
				
			||||||
	recipe = {"flowers:dandelion_yellow"},
 | 
						recipe = {"flowers:dandelion_yellow"},
 | 
				
			||||||
	replacements = {
 | 
						replacements = {
 | 
				
			||||||
		{"flowers:dandelion_yellow", "dye:yellow"}
 | 
							{"flowers:dandelion_yellow", "dye:yellow"}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
})]]
 | 
					})]]
 | 
				
			||||||
@@ -1,206 +1,206 @@
 | 
				
			|||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
local title		= "Grasses" -- former "Dry plants"
 | 
					local title		= "Grasses" -- former "Dry plants"
 | 
				
			||||||
local version 	= "0.1.5"
 | 
					local version	= "0.1.5"
 | 
				
			||||||
local mname		= "dryplants"
 | 
					local mname		= "dryplants"
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- by Mossmanikin
 | 
					-- by Mossmanikin
 | 
				
			||||||
-- textures & ideas partly by Neuromancer
 | 
					-- textures & ideas partly by Neuromancer
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- License (everything): 	WTFPL
 | 
					-- License (everything):	WTFPL
 | 
				
			||||||
-- Contains code from: 		default, farming
 | 
					-- Contains code from:		default, farming
 | 
				
			||||||
-- Looked at code from:		darkage, sickle, stairs
 | 
					-- Looked at code from:		darkage, sickle, stairs
 | 
				
			||||||
-- Dependencies: 			default, farming, biome_lib
 | 
					-- Dependencies:			default, farming, biome_lib
 | 
				
			||||||
-- Supports:
 | 
					-- Supports:
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
abstract_dryplants = {}
 | 
					abstract_dryplants = {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- support for i18n
 | 
					-- support for i18n
 | 
				
			||||||
local S = plantlife_i18n.gettext
 | 
					local S = plantlife_i18n.gettext
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dofile(minetest.get_modpath("dryplants").."/crafting.lua")
 | 
					dofile(minetest.get_modpath("dryplants").."/crafting.lua")
 | 
				
			||||||
dofile(minetest.get_modpath("dryplants").."/settings.txt")
 | 
					dofile(minetest.get_modpath("dryplants").."/settings.txt")
 | 
				
			||||||
dofile(minetest.get_modpath("dryplants").."/reed.lua")
 | 
					dofile(minetest.get_modpath("dryplants").."/reed.lua")
 | 
				
			||||||
if REEDMACE_GENERATES == true then
 | 
					if REEDMACE_GENERATES == true then
 | 
				
			||||||
dofile(minetest.get_modpath("dryplants").."/reedmace.lua")
 | 
					dofile(minetest.get_modpath("dryplants").."/reedmace.lua")
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
if SMALL_JUNCUS_GENERATES == true then
 | 
					if SMALL_JUNCUS_GENERATES == true then
 | 
				
			||||||
dofile(minetest.get_modpath("dryplants").."/juncus.lua")
 | 
					dofile(minetest.get_modpath("dryplants").."/juncus.lua")
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
if EXTRA_TALL_GRASS_GENERATES == true then
 | 
					if EXTRA_TALL_GRASS_GENERATES == true then
 | 
				
			||||||
dofile(minetest.get_modpath("dryplants").."/moregrass.lua")
 | 
					dofile(minetest.get_modpath("dryplants").."/moregrass.lua")
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
--dofile(minetest.get_modpath("dryplants").."/meadowvariation.lua")
 | 
					--dofile(minetest.get_modpath("dryplants").."/meadowvariation.lua")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Sickle
 | 
					-- Sickle
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
local function sickle_can_break(pos, deff, player)
 | 
					local function sickle_can_break(pos, deff, player)
 | 
				
			||||||
	local def = ItemStack({name=deff.name}):get_definition()
 | 
						local def = ItemStack({name=deff.name}):get_definition()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if not def.diggable or (def.can_dig and not def.can_dig(pos,player)) then
 | 
						if not def.diggable or (def.can_dig and not def.can_dig(pos,player)) then
 | 
				
			||||||
		minetest.log("info", player:get_player_name() .. " tried to sickle "
 | 
							minetest.log("info", player:get_player_name() .. " tried to sickle "
 | 
				
			||||||
		.. def.name .. " which is not diggable "
 | 
							.. def.name .. " which is not diggable "
 | 
				
			||||||
		.. minetest.pos_to_string(pos))
 | 
							.. minetest.pos_to_string(pos))
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if minetest.is_protected(pos, player:get_player_name()) then
 | 
						if minetest.is_protected(pos, player:get_player_name()) then
 | 
				
			||||||
		minetest.log("action", player:get_player_name()
 | 
							minetest.log("action", player:get_player_name()
 | 
				
			||||||
			.. " tried to sickle " .. def.name
 | 
								.. " tried to sickle " .. def.name
 | 
				
			||||||
			.. " at protected position "
 | 
								.. " at protected position "
 | 
				
			||||||
			.. minetest.pos_to_string(pos))
 | 
								.. minetest.pos_to_string(pos))
 | 
				
			||||||
		minetest.record_protection_violation(pos, player:get_player_name())
 | 
							minetest.record_protection_violation(pos, player:get_player_name())
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return true
 | 
						return true
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
-- turns nodes with group flora=1 & flower=0 into cut grass
 | 
					-- turns nodes with group flora=1 & flower=0 into cut grass
 | 
				
			||||||
local function sickle_on_use(itemstack, user, pointed_thing, uses)
 | 
					local function sickle_on_use(itemstack, user, pointed_thing, uses)
 | 
				
			||||||
	local pt = pointed_thing
 | 
						local pt = pointed_thing
 | 
				
			||||||
	-- check if pointing at a node
 | 
						-- check if pointing at a node
 | 
				
			||||||
	if not pt then
 | 
						if not pt then
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
	if pt.type ~= "node" then
 | 
						if pt.type ~= "node" then
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	local under = minetest.get_node(pt.under)
 | 
						local under = minetest.get_node(pt.under)
 | 
				
			||||||
	local above_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
 | 
						local above_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
 | 
				
			||||||
	local above = minetest.get_node(above_pos)
 | 
						local above = minetest.get_node(above_pos)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	-- return if any of the nodes is not registered
 | 
						-- return if any of the nodes is not registered
 | 
				
			||||||
	if not minetest.registered_nodes[under.name] then
 | 
						if not minetest.registered_nodes[under.name] then
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
	if not minetest.registered_nodes[above.name] then
 | 
						if not minetest.registered_nodes[above.name] then
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if not sickle_can_break(pt.under, under, user) then
 | 
						if not sickle_can_break(pt.under, under, user) then
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
	-- check if something that can be cut using fine tools
 | 
						-- check if something that can be cut using fine tools
 | 
				
			||||||
	if minetest.get_item_group(under.name, "snappy") > 0 then
 | 
						if minetest.get_item_group(under.name, "snappy") > 0 then
 | 
				
			||||||
		-- check if flora but no flower
 | 
							-- check if flora but no flower
 | 
				
			||||||
		if minetest.get_item_group(under.name, "flora") == 1 and minetest.get_item_group(under.name, "flower") == 0 then
 | 
							if minetest.get_item_group(under.name, "flora") == 1 and minetest.get_item_group(under.name, "flower") == 0 then
 | 
				
			||||||
			-- turn the node into cut grass, wear out item and play sound
 | 
								-- turn the node into cut grass, wear out item and play sound
 | 
				
			||||||
			minetest.set_node(pt.under, {name="dryplants:grass"})
 | 
								minetest.set_node(pt.under, {name="dryplants:grass"})
 | 
				
			||||||
		else -- otherwise dig the node
 | 
							else -- otherwise dig the node
 | 
				
			||||||
			if not minetest.node_dig(pt.under, under, user) then
 | 
								if not minetest.node_dig(pt.under, under, user) then
 | 
				
			||||||
				return
 | 
									return
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
		minetest.sound_play("default_dig_crumbly", {
 | 
							minetest.sound_play("default_dig_crumbly", {
 | 
				
			||||||
			pos = pt.under,
 | 
								pos = pt.under,
 | 
				
			||||||
			gain = 0.5,
 | 
								gain = 0.5,
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
		itemstack:add_wear(65535/(uses-1))
 | 
							itemstack:add_wear(65535/(uses-1))
 | 
				
			||||||
		return itemstack
 | 
							return itemstack
 | 
				
			||||||
	elseif string.find(under.name, "default:dirt_with_grass") then
 | 
						elseif string.find(under.name, "default:dirt_with_grass") then
 | 
				
			||||||
		if minetest.is_protected(above_pos, user:get_player_name()) or above.name ~= "air" then
 | 
							if minetest.is_protected(above_pos, user:get_player_name()) or above.name ~= "air" then
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
		minetest.set_node(pt.under, {name="dryplants:grass_short"})
 | 
							minetest.set_node(pt.under, {name="dryplants:grass_short"})
 | 
				
			||||||
		minetest.set_node(above_pos, {name="dryplants:grass"})
 | 
							minetest.set_node(above_pos, {name="dryplants:grass"})
 | 
				
			||||||
		minetest.sound_play("default_dig_crumbly", {
 | 
							minetest.sound_play("default_dig_crumbly", {
 | 
				
			||||||
			pos = pt.under,
 | 
								pos = pt.under,
 | 
				
			||||||
			gain = 0.5,
 | 
								gain = 0.5,
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
		itemstack:add_wear(65535/(uses-1))
 | 
							itemstack:add_wear(65535/(uses-1))
 | 
				
			||||||
		return itemstack
 | 
							return itemstack
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
-- the tool
 | 
					-- the tool
 | 
				
			||||||
minetest.register_tool("dryplants:sickle", {
 | 
					minetest.register_tool("dryplants:sickle", {
 | 
				
			||||||
	description = S("Sickle"),
 | 
						description = S("Sickle"),
 | 
				
			||||||
	inventory_image = "dryplants_sickle.png",
 | 
						inventory_image = "dryplants_sickle.png",
 | 
				
			||||||
	on_use = function(itemstack, user, pointed_thing)
 | 
						on_use = function(itemstack, user, pointed_thing)
 | 
				
			||||||
		return sickle_on_use(itemstack, user, pointed_thing, 220)
 | 
							return sickle_on_use(itemstack, user, pointed_thing, 220)
 | 
				
			||||||
	end,
 | 
						end,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Cut Grass
 | 
					-- Cut Grass
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_node("dryplants:grass", {
 | 
					minetest.register_node("dryplants:grass", {
 | 
				
			||||||
	description = S("Cut Grass"),
 | 
						description = S("Cut Grass"),
 | 
				
			||||||
	inventory_image = "dryplants_grass.png",
 | 
						inventory_image = "dryplants_grass.png",
 | 
				
			||||||
	wield_image = "dryplants_grass.png",
 | 
						wield_image = "dryplants_grass.png",
 | 
				
			||||||
	paramtype = "light",
 | 
						paramtype = "light",
 | 
				
			||||||
	sunlight_propagates = true,
 | 
						sunlight_propagates = true,
 | 
				
			||||||
	tiles = {"dryplants_grass.png"},
 | 
						tiles = {"dryplants_grass.png"},
 | 
				
			||||||
	drawtype = "nodebox",
 | 
						drawtype = "nodebox",
 | 
				
			||||||
	node_box = {
 | 
						node_box = {
 | 
				
			||||||
	    type = "fixed",
 | 
						    type = "fixed",
 | 
				
			||||||
        fixed = {-0.5   , -0.5   , -0.5   ,   0.5   , -0.4375,  0.5   },
 | 
					        fixed = {-0.5   , -0.5   , -0.5   ,   0.5   , -0.4375,  0.5   },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
	groups = {snappy=3, flammable=2},
 | 
						groups = {snappy=3, flammable=2},
 | 
				
			||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Cut Grass becomes Hay over time
 | 
					-- Cut Grass becomes Hay over time
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_abm({
 | 
					minetest.register_abm({
 | 
				
			||||||
	nodenames = {"dryplants:grass"},
 | 
						nodenames = {"dryplants:grass"},
 | 
				
			||||||
	interval = HAY_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
 | 
						interval = HAY_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
 | 
				
			||||||
	chance = 1,
 | 
						chance = 1,
 | 
				
			||||||
	action = function(pos)
 | 
						action = function(pos)
 | 
				
			||||||
		minetest.set_node(pos, {name="dryplants:hay"})
 | 
							minetest.set_node(pos, {name="dryplants:hay"})
 | 
				
			||||||
	end,
 | 
						end,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Hay
 | 
					-- Hay
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_node("dryplants:hay", {
 | 
					minetest.register_node("dryplants:hay", {
 | 
				
			||||||
	description = S("Hay"),
 | 
						description = S("Hay"),
 | 
				
			||||||
	inventory_image = "dryplants_hay.png",
 | 
						inventory_image = "dryplants_hay.png",
 | 
				
			||||||
	wield_image = "dryplants_hay.png",
 | 
						wield_image = "dryplants_hay.png",
 | 
				
			||||||
	paramtype = "light",
 | 
						paramtype = "light",
 | 
				
			||||||
	sunlight_propagates = true,
 | 
						sunlight_propagates = true,
 | 
				
			||||||
	tiles = {"dryplants_hay.png"},
 | 
						tiles = {"dryplants_hay.png"},
 | 
				
			||||||
	drawtype = "nodebox",
 | 
						drawtype = "nodebox",
 | 
				
			||||||
	node_box = {
 | 
						node_box = {
 | 
				
			||||||
	    type = "fixed",
 | 
						    type = "fixed",
 | 
				
			||||||
        fixed = {-0.5   , -0.5   , -0.5   ,   0.5   , -0.4375,  0.5   },
 | 
					        fixed = {-0.5   , -0.5   , -0.5   ,   0.5   , -0.4375,  0.5   },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
	groups = {snappy=3, flammable=2},
 | 
						groups = {snappy=3, flammable=2},
 | 
				
			||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Short Grass
 | 
					-- Short Grass
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_node("dryplants:grass_short", {
 | 
					minetest.register_node("dryplants:grass_short", {
 | 
				
			||||||
	description = S("Short Grass"),
 | 
						description = S("Short Grass"),
 | 
				
			||||||
	tiles = {"default_grass.png^dryplants_grass_short.png", "default_dirt.png", "default_dirt.png^default_grass_side.png^dryplants_grass_short_side.png"},
 | 
						tiles = {"default_grass.png^dryplants_grass_short.png", "default_dirt.png", "default_dirt.png^default_grass_side.png^dryplants_grass_short_side.png"},
 | 
				
			||||||
	is_ground_content = true,
 | 
						is_ground_content = true,
 | 
				
			||||||
	groups = {crumbly=3,soil=1,not_in_creative_inventory=1},
 | 
						groups = {crumbly=3,soil=1,not_in_creative_inventory=1},
 | 
				
			||||||
	--drop = 'default:dirt',
 | 
						--drop = 'default:dirt',
 | 
				
			||||||
	sounds = default.node_sound_dirt_defaults({
 | 
						sounds = default.node_sound_dirt_defaults({
 | 
				
			||||||
		footstep = {name="default_grass_footstep", gain=0.4},
 | 
							footstep = {name="default_grass_footstep", gain=0.4},
 | 
				
			||||||
	}),
 | 
						}),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Short Grass becomes Dirt with Grass over time
 | 
					-- Short Grass becomes Dirt with Grass over time
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_abm({
 | 
					minetest.register_abm({
 | 
				
			||||||
	nodenames = {"dryplants:grass_short"},
 | 
						nodenames = {"dryplants:grass_short"},
 | 
				
			||||||
	interval = GRASS_REGROWING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
 | 
						interval = GRASS_REGROWING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
 | 
				
			||||||
	chance = 100/GRASS_REGROWING_CHANCE,
 | 
						chance = 100/GRASS_REGROWING_CHANCE,
 | 
				
			||||||
	action = function(pos)
 | 
						action = function(pos)
 | 
				
			||||||
		-- Only become dirt with grass if no cut grass or hay lies on top
 | 
							-- Only become dirt with grass if no cut grass or hay lies on top
 | 
				
			||||||
		local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
 | 
							local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
 | 
				
			||||||
		if above.name ~= "dryplants:grass" and above.name ~= "dryplants:hay" then
 | 
							if above.name ~= "dryplants:grass" and above.name ~= "dryplants:hay" then
 | 
				
			||||||
			minetest.set_node(pos, {name="default:dirt_with_grass"})
 | 
								minetest.set_node(pos, {name="default:dirt_with_grass"})
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
	end,
 | 
						end,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
 | 
					print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,8 +4,8 @@
 | 
				
			|||||||
-- by Mossmanikin
 | 
					-- by Mossmanikin
 | 
				
			||||||
-- textures & ideas partly by Neuromancer
 | 
					-- textures & ideas partly by Neuromancer
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- License (everything): 	WTFPL
 | 
					-- License (everything):	WTFPL
 | 
				
			||||||
-- Contains code from: 		biome_lib
 | 
					-- Contains code from:		biome_lib
 | 
				
			||||||
-- Looked at code from:		default
 | 
					-- Looked at code from:		default
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,9 +3,9 @@
 | 
				
			|||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- by Mossmanikin
 | 
					-- by Mossmanikin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- License (everything): 	WTFPL
 | 
					-- License (everything):	WTFPL
 | 
				
			||||||
-- Contains code from: 		biome_lib
 | 
					-- Contains code from:		biome_lib
 | 
				
			||||||
-- Looked at code from:		default				
 | 
					-- Looked at code from:		default
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract_dryplants.grow_grass_variation = function(pos)
 | 
					abstract_dryplants.grow_grass_variation = function(pos)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,33 +1,33 @@
 | 
				
			|||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Grasses - More Tall Grass 0.0.2
 | 
					-- Grasses - More Tall Grass 0.0.2
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- by Mossmanikin
 | 
					-- by Mossmanikin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- License (everything): 	WTFPL
 | 
					-- License (everything):	WTFPL
 | 
				
			||||||
-- Contains code from: 		biome_lib
 | 
					-- Contains code from:		biome_lib
 | 
				
			||||||
-- Looked at code from:		default				
 | 
					-- Looked at code from:		default
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract_dryplants.grow_grass = function(pos)
 | 
					abstract_dryplants.grow_grass = function(pos)
 | 
				
			||||||
	local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
 | 
						local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
 | 
				
			||||||
	local grass_size = math.random(1,5)
 | 
						local grass_size = math.random(1,5)
 | 
				
			||||||
	if minetest.get_node(right_here).name == "air"  -- instead of check_air = true,
 | 
						if minetest.get_node(right_here).name == "air"  -- instead of check_air = true,
 | 
				
			||||||
	or minetest.get_node(right_here).name == "default:junglegrass" then
 | 
						or minetest.get_node(right_here).name == "default:junglegrass" then
 | 
				
			||||||
		minetest.set_node(right_here, {name="default:grass_"..grass_size})
 | 
							minetest.set_node(right_here, {name="default:grass_"..grass_size})
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
biome_lib:register_generate_plant({
 | 
					biome_lib:register_generate_plant({
 | 
				
			||||||
    surface = {
 | 
					    surface = {
 | 
				
			||||||
		"default:dirt_with_grass",
 | 
							"default:dirt_with_grass",
 | 
				
			||||||
		"stoneage:grass_with_silex",
 | 
							"stoneage:grass_with_silex",
 | 
				
			||||||
		"sumpf:peat",
 | 
							"sumpf:peat",
 | 
				
			||||||
		"sumpf:sumpf"
 | 
							"sumpf:sumpf"
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
    max_count = TALL_GRASS_PER_MAPBLOCK,
 | 
					    max_count = TALL_GRASS_PER_MAPBLOCK,
 | 
				
			||||||
    rarity = 101 - TALL_GRASS_RARITY,
 | 
					    rarity = 101 - TALL_GRASS_RARITY,
 | 
				
			||||||
    min_elevation = 1, -- above sea level
 | 
					    min_elevation = 1, -- above sea level
 | 
				
			||||||
	plantlife_limit = -0.9,
 | 
						plantlife_limit = -0.9,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  abstract_dryplants.grow_grass
 | 
					  abstract_dryplants.grow_grass
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,383 +1,383 @@
 | 
				
			|||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Dry Plants - Reed 0.0.5
 | 
					-- Dry Plants - Reed 0.0.5
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- by Mossmanikin
 | 
					-- by Mossmanikin
 | 
				
			||||||
-- License (everything): 	WTFPL
 | 
					-- License (everything):	WTFPL
 | 
				
			||||||
-- Looked at code from:		darkage, default, stairs
 | 
					-- Looked at code from:		darkage, default, stairs
 | 
				
			||||||
-- Dependencies: 			default
 | 
					-- Dependencies:			default
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- support for i18n
 | 
					-- support for i18n
 | 
				
			||||||
local S = plantlife_i18n.gettext
 | 
					local S = plantlife_i18n.gettext
 | 
				
			||||||
 | 
					
 | 
				
			||||||
minetest.register_alias("stairs:stair_wetreed",				"dryplants:wetreed_roof")
 | 
					minetest.register_alias("stairs:stair_wetreed",				"dryplants:wetreed_roof")
 | 
				
			||||||
minetest.register_alias("stairs:slab_wetreed",				"dryplants:wetreed_slab")
 | 
					minetest.register_alias("stairs:slab_wetreed",				"dryplants:wetreed_slab")
 | 
				
			||||||
minetest.register_alias("stairs:stair_reed",				"dryplants:reed_roof")
 | 
					minetest.register_alias("stairs:stair_reed",				"dryplants:reed_roof")
 | 
				
			||||||
minetest.register_alias("stairs:slab_reed",					"dryplants:reed_slab")
 | 
					minetest.register_alias("stairs:slab_reed",					"dryplants:reed_slab")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Wet Reed
 | 
					-- Wet Reed
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_node("dryplants:wetreed", {
 | 
					minetest.register_node("dryplants:wetreed", {
 | 
				
			||||||
	description = S("Wet Reed"),
 | 
						description = S("Wet Reed"),
 | 
				
			||||||
	paramtype = "light",
 | 
						paramtype = "light",
 | 
				
			||||||
	paramtype2 = "facedir",
 | 
						paramtype2 = "facedir",
 | 
				
			||||||
	tiles = {"dryplants_reed_wet.png"},
 | 
						tiles = {"dryplants_reed_wet.png"},
 | 
				
			||||||
	groups = {snappy=3, flammable=2},
 | 
						groups = {snappy=3, flammable=2},
 | 
				
			||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Wet Reed Slab
 | 
					-- Wet Reed Slab
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_node("dryplants:wetreed_slab", {
 | 
					minetest.register_node("dryplants:wetreed_slab", {
 | 
				
			||||||
	description = S("Wet Reed Slab"),
 | 
						description = S("Wet Reed Slab"),
 | 
				
			||||||
	drawtype = "nodebox",
 | 
						drawtype = "nodebox",
 | 
				
			||||||
	paramtype = "light",
 | 
						paramtype = "light",
 | 
				
			||||||
	paramtype2 = "facedir",
 | 
						paramtype2 = "facedir",
 | 
				
			||||||
	tiles = {"dryplants_reed_wet.png"},
 | 
						tiles = {"dryplants_reed_wet.png"},
 | 
				
			||||||
	node_box = {
 | 
						node_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
		fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
 | 
							fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	selection_box = {
 | 
						selection_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
		fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
 | 
							fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	groups = {snappy=3, flammable=2},
 | 
						groups = {snappy=3, flammable=2},
 | 
				
			||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Wet Reed Roof
 | 
					-- Wet Reed Roof
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_node("dryplants:wetreed_roof", {
 | 
					minetest.register_node("dryplants:wetreed_roof", {
 | 
				
			||||||
	description = S("Wet Reed Roof"),
 | 
						description = S("Wet Reed Roof"),
 | 
				
			||||||
	drawtype = "nodebox",
 | 
						drawtype = "nodebox",
 | 
				
			||||||
	paramtype = "light",
 | 
						paramtype = "light",
 | 
				
			||||||
	paramtype2 = "facedir",
 | 
						paramtype2 = "facedir",
 | 
				
			||||||
	tiles = {"dryplants_reed_wet.png"},
 | 
						tiles = {"dryplants_reed_wet.png"},
 | 
				
			||||||
	node_box = {
 | 
						node_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
--				{ left	, bottom , front  ,  right ,  top   ,  back  }
 | 
					--				{ left	, bottom , front  ,  right ,  top   ,  back  }
 | 
				
			||||||
		fixed = {
 | 
							fixed = {
 | 
				
			||||||
			{-1/2, 0, 0, 1/2, 1/2, 1/2},
 | 
								{-1/2, 0, 0, 1/2, 1/2, 1/2},
 | 
				
			||||||
			{-1/2, -1/2, -1/2, 1/2, 0, 0},
 | 
								{-1/2, -1/2, -1/2, 1/2, 0, 0},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	selection_box = {
 | 
						selection_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
		fixed = {
 | 
							fixed = {
 | 
				
			||||||
			{-1/2, 0, 0, 1/2, 1/2, 1/2},
 | 
								{-1/2, 0, 0, 1/2, 1/2, 1/2},
 | 
				
			||||||
			{-1/2, -1/2, -1/2, 1/2, 0, 0},
 | 
								{-1/2, -1/2, -1/2, 1/2, 0, 0},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	groups = {snappy=3, flammable=2},
 | 
						groups = {snappy=3, flammable=2},
 | 
				
			||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if AUTO_ROOF_CORNER == true then
 | 
					if AUTO_ROOF_CORNER == true then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	local CoRNeR = {
 | 
						local CoRNeR = {
 | 
				
			||||||
--		  MaTeRiaL
 | 
					--		  MaTeRiaL
 | 
				
			||||||
		{"wetreed"},
 | 
							{"wetreed"},
 | 
				
			||||||
		{"reed"}
 | 
							{"reed"}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for i in pairs(CoRNeR) do
 | 
						for i in pairs(CoRNeR) do
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		local MaTeRiaL = CoRNeR[i][1]
 | 
							local MaTeRiaL = CoRNeR[i][1]
 | 
				
			||||||
		local roof = "dryplants:"..MaTeRiaL.."_roof"
 | 
							local roof = "dryplants:"..MaTeRiaL.."_roof"
 | 
				
			||||||
		local corner = "dryplants:"..MaTeRiaL.."_roof_corner"
 | 
							local corner = "dryplants:"..MaTeRiaL.."_roof_corner"
 | 
				
			||||||
		local corner_2 = "dryplants:"..MaTeRiaL.."_roof_corner_2"
 | 
							local corner_2 = "dryplants:"..MaTeRiaL.."_roof_corner_2"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		minetest.register_abm({
 | 
							minetest.register_abm({
 | 
				
			||||||
			nodenames = {roof},
 | 
								nodenames = {roof},
 | 
				
			||||||
			interval = 1,
 | 
								interval = 1,
 | 
				
			||||||
			chance = 1,
 | 
								chance = 1,
 | 
				
			||||||
			action = function(pos)
 | 
								action = function(pos)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				local node_east = 			minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z  })
 | 
									local node_east =			minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z  })
 | 
				
			||||||
				local node_west = 			minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z  })
 | 
									local node_west =			minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z  })
 | 
				
			||||||
				local node_north = 			minetest.get_node({x=pos.x,   y=pos.y, z=pos.z+1})
 | 
									local node_north =			minetest.get_node({x=pos.x,   y=pos.y, z=pos.z+1})
 | 
				
			||||||
				local node_south = 			minetest.get_node({x=pos.x,   y=pos.y, z=pos.z-1})
 | 
									local node_south =			minetest.get_node({x=pos.x,   y=pos.y, z=pos.z-1})
 | 
				
			||||||
		-- corner 1
 | 
							-- corner 1
 | 
				
			||||||
				if ((node_west.name == roof and node_west.param2 == 0)
 | 
									if ((node_west.name == roof and node_west.param2 == 0)
 | 
				
			||||||
				or (node_west.name == corner and node_west.param2 == 1))
 | 
									or (node_west.name == corner and node_west.param2 == 1))
 | 
				
			||||||
				and ((node_north.name == roof and node_north.param2 == 3)
 | 
									and ((node_north.name == roof and node_north.param2 == 3)
 | 
				
			||||||
				or (node_north.name == corner and node_north.param2 == 3))
 | 
									or (node_north.name == corner and node_north.param2 == 3))
 | 
				
			||||||
				then
 | 
									then
 | 
				
			||||||
					minetest.set_node(pos, {name=corner, param2=0})
 | 
										minetest.set_node(pos, {name=corner, param2=0})
 | 
				
			||||||
				end
 | 
									end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if ((node_north.name == roof and node_north.param2 == 1)
 | 
									if ((node_north.name == roof and node_north.param2 == 1)
 | 
				
			||||||
				or (node_north.name == corner and node_north.param2 == 2))
 | 
									or (node_north.name == corner and node_north.param2 == 2))
 | 
				
			||||||
				and ((node_east.name == roof and node_east.param2 == 0)
 | 
									and ((node_east.name == roof and node_east.param2 == 0)
 | 
				
			||||||
				or (node_east.name == corner and node_east.param2 == 0))
 | 
									or (node_east.name == corner and node_east.param2 == 0))
 | 
				
			||||||
				then
 | 
									then
 | 
				
			||||||
					minetest.set_node(pos, {name=corner, param2=1})
 | 
										minetest.set_node(pos, {name=corner, param2=1})
 | 
				
			||||||
				end
 | 
									end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if ((node_east.name == roof and node_east.param2 == 2)
 | 
									if ((node_east.name == roof and node_east.param2 == 2)
 | 
				
			||||||
				or (node_east.name == corner and node_east.param2 == 3))
 | 
									or (node_east.name == corner and node_east.param2 == 3))
 | 
				
			||||||
				and ((node_south.name == roof and node_south.param2 == 1)
 | 
									and ((node_south.name == roof and node_south.param2 == 1)
 | 
				
			||||||
				or (node_south.name == corner and node_south.param2 == 1))
 | 
									or (node_south.name == corner and node_south.param2 == 1))
 | 
				
			||||||
				then
 | 
									then
 | 
				
			||||||
					minetest.set_node(pos, {name=corner, param2=2})
 | 
										minetest.set_node(pos, {name=corner, param2=2})
 | 
				
			||||||
				end
 | 
									end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if ((node_south.name == roof and node_south.param2 == 3)
 | 
									if ((node_south.name == roof and node_south.param2 == 3)
 | 
				
			||||||
				or (node_south.name == corner and node_south.param2 == 0))
 | 
									or (node_south.name == corner and node_south.param2 == 0))
 | 
				
			||||||
				and ((node_west.name == roof and node_west.param2 == 2)
 | 
									and ((node_west.name == roof and node_west.param2 == 2)
 | 
				
			||||||
				or (node_west.name == corner and node_west.param2 == 2))
 | 
									or (node_west.name == corner and node_west.param2 == 2))
 | 
				
			||||||
				then
 | 
									then
 | 
				
			||||||
					minetest.set_node(pos, {name=corner, param2=3})
 | 
										minetest.set_node(pos, {name=corner, param2=3})
 | 
				
			||||||
				end
 | 
									end
 | 
				
			||||||
		-- corner 2
 | 
							-- corner 2
 | 
				
			||||||
				if ((node_west.name == roof and node_west.param2 == 2)
 | 
									if ((node_west.name == roof and node_west.param2 == 2)
 | 
				
			||||||
				or (node_west.name == corner_2 and node_west.param2 == 1))
 | 
									or (node_west.name == corner_2 and node_west.param2 == 1))
 | 
				
			||||||
				and ((node_north.name == roof and node_north.param2 == 1)
 | 
									and ((node_north.name == roof and node_north.param2 == 1)
 | 
				
			||||||
				or (node_north.name == corner_2 and node_north.param2 == 3))
 | 
									or (node_north.name == corner_2 and node_north.param2 == 3))
 | 
				
			||||||
				then
 | 
									then
 | 
				
			||||||
					minetest.set_node(pos, {name=corner_2, param2=0})
 | 
										minetest.set_node(pos, {name=corner_2, param2=0})
 | 
				
			||||||
				end
 | 
									end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if ((node_north.name == roof and node_north.param2 == 3)
 | 
									if ((node_north.name == roof and node_north.param2 == 3)
 | 
				
			||||||
				or (node_north.name == corner_2 and node_north.param2 == 2))
 | 
									or (node_north.name == corner_2 and node_north.param2 == 2))
 | 
				
			||||||
				and ((node_east.name == roof and node_east.param2 == 2)
 | 
									and ((node_east.name == roof and node_east.param2 == 2)
 | 
				
			||||||
				or (node_east.name == corner_2 and node_east.param2 == 0))
 | 
									or (node_east.name == corner_2 and node_east.param2 == 0))
 | 
				
			||||||
				then
 | 
									then
 | 
				
			||||||
					minetest.set_node(pos, {name=corner_2, param2=1})
 | 
										minetest.set_node(pos, {name=corner_2, param2=1})
 | 
				
			||||||
				end
 | 
									end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if ((node_east.name == roof and node_east.param2 == 0)
 | 
									if ((node_east.name == roof and node_east.param2 == 0)
 | 
				
			||||||
				or (node_east.name == corner_2 and node_east.param2 == 3))
 | 
									or (node_east.name == corner_2 and node_east.param2 == 3))
 | 
				
			||||||
				and ((node_south.name == roof and node_south.param2 == 3)
 | 
									and ((node_south.name == roof and node_south.param2 == 3)
 | 
				
			||||||
				or (node_south.name == corner_2 and node_south.param2 == 1))
 | 
									or (node_south.name == corner_2 and node_south.param2 == 1))
 | 
				
			||||||
				then
 | 
									then
 | 
				
			||||||
					minetest.set_node(pos, {name=corner_2, param2=2})
 | 
										minetest.set_node(pos, {name=corner_2, param2=2})
 | 
				
			||||||
				end
 | 
									end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if ((node_south.name == roof and node_south.param2 == 1)
 | 
									if ((node_south.name == roof and node_south.param2 == 1)
 | 
				
			||||||
				or (node_south.name == corner_2 and node_south.param2 == 0))
 | 
									or (node_south.name == corner_2 and node_south.param2 == 0))
 | 
				
			||||||
				and ((node_west.name == roof and node_west.param2 == 0)
 | 
									and ((node_west.name == roof and node_west.param2 == 0)
 | 
				
			||||||
				or (node_west.name == corner_2 and node_west.param2 == 2))
 | 
									or (node_west.name == corner_2 and node_west.param2 == 2))
 | 
				
			||||||
				then
 | 
									then
 | 
				
			||||||
					minetest.set_node(pos, {name=corner_2, param2=3})
 | 
										minetest.set_node(pos, {name=corner_2, param2=3})
 | 
				
			||||||
				end
 | 
									end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			end,
 | 
								end,
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Wet Reed Roof Corner
 | 
					-- Wet Reed Roof Corner
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_node("dryplants:wetreed_roof_corner", {
 | 
					minetest.register_node("dryplants:wetreed_roof_corner", {
 | 
				
			||||||
	description = S("Wet Reed Roof Corner"),
 | 
						description = S("Wet Reed Roof Corner"),
 | 
				
			||||||
	drawtype = "nodebox",
 | 
						drawtype = "nodebox",
 | 
				
			||||||
	paramtype = "light",
 | 
						paramtype = "light",
 | 
				
			||||||
	paramtype2 = "facedir",
 | 
						paramtype2 = "facedir",
 | 
				
			||||||
	tiles = {"dryplants_reed_wet.png"},
 | 
						tiles = {"dryplants_reed_wet.png"},
 | 
				
			||||||
	node_box = {
 | 
						node_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
--				{ left	, bottom , front  ,  right ,  top   ,  back  }
 | 
					--				{ left	, bottom , front  ,  right ,  top   ,  back  }
 | 
				
			||||||
		fixed = {
 | 
							fixed = {
 | 
				
			||||||
			{-1/2, 0, 0, 0, 1/2, 1/2},
 | 
								{-1/2, 0, 0, 0, 1/2, 1/2},
 | 
				
			||||||
			{0, -1/2, 0, 1/2, 0, 1/2},
 | 
								{0, -1/2, 0, 1/2, 0, 1/2},
 | 
				
			||||||
			{-1/2, -1/2, -1/2, 0, 0, 0},
 | 
								{-1/2, -1/2, -1/2, 0, 0, 0},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	selection_box = {
 | 
						selection_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
		fixed = {
 | 
							fixed = {
 | 
				
			||||||
			{-1/2, 0, 0, 0, 1/2, 1/2},
 | 
								{-1/2, 0, 0, 0, 1/2, 1/2},
 | 
				
			||||||
			{0, -1/2, 0, 1/2, 0, 1/2},
 | 
								{0, -1/2, 0, 1/2, 0, 1/2},
 | 
				
			||||||
			{-1/2, -1/2, -1/2, 0, 0, 0},
 | 
								{-1/2, -1/2, -1/2, 0, 0, 0},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	groups = {snappy=3, flammable=2},
 | 
						groups = {snappy=3, flammable=2},
 | 
				
			||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Wet Reed Roof Corner 2
 | 
					-- Wet Reed Roof Corner 2
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_node("dryplants:wetreed_roof_corner_2", {
 | 
					minetest.register_node("dryplants:wetreed_roof_corner_2", {
 | 
				
			||||||
	description = S("Wet Reed Roof Corner 2"),
 | 
						description = S("Wet Reed Roof Corner 2"),
 | 
				
			||||||
	drawtype = "nodebox",
 | 
						drawtype = "nodebox",
 | 
				
			||||||
	paramtype = "light",
 | 
						paramtype = "light",
 | 
				
			||||||
	paramtype2 = "facedir",
 | 
						paramtype2 = "facedir",
 | 
				
			||||||
	tiles = {"dryplants_reed_wet.png"},
 | 
						tiles = {"dryplants_reed_wet.png"},
 | 
				
			||||||
	node_box = {
 | 
						node_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
--				{ left	, bottom , front  ,  right ,  top   ,  back  }
 | 
					--				{ left	, bottom , front  ,  right ,  top   ,  back  }
 | 
				
			||||||
		fixed = {
 | 
							fixed = {
 | 
				
			||||||
			{-1/2, -1/2, 0, 0, 0, 1/2},
 | 
								{-1/2, -1/2, 0, 0, 0, 1/2},
 | 
				
			||||||
			{0, 0, 0, 1/2, 1/2, 1/2},
 | 
								{0, 0, 0, 1/2, 1/2, 1/2},
 | 
				
			||||||
			{-1/2, 0, -1/2, 0, 1/2, 0},
 | 
								{-1/2, 0, -1/2, 0, 1/2, 0},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	selection_box = {
 | 
						selection_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
		fixed = {
 | 
							fixed = {
 | 
				
			||||||
			{-1/2, -1/2, 0, 0, 0, 1/2},
 | 
								{-1/2, -1/2, 0, 0, 0, 1/2},
 | 
				
			||||||
			{0, 0, 0, 1/2, 1/2, 1/2},
 | 
								{0, 0, 0, 1/2, 1/2, 1/2},
 | 
				
			||||||
			{-1/2, 0, -1/2, 0, 1/2, 0},
 | 
								{-1/2, 0, -1/2, 0, 1/2, 0},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	groups = {snappy=3, flammable=2},
 | 
						groups = {snappy=3, flammable=2},
 | 
				
			||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Wet Reed becomes (dry) Reed over time
 | 
					-- Wet Reed becomes (dry) Reed over time
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
if REED_WILL_DRY == true then
 | 
					if REED_WILL_DRY == true then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	local DRyiNG = {
 | 
						local DRyiNG = {
 | 
				
			||||||
--	  	  WeT									 DRy
 | 
					--		  WeT									 DRy
 | 
				
			||||||
		{"dryplants:wetreed",					"dryplants:reed"},
 | 
							{"dryplants:wetreed",					"dryplants:reed"},
 | 
				
			||||||
		{"dryplants:wetreed_slab",				"dryplants:reed_slab"},
 | 
							{"dryplants:wetreed_slab",				"dryplants:reed_slab"},
 | 
				
			||||||
		{"dryplants:wetreed_roof",				"dryplants:reed_roof"},
 | 
							{"dryplants:wetreed_roof",				"dryplants:reed_roof"},
 | 
				
			||||||
		{"dryplants:wetreed_roof_corner",		"dryplants:reed_roof_corner"},
 | 
							{"dryplants:wetreed_roof_corner",		"dryplants:reed_roof_corner"},
 | 
				
			||||||
		{"dryplants:wetreed_roof_corner_2",		"dryplants:reed_roof_corner_2"}
 | 
							{"dryplants:wetreed_roof_corner_2",		"dryplants:reed_roof_corner_2"}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	for i in pairs(DRyiNG) do
 | 
						for i in pairs(DRyiNG) do
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		local WeT = DRyiNG[i][1]
 | 
							local WeT = DRyiNG[i][1]
 | 
				
			||||||
		local DRy = DRyiNG[i][2]
 | 
							local DRy = DRyiNG[i][2]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		minetest.register_abm({
 | 
							minetest.register_abm({
 | 
				
			||||||
			nodenames = {WeT},
 | 
								nodenames = {WeT},
 | 
				
			||||||
			interval = REED_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
 | 
								interval = REED_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
 | 
				
			||||||
			chance = 1,
 | 
								chance = 1,
 | 
				
			||||||
			action = function(pos)
 | 
								action = function(pos)
 | 
				
			||||||
				local direction = minetest.get_node(pos).param2
 | 
									local direction = minetest.get_node(pos).param2
 | 
				
			||||||
				minetest.set_node(pos, {name=DRy, param2=direction})
 | 
									minetest.set_node(pos, {name=DRy, param2=direction})
 | 
				
			||||||
			end,
 | 
								end,
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Reed
 | 
					-- Reed
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_node("dryplants:reed", {
 | 
					minetest.register_node("dryplants:reed", {
 | 
				
			||||||
	description = S("Reed"),
 | 
						description = S("Reed"),
 | 
				
			||||||
	paramtype = "light",
 | 
						paramtype = "light",
 | 
				
			||||||
	paramtype2 = "facedir",
 | 
						paramtype2 = "facedir",
 | 
				
			||||||
	tiles = {"dryplants_reed.png"},
 | 
						tiles = {"dryplants_reed.png"},
 | 
				
			||||||
	groups = {snappy=3, flammable=2},
 | 
						groups = {snappy=3, flammable=2},
 | 
				
			||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Reed Slab
 | 
					-- Reed Slab
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_node("dryplants:reed_slab", {
 | 
					minetest.register_node("dryplants:reed_slab", {
 | 
				
			||||||
	description = S("Reed Slab"),
 | 
						description = S("Reed Slab"),
 | 
				
			||||||
	drawtype = "nodebox",
 | 
						drawtype = "nodebox",
 | 
				
			||||||
	paramtype = "light",
 | 
						paramtype = "light",
 | 
				
			||||||
	paramtype2 = "facedir",
 | 
						paramtype2 = "facedir",
 | 
				
			||||||
	tiles = {"dryplants_reed.png"},
 | 
						tiles = {"dryplants_reed.png"},
 | 
				
			||||||
	node_box = {
 | 
						node_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
		fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
 | 
							fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	selection_box = {
 | 
						selection_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
		fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
 | 
							fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	groups = {snappy=3, flammable=2},
 | 
						groups = {snappy=3, flammable=2},
 | 
				
			||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Reed Roof
 | 
					-- Reed Roof
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_node("dryplants:reed_roof", {
 | 
					minetest.register_node("dryplants:reed_roof", {
 | 
				
			||||||
	description = S("Reed Roof"),
 | 
						description = S("Reed Roof"),
 | 
				
			||||||
	drawtype = "nodebox",
 | 
						drawtype = "nodebox",
 | 
				
			||||||
	paramtype = "light",
 | 
						paramtype = "light",
 | 
				
			||||||
	paramtype2 = "facedir",
 | 
						paramtype2 = "facedir",
 | 
				
			||||||
	tiles = {"dryplants_reed.png"},
 | 
						tiles = {"dryplants_reed.png"},
 | 
				
			||||||
	node_box = {
 | 
						node_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
--				{ left	, bottom , front  ,  right ,  top   ,  back  }
 | 
					--				{ left	, bottom , front  ,  right ,  top   ,  back  }
 | 
				
			||||||
		fixed = {
 | 
							fixed = {
 | 
				
			||||||
			{-1/2, 0, 0, 1/2, 1/2, 1/2},
 | 
								{-1/2, 0, 0, 1/2, 1/2, 1/2},
 | 
				
			||||||
			{-1/2, -1/2, -1/2, 1/2, 0, 0},
 | 
								{-1/2, -1/2, -1/2, 1/2, 0, 0},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	selection_box = {
 | 
						selection_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
		fixed = {
 | 
							fixed = {
 | 
				
			||||||
			{-1/2, 0, 0, 1/2, 1/2, 1/2},
 | 
								{-1/2, 0, 0, 1/2, 1/2, 1/2},
 | 
				
			||||||
			{-1/2, -1/2, -1/2, 1/2, 0, 0},
 | 
								{-1/2, -1/2, -1/2, 1/2, 0, 0},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	groups = {snappy=3, flammable=2},
 | 
						groups = {snappy=3, flammable=2},
 | 
				
			||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Reed Roof Corner
 | 
					-- Reed Roof Corner
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_node("dryplants:reed_roof_corner", {
 | 
					minetest.register_node("dryplants:reed_roof_corner", {
 | 
				
			||||||
	description = S("Reed Roof Corner"),
 | 
						description = S("Reed Roof Corner"),
 | 
				
			||||||
	drawtype = "nodebox",
 | 
						drawtype = "nodebox",
 | 
				
			||||||
	paramtype = "light",
 | 
						paramtype = "light",
 | 
				
			||||||
	paramtype2 = "facedir",
 | 
						paramtype2 = "facedir",
 | 
				
			||||||
	tiles = {"dryplants_reed.png"},
 | 
						tiles = {"dryplants_reed.png"},
 | 
				
			||||||
	node_box = {
 | 
						node_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
--				{ left	, bottom , front  ,  right ,  top   ,  back  }
 | 
					--				{ left	, bottom , front  ,  right ,  top   ,  back  }
 | 
				
			||||||
		fixed = {
 | 
							fixed = {
 | 
				
			||||||
			{-1/2, 0, 0, 0, 1/2, 1/2},
 | 
								{-1/2, 0, 0, 0, 1/2, 1/2},
 | 
				
			||||||
			{0, -1/2, 0, 1/2, 0, 1/2},
 | 
								{0, -1/2, 0, 1/2, 0, 1/2},
 | 
				
			||||||
			{-1/2, -1/2, -1/2, 0, 0, 0},
 | 
								{-1/2, -1/2, -1/2, 0, 0, 0},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	selection_box = {
 | 
						selection_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
		fixed = {
 | 
							fixed = {
 | 
				
			||||||
			{-1/2, 0, 0, 0, 1/2, 1/2},
 | 
								{-1/2, 0, 0, 0, 1/2, 1/2},
 | 
				
			||||||
			{0, -1/2, 0, 1/2, 0, 1/2},
 | 
								{0, -1/2, 0, 1/2, 0, 1/2},
 | 
				
			||||||
			{-1/2, -1/2, -1/2, 0, 0, 0},
 | 
								{-1/2, -1/2, -1/2, 0, 0, 0},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	groups = {snappy=3, flammable=2},
 | 
						groups = {snappy=3, flammable=2},
 | 
				
			||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Reed Roof Corner 2
 | 
					-- Reed Roof Corner 2
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_node("dryplants:reed_roof_corner_2", {
 | 
					minetest.register_node("dryplants:reed_roof_corner_2", {
 | 
				
			||||||
	description = S("Reed Roof Corner 2"),
 | 
						description = S("Reed Roof Corner 2"),
 | 
				
			||||||
	drawtype = "nodebox",
 | 
						drawtype = "nodebox",
 | 
				
			||||||
	paramtype = "light",
 | 
						paramtype = "light",
 | 
				
			||||||
	paramtype2 = "facedir",
 | 
						paramtype2 = "facedir",
 | 
				
			||||||
	tiles = {"dryplants_reed.png"},
 | 
						tiles = {"dryplants_reed.png"},
 | 
				
			||||||
	node_box = {
 | 
						node_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
--				{ left	, bottom , front  ,  right ,  top   ,  back  }
 | 
					--				{ left	, bottom , front  ,  right ,  top   ,  back  }
 | 
				
			||||||
		fixed = {
 | 
							fixed = {
 | 
				
			||||||
			{-1/2, -1/2, 0, 0, 0, 1/2},
 | 
								{-1/2, -1/2, 0, 0, 0, 1/2},
 | 
				
			||||||
			{0, 0, 0, 1/2, 1/2, 1/2},
 | 
								{0, 0, 0, 1/2, 1/2, 1/2},
 | 
				
			||||||
			{-1/2, 0, -1/2, 0, 1/2, 0},
 | 
								{-1/2, 0, -1/2, 0, 1/2, 0},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	selection_box = {
 | 
						selection_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
		fixed = {
 | 
							fixed = {
 | 
				
			||||||
			{-1/2, -1/2, 0, 0, 0, 1/2},
 | 
								{-1/2, -1/2, 0, 0, 0, 1/2},
 | 
				
			||||||
			{0, 0, 0, 1/2, 1/2, 1/2},
 | 
								{0, 0, 0, 1/2, 1/2, 1/2},
 | 
				
			||||||
			{-1/2, 0, -1/2, 0, 1/2, 0},
 | 
								{-1/2, 0, -1/2, 0, 1/2, 0},
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	groups = {snappy=3, flammable=2},
 | 
						groups = {snappy=3, flammable=2},
 | 
				
			||||||
	sounds = default.node_sound_leaves_defaults(),
 | 
						sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,8 +4,8 @@
 | 
				
			|||||||
-- by Mossmanikin
 | 
					-- by Mossmanikin
 | 
				
			||||||
-- textures & ideas partly by Neuromancer
 | 
					-- textures & ideas partly by Neuromancer
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- License (everything): 	WTFPL
 | 
					-- License (everything):	WTFPL
 | 
				
			||||||
-- Contains code from: 		biome_lib
 | 
					-- Contains code from:		biome_lib
 | 
				
			||||||
-- Looked at code from:		default, trees
 | 
					-- Looked at code from:		default, trees
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -280,9 +280,9 @@ minetest.register_abm({
 | 
				
			|||||||
	chance = 100/REEDMACE_GROWING_CHANCE,
 | 
						chance = 100/REEDMACE_GROWING_CHANCE,
 | 
				
			||||||
	action = function(pos, node, _, _)
 | 
						action = function(pos, node, _, _)
 | 
				
			||||||
		if string.find(minetest.get_node({x = pos.x + 1, y = pos.y, z = pos.z	 }).name, "default:water")
 | 
							if string.find(minetest.get_node({x = pos.x + 1, y = pos.y, z = pos.z	 }).name, "default:water")
 | 
				
			||||||
		or string.find(minetest.get_node({x = pos.x, 	 y = pos.y, z = pos.z + 1}).name, "default:water")
 | 
							or string.find(minetest.get_node({x = pos.x,	 y = pos.y, z = pos.z + 1}).name, "default:water")
 | 
				
			||||||
		or string.find(minetest.get_node({x = pos.x - 1, y = pos.y, z = pos.z	 }).name, "default:water")
 | 
							or string.find(minetest.get_node({x = pos.x - 1, y = pos.y, z = pos.z	 }).name, "default:water")
 | 
				
			||||||
		or string.find(minetest.get_node({x = pos.x, 	 y = pos.y, z = pos.z - 1}).name, "default:water") then
 | 
							or string.find(minetest.get_node({x = pos.x,	 y = pos.y, z = pos.z - 1}).name, "default:water") then
 | 
				
			||||||
			if minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name == "air" then
 | 
								if minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name == "air" then
 | 
				
			||||||
				abstract_dryplants.grow_reedmace_water({x = pos.x, y = pos.y - 1, z = pos.z})
 | 
									abstract_dryplants.grow_reedmace_water({x = pos.x, y = pos.y - 1, z = pos.z})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,105 +1,105 @@
 | 
				
			|||||||
-- support for i18n
 | 
					-- support for i18n
 | 
				
			||||||
local S = plantlife_i18n.gettext
 | 
					local S = plantlife_i18n.gettext
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Ferns - Crafting 0.0.5
 | 
					-- Ferns - Crafting 0.0.5
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- (by Mossmanikin)
 | 
					-- (by Mossmanikin)
 | 
				
			||||||
-- License (everything): 	WTFPL
 | 
					-- License (everything):	WTFPL
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "shapeless",
 | 
						type = "shapeless",
 | 
				
			||||||
	output = "ferns:fiddlehead 3",
 | 
						output = "ferns:fiddlehead 3",
 | 
				
			||||||
	recipe = {"ferns:fern_01"},
 | 
						recipe = {"ferns:fern_01"},
 | 
				
			||||||
	replacements = {
 | 
						replacements = {
 | 
				
			||||||
		{"ferns:fern_01", "ferns:ferntuber"}
 | 
							{"ferns:fern_01", "ferns:ferntuber"}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "shapeless",
 | 
						type = "shapeless",
 | 
				
			||||||
	output = "ferns:fiddlehead 3",
 | 
						output = "ferns:fiddlehead 3",
 | 
				
			||||||
	recipe = {"ferns:tree_fern_leaves"},
 | 
						recipe = {"ferns:tree_fern_leaves"},
 | 
				
			||||||
	replacements = {
 | 
						replacements = {
 | 
				
			||||||
		{"ferns:tree_fern_leaves", "ferns:sapling_tree_fern"}
 | 
							{"ferns:tree_fern_leaves", "ferns:sapling_tree_fern"}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- FIDDLEHEAD
 | 
					-- FIDDLEHEAD
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_alias("archaeplantae:fiddlehead",      "ferns:fiddlehead")
 | 
					minetest.register_alias("archaeplantae:fiddlehead",      "ferns:fiddlehead")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
minetest.register_craftitem("ferns:fiddlehead", {
 | 
					minetest.register_craftitem("ferns:fiddlehead", {
 | 
				
			||||||
	description = S("Fiddlehead"),
 | 
						description = S("Fiddlehead"),
 | 
				
			||||||
	inventory_image = "ferns_fiddlehead.png",
 | 
						inventory_image = "ferns_fiddlehead.png",
 | 
				
			||||||
	on_use = minetest.item_eat(-1), -- slightly poisonous when raw
 | 
						on_use = minetest.item_eat(-1), -- slightly poisonous when raw
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "cooking",
 | 
						type = "cooking",
 | 
				
			||||||
	output = "ferns:fiddlehead_roasted",
 | 
						output = "ferns:fiddlehead_roasted",
 | 
				
			||||||
	recipe = "ferns:fiddlehead",
 | 
						recipe = "ferns:fiddlehead",
 | 
				
			||||||
	cooktime = 1,
 | 
						cooktime = 1,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
minetest.register_craftitem("ferns:fiddlehead_roasted", {
 | 
					minetest.register_craftitem("ferns:fiddlehead_roasted", {
 | 
				
			||||||
	description = S("Roasted Fiddlehead"),
 | 
						description = S("Roasted Fiddlehead"),
 | 
				
			||||||
	inventory_image = "ferns_fiddlehead_roasted.png",
 | 
						inventory_image = "ferns_fiddlehead_roasted.png",
 | 
				
			||||||
	on_use = minetest.item_eat(1), -- edible when cooked
 | 
						on_use = minetest.item_eat(1), -- edible when cooked
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- FERN TUBER
 | 
					-- FERN TUBER
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_alias("archaeplantae:ferntuber",      "ferns:ferntuber")
 | 
					minetest.register_alias("archaeplantae:ferntuber",      "ferns:ferntuber")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
minetest.register_craftitem("ferns:ferntuber", {
 | 
					minetest.register_craftitem("ferns:ferntuber", {
 | 
				
			||||||
	description = S("Fern Tuber"),
 | 
						description = S("Fern Tuber"),
 | 
				
			||||||
	inventory_image = "ferns_ferntuber.png",
 | 
						inventory_image = "ferns_ferntuber.png",
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "cooking",
 | 
						type = "cooking",
 | 
				
			||||||
	output = "ferns:ferntuber_roasted",
 | 
						output = "ferns:ferntuber_roasted",
 | 
				
			||||||
	recipe = "ferns:ferntuber",
 | 
						recipe = "ferns:ferntuber",
 | 
				
			||||||
	cooktime = 3,
 | 
						cooktime = 3,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
minetest.register_alias("archaeplantae:ferntuber_roasted",      "ferns:ferntuber_roasted")
 | 
					minetest.register_alias("archaeplantae:ferntuber_roasted",      "ferns:ferntuber_roasted")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
minetest.register_craftitem("ferns:ferntuber_roasted", {
 | 
					minetest.register_craftitem("ferns:ferntuber_roasted", {
 | 
				
			||||||
	description = S("Roasted Fern Tuber"),
 | 
						description = S("Roasted Fern Tuber"),
 | 
				
			||||||
	inventory_image = "ferns_ferntuber_roasted.png",
 | 
						inventory_image = "ferns_ferntuber_roasted.png",
 | 
				
			||||||
	on_use = minetest.item_eat(3),
 | 
						on_use = minetest.item_eat(3),
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- HORSETAIL  (EQUISETUM) --> GREEN DYE https://en.wikipedia.org/wiki/Equisetum
 | 
					-- HORSETAIL  (EQUISETUM) --> GREEN DYE https://en.wikipedia.org/wiki/Equisetum
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "shapeless",
 | 
						type = "shapeless",
 | 
				
			||||||
	output = "dye:green",
 | 
						output = "dye:green",
 | 
				
			||||||
	recipe = {"group:horsetail"},
 | 
						recipe = {"group:horsetail"},
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- GLUE WOODEN TOOLS with RESIN & POLISH them with HORSETAIL (planned)
 | 
					-- GLUE WOODEN TOOLS with RESIN & POLISH them with HORSETAIL (planned)
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
--[[minetest.register_craft({
 | 
					--[[minetest.register_craft({
 | 
				
			||||||
	type = "shapeless",
 | 
						type = "shapeless",
 | 
				
			||||||
	output = "default:pick_wood",
 | 
						output = "default:pick_wood",
 | 
				
			||||||
	recipe = {"default:pick_wood","group:horsetail","farming:string","default:stick"},
 | 
						recipe = {"default:pick_wood","group:horsetail","farming:string","default:stick"},
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "shapeless",
 | 
						type = "shapeless",
 | 
				
			||||||
	output = "default:shovel_wood",
 | 
						output = "default:shovel_wood",
 | 
				
			||||||
	recipe = {"default:shovel_wood","group:horsetail","farming:string","default:stick"},
 | 
						recipe = {"default:shovel_wood","group:horsetail","farming:string","default:stick"},
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "shapeless",
 | 
						type = "shapeless",
 | 
				
			||||||
	output = "default:axe_wood",
 | 
						output = "default:axe_wood",
 | 
				
			||||||
	recipe = {"default:axe_wood","group:horsetail","farming:string","default:stick"},
 | 
						recipe = {"default:axe_wood","group:horsetail","farming:string","default:stick"},
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "shapeless",
 | 
						type = "shapeless",
 | 
				
			||||||
	output = "default:sword_wood",
 | 
						output = "default:sword_wood",
 | 
				
			||||||
	recipe = {"default:sword_wood","group:horsetail","farming:string","default:stick"},
 | 
						recipe = {"default:sword_wood","group:horsetail","farming:string","default:stick"},
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
minetest.register_craft({
 | 
					minetest.register_craft({
 | 
				
			||||||
	type = "shapeless",
 | 
						type = "shapeless",
 | 
				
			||||||
	output = "farming:hoe_wood",
 | 
						output = "farming:hoe_wood",
 | 
				
			||||||
	recipe = {"farming:hoe_wood","group:horsetail","farming:string","default:stick"},
 | 
						recipe = {"farming:hoe_wood","group:horsetail","farming:string","default:stick"},
 | 
				
			||||||
})]]
 | 
					})]]
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										398
									
								
								ferns/fern.lua
									
									
									
									
									
								
							
							
						
						
									
										398
									
								
								ferns/fern.lua
									
									
									
									
									
								
							@@ -1,199 +1,199 @@
 | 
				
			|||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Ferns - Fern 0.1.0
 | 
					-- Ferns - Fern 0.1.0
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- by Mossmanikin
 | 
					-- by Mossmanikin
 | 
				
			||||||
-- License (everything): 	WTFPL
 | 
					-- License (everything):	WTFPL
 | 
				
			||||||
-- Contains code from: 		biome_lib
 | 
					-- Contains code from:		biome_lib
 | 
				
			||||||
-- Looked at code from:		default, flowers, painting, trees
 | 
					-- Looked at code from:		default, flowers, painting, trees
 | 
				
			||||||
-- Dependencies: 			biome_lib
 | 
					-- Dependencies:			biome_lib
 | 
				
			||||||
-- Supports:				dryplants, stoneage, sumpf
 | 
					-- Supports:				dryplants, stoneage, sumpf
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- some inspiration from here
 | 
					-- some inspiration from here
 | 
				
			||||||
-- https://en.wikipedia.org/wiki/Athyrium_yokoscense
 | 
					-- https://en.wikipedia.org/wiki/Athyrium_yokoscense
 | 
				
			||||||
-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
 | 
					-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
assert(abstract_ferns.config.enable_lady_fern == true)
 | 
					assert(abstract_ferns.config.enable_lady_fern == true)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- support for i18n
 | 
					-- support for i18n
 | 
				
			||||||
local S = plantlife_i18n.gettext
 | 
					local S = plantlife_i18n.gettext
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Maintain backward compatibilty
 | 
					-- Maintain backward compatibilty
 | 
				
			||||||
minetest.register_alias("archaeplantae:fern",		"ferns:fern_03")
 | 
					minetest.register_alias("archaeplantae:fern",		"ferns:fern_03")
 | 
				
			||||||
minetest.register_alias("archaeplantae:fern_mid",	"ferns:fern_02")
 | 
					minetest.register_alias("archaeplantae:fern_mid",	"ferns:fern_02")
 | 
				
			||||||
minetest.register_alias("archaeplantae:fern_small",	"ferns:fern_01")
 | 
					minetest.register_alias("archaeplantae:fern_small",	"ferns:fern_01")
 | 
				
			||||||
minetest.register_alias("ferns:fern_04",      		"ferns:fern_02") -- for placing
 | 
					minetest.register_alias("ferns:fern_04",		"ferns:fern_02") -- for placing
 | 
				
			||||||
 | 
					
 | 
				
			||||||
local nodenames = {}
 | 
					local nodenames = {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
local function create_nodes()
 | 
					local function create_nodes()
 | 
				
			||||||
	local images 	= { "ferns_fern.png", "ferns_fern_mid.png", "ferns_fern_big.png" }
 | 
						local images	= { "ferns_fern.png", "ferns_fern_mid.png", "ferns_fern_big.png" }
 | 
				
			||||||
	local vscales	= { 1, math.sqrt(8), math.sqrt(11) }
 | 
						local vscales	= { 1, math.sqrt(8), math.sqrt(11) }
 | 
				
			||||||
	local descs		= { S("Lady-fern (Athyrium)"), nil, nil }
 | 
						local descs		= { S("Lady-fern (Athyrium)"), nil, nil }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for i = 1, 3 do
 | 
						for i = 1, 3 do
 | 
				
			||||||
		local node_on_place = nil
 | 
							local node_on_place = nil
 | 
				
			||||||
		if i == 1 then
 | 
							if i == 1 then
 | 
				
			||||||
			node_on_place = function(itemstack, placer, pointed_thing)
 | 
								node_on_place = function(itemstack, placer, pointed_thing)
 | 
				
			||||||
				-- place a random fern
 | 
									-- place a random fern
 | 
				
			||||||
				local stack = ItemStack("ferns:fern_0"..math.random(1,4))
 | 
									local stack = ItemStack("ferns:fern_0"..math.random(1,4))
 | 
				
			||||||
				local ret = minetest.item_place(stack, placer, pointed_thing)
 | 
									local ret = minetest.item_place(stack, placer, pointed_thing)
 | 
				
			||||||
				return ItemStack("ferns:fern_01 "..itemstack:get_count()-(1-ret:get_count()))	-- TODO FIXME?
 | 
									return ItemStack("ferns:fern_01 "..itemstack:get_count()-(1-ret:get_count()))	-- TODO FIXME?
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
		nodenames[i] = "ferns:fern_"..string.format("%02d", i)
 | 
							nodenames[i] = "ferns:fern_"..string.format("%02d", i)
 | 
				
			||||||
		minetest.register_node(nodenames[i], {
 | 
							minetest.register_node(nodenames[i], {
 | 
				
			||||||
			description = descs[i] or (S("Lady-fern (Athyrium)").." " .. string.format("%02d", i)),
 | 
								description = descs[i] or (S("Lady-fern (Athyrium)").." " .. string.format("%02d", i)),
 | 
				
			||||||
			inventory_image = "ferns_fern.png",
 | 
								inventory_image = "ferns_fern.png",
 | 
				
			||||||
			drawtype = "plantlike",
 | 
								drawtype = "plantlike",
 | 
				
			||||||
			visual_scale = vscales[i],
 | 
								visual_scale = vscales[i],
 | 
				
			||||||
			paramtype = "light",
 | 
								paramtype = "light",
 | 
				
			||||||
			tiles = { images[i] },
 | 
								tiles = { images[i] },
 | 
				
			||||||
			walkable = false,
 | 
								walkable = false,
 | 
				
			||||||
			buildable_to = true,
 | 
								buildable_to = true,
 | 
				
			||||||
			groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1},
 | 
								groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1},
 | 
				
			||||||
			sounds = default.node_sound_leaves_defaults(),
 | 
								sounds = default.node_sound_leaves_defaults(),
 | 
				
			||||||
			selection_box = {
 | 
								selection_box = {
 | 
				
			||||||
				type = "fixed",
 | 
									type = "fixed",
 | 
				
			||||||
				fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
 | 
									fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			drop = "ferns:fern_01",
 | 
								drop = "ferns:fern_01",
 | 
				
			||||||
			on_place = node_on_place
 | 
								on_place = node_on_place
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Init
 | 
					-- Init
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
create_nodes()
 | 
					create_nodes()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Spawning
 | 
					-- Spawning
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if abstract_ferns.config.lady_ferns_near_tree == true then
 | 
					if abstract_ferns.config.lady_ferns_near_tree == true then
 | 
				
			||||||
	biome_lib:register_generate_plant({ -- near trees (woodlands)
 | 
						biome_lib:register_generate_plant({ -- near trees (woodlands)
 | 
				
			||||||
		surface = {
 | 
							surface = {
 | 
				
			||||||
			"default:dirt_with_grass",
 | 
								"default:dirt_with_grass",
 | 
				
			||||||
			"default:mossycobble",
 | 
								"default:mossycobble",
 | 
				
			||||||
			"default:desert_sand",
 | 
								"default:desert_sand",
 | 
				
			||||||
			"default:sand",
 | 
								"default:sand",
 | 
				
			||||||
			"default:jungletree",
 | 
								"default:jungletree",
 | 
				
			||||||
			"stoneage:grass_with_silex",
 | 
								"stoneage:grass_with_silex",
 | 
				
			||||||
			"sumpf:sumpf"
 | 
								"sumpf:sumpf"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		max_count = 30,
 | 
							max_count = 30,
 | 
				
			||||||
		rarity = 62,--63,
 | 
							rarity = 62,--63,
 | 
				
			||||||
		min_elevation = 1, -- above sea level
 | 
							min_elevation = 1, -- above sea level
 | 
				
			||||||
		near_nodes = {"group:tree"},
 | 
							near_nodes = {"group:tree"},
 | 
				
			||||||
		near_nodes_size = 3,--4,
 | 
							near_nodes_size = 3,--4,
 | 
				
			||||||
		near_nodes_vertical = 2,--3,
 | 
							near_nodes_vertical = 2,--3,
 | 
				
			||||||
		near_nodes_count = 1,
 | 
							near_nodes_count = 1,
 | 
				
			||||||
		plantlife_limit = -0.9,
 | 
							plantlife_limit = -0.9,
 | 
				
			||||||
		humidity_max = -1.0,
 | 
							humidity_max = -1.0,
 | 
				
			||||||
		humidity_min = 0.4,
 | 
							humidity_min = 0.4,
 | 
				
			||||||
		temp_max = -0.5, -- 55 °C (too hot?)
 | 
							temp_max = -0.5, -- 55 °C (too hot?)
 | 
				
			||||||
		temp_min = 0.75, -- -12 °C
 | 
							temp_min = 0.75, -- -12 °C
 | 
				
			||||||
		random_facedir = { 0, 179 },
 | 
							random_facedir = { 0, 179 },
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	nodenames
 | 
						nodenames
 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if abstract_ferns.config.lady_ferns_near_rock == true then
 | 
					if abstract_ferns.config.lady_ferns_near_rock == true then
 | 
				
			||||||
	biome_lib:register_generate_plant({ -- near stone (mountains)
 | 
						biome_lib:register_generate_plant({ -- near stone (mountains)
 | 
				
			||||||
		surface = {
 | 
							surface = {
 | 
				
			||||||
			"default:dirt_with_grass",
 | 
								"default:dirt_with_grass",
 | 
				
			||||||
			"default:mossycobble",
 | 
								"default:mossycobble",
 | 
				
			||||||
			"group:falling_node",
 | 
								"group:falling_node",
 | 
				
			||||||
			--"default:jungletree",
 | 
								--"default:jungletree",
 | 
				
			||||||
			"stoneage:grass_with_silex",
 | 
								"stoneage:grass_with_silex",
 | 
				
			||||||
			"sumpf:sumpf"
 | 
								"sumpf:sumpf"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		max_count = 35,
 | 
							max_count = 35,
 | 
				
			||||||
		rarity = 40,
 | 
							rarity = 40,
 | 
				
			||||||
		min_elevation = 1, -- above sea level
 | 
							min_elevation = 1, -- above sea level
 | 
				
			||||||
		near_nodes = {"group:stone"},
 | 
							near_nodes = {"group:stone"},
 | 
				
			||||||
		near_nodes_size = 1,
 | 
							near_nodes_size = 1,
 | 
				
			||||||
		near_nodes_count = 16,
 | 
							near_nodes_count = 16,
 | 
				
			||||||
		plantlife_limit = -0.9,
 | 
							plantlife_limit = -0.9,
 | 
				
			||||||
		humidity_max = -1.0,
 | 
							humidity_max = -1.0,
 | 
				
			||||||
		humidity_min = 0.4,
 | 
							humidity_min = 0.4,
 | 
				
			||||||
		temp_max = -0.5, -- 55 °C (too hot?)
 | 
							temp_max = -0.5, -- 55 °C (too hot?)
 | 
				
			||||||
		temp_min = 0.75, -- -12 °C
 | 
							temp_min = 0.75, -- -12 °C
 | 
				
			||||||
		random_facedir = { 0, 179 },
 | 
							random_facedir = { 0, 179 },
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	nodenames
 | 
						nodenames
 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
 | 
					if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
 | 
				
			||||||
	biome_lib:register_generate_plant({ -- near ores (potential mining sites)
 | 
						biome_lib:register_generate_plant({ -- near ores (potential mining sites)
 | 
				
			||||||
		surface = {
 | 
							surface = {
 | 
				
			||||||
			"default:dirt_with_grass",
 | 
								"default:dirt_with_grass",
 | 
				
			||||||
			"default:mossycobble",
 | 
								"default:mossycobble",
 | 
				
			||||||
			"default:stone_with_coal",
 | 
								"default:stone_with_coal",
 | 
				
			||||||
			"default:stone_with_iron",
 | 
								"default:stone_with_iron",
 | 
				
			||||||
			"moreores:mineral_tin",
 | 
								"moreores:mineral_tin",
 | 
				
			||||||
			"moreores:mineral_silver",
 | 
								"moreores:mineral_silver",
 | 
				
			||||||
			"sumpf:sumpf"
 | 
								"sumpf:sumpf"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		max_count = 1200,--1600, -- maybe too much? :D
 | 
							max_count = 1200,--1600, -- maybe too much? :D
 | 
				
			||||||
		rarity = 25,--15,
 | 
							rarity = 25,--15,
 | 
				
			||||||
		min_elevation = 1, -- above sea level
 | 
							min_elevation = 1, -- above sea level
 | 
				
			||||||
		near_nodes = {
 | 
							near_nodes = {
 | 
				
			||||||
			"default:stone_with_iron",
 | 
								"default:stone_with_iron",
 | 
				
			||||||
			--"default:stone_with_copper",
 | 
								--"default:stone_with_copper",
 | 
				
			||||||
			--"default:stone_with_mese",
 | 
								--"default:stone_with_mese",
 | 
				
			||||||
			--"default:stone_with_gold",
 | 
								--"default:stone_with_gold",
 | 
				
			||||||
			--"default:stone_with_diamond",
 | 
								--"default:stone_with_diamond",
 | 
				
			||||||
			"moreores:mineral_tin",
 | 
								"moreores:mineral_tin",
 | 
				
			||||||
			"moreores:mineral_silver"
 | 
								"moreores:mineral_silver"
 | 
				
			||||||
			--"moreores:mineral_mithril"
 | 
								--"moreores:mineral_mithril"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		near_nodes_size = 2,
 | 
							near_nodes_size = 2,
 | 
				
			||||||
		near_nodes_vertical = 4,--5,--6,
 | 
							near_nodes_vertical = 4,--5,--6,
 | 
				
			||||||
		near_nodes_count = 2,--3,
 | 
							near_nodes_count = 2,--3,
 | 
				
			||||||
		plantlife_limit = -0.9,
 | 
							plantlife_limit = -0.9,
 | 
				
			||||||
		humidity_max = -1.0,
 | 
							humidity_max = -1.0,
 | 
				
			||||||
		humidity_min = 0.4,
 | 
							humidity_min = 0.4,
 | 
				
			||||||
		temp_max = -0.5, -- 55 °C (too hot?)
 | 
							temp_max = -0.5, -- 55 °C (too hot?)
 | 
				
			||||||
		temp_min = 0.75, -- -12 °C
 | 
							temp_min = 0.75, -- -12 °C
 | 
				
			||||||
		random_facedir = { 0, 179 },
 | 
							random_facedir = { 0, 179 },
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	nodenames
 | 
						nodenames
 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
 | 
					if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
 | 
				
			||||||
	biome_lib:register_generate_plant({
 | 
						biome_lib:register_generate_plant({
 | 
				
			||||||
		surface = {
 | 
							surface = {
 | 
				
			||||||
			"default:dirt_with_grass",
 | 
								"default:dirt_with_grass",
 | 
				
			||||||
			"default:mossycobble",
 | 
								"default:mossycobble",
 | 
				
			||||||
			"default:stone_with_coal",
 | 
								"default:stone_with_coal",
 | 
				
			||||||
			"default:stone_with_iron",
 | 
								"default:stone_with_iron",
 | 
				
			||||||
			"moreores:mineral_tin",
 | 
								"moreores:mineral_tin",
 | 
				
			||||||
			"moreores:mineral_silver",
 | 
								"moreores:mineral_silver",
 | 
				
			||||||
			"sumpf:sumpf"
 | 
								"sumpf:sumpf"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		max_count = 70,
 | 
							max_count = 70,
 | 
				
			||||||
		rarity = 25,--15,
 | 
							rarity = 25,--15,
 | 
				
			||||||
		min_elevation = 1, -- above sea level
 | 
							min_elevation = 1, -- above sea level
 | 
				
			||||||
		near_nodes = {
 | 
							near_nodes = {
 | 
				
			||||||
			"default:stone"
 | 
								"default:stone"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		near_nodes_size = 2,
 | 
							near_nodes_size = 2,
 | 
				
			||||||
		near_nodes_vertical = 2,--6,
 | 
							near_nodes_vertical = 2,--6,
 | 
				
			||||||
		near_nodes_count = 3,
 | 
							near_nodes_count = 3,
 | 
				
			||||||
		plantlife_limit = -0.9,
 | 
							plantlife_limit = -0.9,
 | 
				
			||||||
		humidity_max = -1.0,
 | 
							humidity_max = -1.0,
 | 
				
			||||||
		humidity_min = 0.4,
 | 
							humidity_min = 0.4,
 | 
				
			||||||
		temp_max = -0.5, -- 55 °C (too hot?)
 | 
							temp_max = -0.5, -- 55 °C (too hot?)
 | 
				
			||||||
		temp_min = 0.75, -- -12 °C
 | 
							temp_min = 0.75, -- -12 °C
 | 
				
			||||||
		random_facedir = { 0, 179 },
 | 
							random_facedir = { 0, 179 },
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	nodenames
 | 
						nodenames
 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,8 +2,8 @@
 | 
				
			|||||||
-- Ferns - Giant Tree Fern 0.1.1
 | 
					-- Ferns - Giant Tree Fern 0.1.1
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- by Mossmanikin
 | 
					-- by Mossmanikin
 | 
				
			||||||
-- License (everything): 	WTFPL
 | 
					-- License (everything):	WTFPL
 | 
				
			||||||
-- Contains code from: 		biome_lib
 | 
					-- Contains code from:		biome_lib
 | 
				
			||||||
-- Looked at code from:		4seasons, default
 | 
					-- Looked at code from:		4seasons, default
 | 
				
			||||||
-- Supports:				vines
 | 
					-- Supports:				vines
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,10 +2,10 @@
 | 
				
			|||||||
-- Archae Plantae - Horsetail 0.0.5
 | 
					-- Archae Plantae - Horsetail 0.0.5
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- by Mossmanikin
 | 
					-- by Mossmanikin
 | 
				
			||||||
-- License (everything): 	WTFPL
 | 
					-- License (everything):	WTFPL
 | 
				
			||||||
-- Contains code from: 		biome_lib
 | 
					-- Contains code from:		biome_lib
 | 
				
			||||||
-- Looked at code from:		default, flowers, trees
 | 
					-- Looked at code from:		default, flowers, trees
 | 
				
			||||||
-- Dependencies: 			biome_lib
 | 
					-- Dependencies:			biome_lib
 | 
				
			||||||
-- Supports:				dryplants, stoneage, sumpf
 | 
					-- Supports:				dryplants, stoneage, sumpf
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,10 @@
 | 
				
			|||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
local title		= "Ferns" -- former "Archae Plantae"
 | 
					local title		= "Ferns" -- former "Archae Plantae"
 | 
				
			||||||
local version 	= "0.2.0"
 | 
					local version	= "0.2.0"
 | 
				
			||||||
local mname		= "ferns" -- former "archaeplantae"
 | 
					local mname		= "ferns" -- former "archaeplantae"
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- (by Mossmanikin)
 | 
					-- (by Mossmanikin)
 | 
				
			||||||
-- License (everything): 	WTFPL
 | 
					-- License (everything):	WTFPL
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract_ferns = {}
 | 
					abstract_ferns = {}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
-- In case you don't wanna have errors:
 | 
					-- In case you don't wanna have errors:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Only change what's behind a "=" (or "--"). 
 | 
					-- Only change what's behind a "=" (or "--").
 | 
				
			||||||
-- Don't use caps (behind a "=").
 | 
					-- Don't use caps (behind a "=").
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- If there's a "false" (behind a "=") you can change it to "true" (and the other way around).
 | 
					-- If there's a "false" (behind a "=") you can change it to "true" (and the other way around).
 | 
				
			||||||
@@ -31,12 +31,12 @@ abstract_ferns.config.lady_ferns_in_groups = false				-- this one is meant as a
 | 
				
			|||||||
--
 | 
					--
 | 
				
			||||||
--	Horsetails
 | 
					--	Horsetails
 | 
				
			||||||
abstract_ferns.config.enable_horsetails_spawning	= false		-- horsetails will grow in already explored areas, over time, near water or gravel
 | 
					abstract_ferns.config.enable_horsetails_spawning	= false		-- horsetails will grow in already explored areas, over time, near water or gravel
 | 
				
			||||||
abstract_ferns.config.enable_horsetails_on_grass 	= true		-- on dirt with grass and swamp (sumpf mod)
 | 
					abstract_ferns.config.enable_horsetails_on_grass	= true		-- on dirt with grass and swamp (sumpf mod)
 | 
				
			||||||
abstract_ferns.config.enable_horsetails_on_stones 	= true		-- on gravel, mossy cobble and silex (stoneage mod)
 | 
					abstract_ferns.config.enable_horsetails_on_stones	= true		-- on gravel, mossy cobble and silex (stoneage mod)
 | 
				
			||||||
--
 | 
					--
 | 
				
			||||||
-- Tree_Fern
 | 
					-- Tree_Fern
 | 
				
			||||||
abstract_ferns.config.enable_treeferns_in_jungle	= true
 | 
					abstract_ferns.config.enable_treeferns_in_jungle	= true
 | 
				
			||||||
abstract_ferns.config.enable_treeferns_in_oases 	= true		-- for oases and tropical beaches
 | 
					abstract_ferns.config.enable_treeferns_in_oases		= true		-- for oases and tropical beaches
 | 
				
			||||||
--
 | 
					--
 | 
				
			||||||
-- Giant_Tree_Fern
 | 
					-- Giant_Tree_Fern
 | 
				
			||||||
abstract_ferns.config.enable_giant_treeferns_in_jungle	= true
 | 
					abstract_ferns.config.enable_giant_treeferns_in_jungle	= true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,8 +2,8 @@
 | 
				
			|||||||
-- Ferns - Tree Fern 0.1.1
 | 
					-- Ferns - Tree Fern 0.1.1
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- by Mossmanikin
 | 
					-- by Mossmanikin
 | 
				
			||||||
-- License (everything): 	WTFPL
 | 
					-- License (everything):	WTFPL
 | 
				
			||||||
-- Contains code from: 		biome_lib
 | 
					-- Contains code from:		biome_lib
 | 
				
			||||||
-- Looked at code from:		default	, trees
 | 
					-- Looked at code from:		default	, trees
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,7 +19,7 @@ local sunflowers_rarity = 25
 | 
				
			|||||||
-- register the various rotations of waterlilies
 | 
					-- register the various rotations of waterlilies
 | 
				
			||||||
 | 
					
 | 
				
			||||||
local lilies_list = {
 | 
					local lilies_list = {
 | 
				
			||||||
	{ nil  , nil 	   , 1	},
 | 
						{ nil  , nil	   , 1	},
 | 
				
			||||||
	{ "225", "22.5"    , 2	},
 | 
						{ "225", "22.5"    , 2	},
 | 
				
			||||||
	{ "45" , "45"      , 3	},
 | 
						{ "45" , "45"      , 3	},
 | 
				
			||||||
	{ "675", "67.5"    , 4	},
 | 
						{ "675", "67.5"    , 4	},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
local title		= "Mole Hills"
 | 
					local title		= "Mole Hills"
 | 
				
			||||||
local version 	= "0.0.3"
 | 
					local version	= "0.0.3"
 | 
				
			||||||
local mname		= "molehills"
 | 
					local mname		= "molehills"
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Idea by Sokomine
 | 
					-- Idea by Sokomine
 | 
				
			||||||
@@ -49,7 +49,7 @@ minetest.register_craft({ -- molehills --> dirt
 | 
				
			|||||||
-- GeNeRaTiNG
 | 
					-- GeNeRaTiNG
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
abstract_molehills.place_molehill = function(pos)
 | 
					abstract_molehills.place_molehill = function(pos)
 | 
				
			||||||
	local right_here 	= {x=pos.x  , y=pos.y+1, z=pos.z  }
 | 
						local right_here	= {x=pos.x  , y=pos.y+1, z=pos.z  }
 | 
				
			||||||
	if  minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z  }).name ~= "air"
 | 
						if  minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z  }).name ~= "air"
 | 
				
			||||||
	and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z  }).name ~= "air"
 | 
						and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z  }).name ~= "air"
 | 
				
			||||||
	and minetest.get_node({x=pos.x  , y=pos.y, z=pos.z+1}).name ~= "air"
 | 
						and minetest.get_node({x=pos.x  , y=pos.y, z=pos.z+1}).name ~= "air"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -64,7 +64,7 @@ end
 | 
				
			|||||||
function nature:grow_node(pos, nodename)
 | 
					function nature:grow_node(pos, nodename)
 | 
				
			||||||
    if pos ~= nil then
 | 
					    if pos ~= nil then
 | 
				
			||||||
        local light_enough = (minetest.get_node_light(pos, nil) or 0)
 | 
					        local light_enough = (minetest.get_node_light(pos, nil) or 0)
 | 
				
			||||||
                >= nature.minimum_growth_light 
 | 
					                >= nature.minimum_growth_light
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if is_not_young(pos) and light_enough then
 | 
					        if is_not_young(pos) and light_enough then
 | 
				
			||||||
            minetest.set_node(pos, { name = nodename })
 | 
					            minetest.set_node(pos, { name = nodename })
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,38 +14,38 @@ end
 | 
				
			|||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract_trunks.place_twig = function(pos)
 | 
					abstract_trunks.place_twig = function(pos)
 | 
				
			||||||
	local twig_size 	= math.random(1,27)
 | 
						local twig_size		= math.random(1,27)
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	local right_here 	= {x=pos.x  , y=pos.y+1, z=pos.z  }
 | 
						local right_here	= {x=pos.x  , y=pos.y+1, z=pos.z  }
 | 
				
			||||||
	local north 		= {x=pos.x  , y=pos.y+1, z=pos.z+1}
 | 
						local north		= {x=pos.x  , y=pos.y+1, z=pos.z+1}
 | 
				
			||||||
	local north_east 	= {x=pos.x+1, y=pos.y+1, z=pos.z+1}
 | 
						local north_east	= {x=pos.x+1, y=pos.y+1, z=pos.z+1}
 | 
				
			||||||
	local east 			= {x=pos.x+1, y=pos.y+1, z=pos.z  }
 | 
						local east			= {x=pos.x+1, y=pos.y+1, z=pos.z  }
 | 
				
			||||||
	local south_east 	= {x=pos.x+1, y=pos.y+1, z=pos.z-1}
 | 
						local south_east	= {x=pos.x+1, y=pos.y+1, z=pos.z-1}
 | 
				
			||||||
	local south 		= {x=pos.x  , y=pos.y+1, z=pos.z-1}
 | 
						local south		= {x=pos.x  , y=pos.y+1, z=pos.z-1}
 | 
				
			||||||
	local south_west 	= {x=pos.x-1, y=pos.y+1, z=pos.z-1}
 | 
						local south_west	= {x=pos.x-1, y=pos.y+1, z=pos.z-1}
 | 
				
			||||||
	local west 			= {x=pos.x-1, y=pos.y+1, z=pos.z  }
 | 
						local west			= {x=pos.x-1, y=pos.y+1, z=pos.z  }
 | 
				
			||||||
	local north_west 	= {x=pos.x-1, y=pos.y+1, z=pos.z+1}
 | 
						local north_west	= {x=pos.x-1, y=pos.y+1, z=pos.z+1}
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	local node_here 	= minetest.get_node(right_here)
 | 
						local node_here		= minetest.get_node(right_here)
 | 
				
			||||||
	local node_north 	= minetest.get_node(north)
 | 
						local node_north	= minetest.get_node(north)
 | 
				
			||||||
	local node_n_e 		= minetest.get_node(north_east)
 | 
						local node_n_e		= minetest.get_node(north_east)
 | 
				
			||||||
	local node_east 	= minetest.get_node(east)
 | 
						local node_east		= minetest.get_node(east)
 | 
				
			||||||
	local node_s_e 		= minetest.get_node(south_east)
 | 
						local node_s_e		= minetest.get_node(south_east)
 | 
				
			||||||
	local node_south 	= minetest.get_node(south)
 | 
						local node_south	= minetest.get_node(south)
 | 
				
			||||||
	local node_s_w 		= minetest.get_node(south_west)
 | 
						local node_s_w		= minetest.get_node(south_west)
 | 
				
			||||||
	local node_west 	= minetest.get_node(west)
 | 
						local node_west		= minetest.get_node(west)
 | 
				
			||||||
	local node_n_w 		= minetest.get_node(north_west)
 | 
						local node_n_w		= minetest.get_node(north_west)
 | 
				
			||||||
--	small twigs	
 | 
					--	small twigs
 | 
				
			||||||
	if twig_size <= 16 then
 | 
						if twig_size <= 16 then
 | 
				
			||||||
		minetest.set_node(right_here, {name="trunks:twig_"..math.random(1,4), param2=math.random(0,3)})
 | 
							minetest.set_node(right_here, {name="trunks:twig_"..math.random(1,4), param2=math.random(0,3)})
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
-- 	big twigs
 | 
					--	big twigs
 | 
				
			||||||
	if Big_Twigs == true then
 | 
						if Big_Twigs == true then
 | 
				
			||||||
--	big twig 1		
 | 
					--	big twig 1
 | 
				
			||||||
	if twig_size == 17 then
 | 
						if twig_size == 17 then
 | 
				
			||||||
		if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1}).name].buildable_to
 | 
							if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1}).name].buildable_to
 | 
				
			||||||
			or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name].buildable_to) then
 | 
								or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name].buildable_to) then
 | 
				
			||||||
			
 | 
					
 | 
				
			||||||
			if minetest.registered_nodes[node_here.name].buildable_to then
 | 
								if minetest.registered_nodes[node_here.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(right_here, {name="trunks:twig_5"})
 | 
									minetest.set_node(right_here, {name="trunks:twig_5"})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
@@ -53,13 +53,13 @@ abstract_trunks.place_twig = function(pos)
 | 
				
			|||||||
				minetest.set_node(north_east, {name="trunks:twig_7"})
 | 
									minetest.set_node(north_east, {name="trunks:twig_7"})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
			if minetest.registered_nodes[node_east.name].buildable_to then
 | 
								if minetest.registered_nodes[node_east.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(east, 	  {name="trunks:twig_8"})
 | 
									minetest.set_node(east,		  {name="trunks:twig_8"})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
	elseif twig_size == 18 then
 | 
						elseif twig_size == 18 then
 | 
				
			||||||
		if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to
 | 
							if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to
 | 
				
			||||||
			or minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name].buildable_to) then
 | 
								or minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name].buildable_to) then
 | 
				
			||||||
			
 | 
					
 | 
				
			||||||
			if minetest.registered_nodes[node_here.name].buildable_to then
 | 
								if minetest.registered_nodes[node_here.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(right_here, {name="trunks:twig_5", param2=1})
 | 
									minetest.set_node(right_here, {name="trunks:twig_5", param2=1})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
@@ -67,13 +67,13 @@ abstract_trunks.place_twig = function(pos)
 | 
				
			|||||||
				minetest.set_node(south_east, {name="trunks:twig_7", param2=1})
 | 
									minetest.set_node(south_east, {name="trunks:twig_7", param2=1})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
			if minetest.registered_nodes[node_south.name].buildable_to then
 | 
								if minetest.registered_nodes[node_south.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(south, 	  {name="trunks:twig_8", param2=1})
 | 
									minetest.set_node(south,	  {name="trunks:twig_8", param2=1})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
	elseif twig_size == 19 then
 | 
						elseif twig_size == 19 then
 | 
				
			||||||
		if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to
 | 
							if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to
 | 
				
			||||||
			or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name].buildable_to) then
 | 
								or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name].buildable_to) then
 | 
				
			||||||
			
 | 
					
 | 
				
			||||||
			if minetest.registered_nodes[node_here.name].buildable_to then
 | 
								if minetest.registered_nodes[node_here.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(right_here, {name="trunks:twig_5", param2=2})
 | 
									minetest.set_node(right_here, {name="trunks:twig_5", param2=2})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
@@ -81,13 +81,13 @@ abstract_trunks.place_twig = function(pos)
 | 
				
			|||||||
				minetest.set_node(south_west, {name="trunks:twig_7", param2=2})
 | 
									minetest.set_node(south_west, {name="trunks:twig_7", param2=2})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
			if minetest.registered_nodes[node_west.name].buildable_to then
 | 
								if minetest.registered_nodes[node_west.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(west, 	  {name="trunks:twig_8", param2=2})
 | 
									minetest.set_node(west,		  {name="trunks:twig_8", param2=2})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
	elseif twig_size == 20 then
 | 
						elseif twig_size == 20 then
 | 
				
			||||||
		if not (minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1}).name].buildable_to
 | 
							if not (minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1}).name].buildable_to
 | 
				
			||||||
			or minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name].buildable_to) then
 | 
								or minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name].buildable_to) then
 | 
				
			||||||
			
 | 
					
 | 
				
			||||||
			if minetest.registered_nodes[node_here.name].buildable_to then
 | 
								if minetest.registered_nodes[node_here.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(right_here, {name="trunks:twig_5", param2=3})
 | 
									minetest.set_node(right_here, {name="trunks:twig_5", param2=3})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
@@ -95,19 +95,19 @@ abstract_trunks.place_twig = function(pos)
 | 
				
			|||||||
				minetest.set_node(north_west, {name="trunks:twig_7", param2=3})
 | 
									minetest.set_node(north_west, {name="trunks:twig_7", param2=3})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
			if minetest.registered_nodes[node_north.name].buildable_to then
 | 
								if minetest.registered_nodes[node_north.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(north, 	  {name="trunks:twig_8", param2=3})
 | 
									minetest.set_node(north,	  {name="trunks:twig_8", param2=3})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
--	big twig 2		
 | 
					--	big twig 2
 | 
				
			||||||
	elseif twig_size == 21 then
 | 
						elseif twig_size == 21 then
 | 
				
			||||||
		if not (minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name].buildable_to
 | 
							if not (minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name].buildable_to
 | 
				
			||||||
			or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1}).name].buildable_to) then
 | 
								or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1}).name].buildable_to) then
 | 
				
			||||||
			
 | 
					
 | 
				
			||||||
			if minetest.registered_nodes[node_here.name].buildable_to then
 | 
								if minetest.registered_nodes[node_here.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(right_here, {name="trunks:twig_9"})
 | 
									minetest.set_node(right_here, {name="trunks:twig_9"})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
			if minetest.registered_nodes[node_north.name].buildable_to then
 | 
								if minetest.registered_nodes[node_north.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(north, 	  {name="trunks:twig_10"})
 | 
									minetest.set_node(north,	  {name="trunks:twig_10"})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
			if minetest.registered_nodes[node_n_e.name].buildable_to then
 | 
								if minetest.registered_nodes[node_n_e.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(north_east, {name="trunks:twig_11"})
 | 
									minetest.set_node(north_east, {name="trunks:twig_11"})
 | 
				
			||||||
@@ -116,12 +116,12 @@ abstract_trunks.place_twig = function(pos)
 | 
				
			|||||||
	elseif twig_size == 22 then
 | 
						elseif twig_size == 22 then
 | 
				
			||||||
		if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name].buildable_to
 | 
							if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name].buildable_to
 | 
				
			||||||
			or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to) then
 | 
								or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to) then
 | 
				
			||||||
			
 | 
					
 | 
				
			||||||
			if minetest.registered_nodes[node_here.name].buildable_to then
 | 
								if minetest.registered_nodes[node_here.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(right_here, {name="trunks:twig_9", param2=1})
 | 
									minetest.set_node(right_here, {name="trunks:twig_9", param2=1})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
			if minetest.registered_nodes[node_east.name].buildable_to then
 | 
								if minetest.registered_nodes[node_east.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(east, 	  {name="trunks:twig_10", param2=1})
 | 
									minetest.set_node(east,		  {name="trunks:twig_10", param2=1})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
			if minetest.registered_nodes[node_s_e.name].buildable_to then
 | 
								if minetest.registered_nodes[node_s_e.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(south_east, {name="trunks:twig_11", param2=1})
 | 
									minetest.set_node(south_east, {name="trunks:twig_11", param2=1})
 | 
				
			||||||
@@ -130,12 +130,12 @@ abstract_trunks.place_twig = function(pos)
 | 
				
			|||||||
	elseif twig_size == 23 then
 | 
						elseif twig_size == 23 then
 | 
				
			||||||
		if not (minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name].buildable_to
 | 
							if not (minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name].buildable_to
 | 
				
			||||||
			or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z-1}).name].buildable_to) then
 | 
								or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z-1}).name].buildable_to) then
 | 
				
			||||||
			
 | 
					
 | 
				
			||||||
			if minetest.registered_nodes[node_here.name].buildable_to then
 | 
								if minetest.registered_nodes[node_here.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(right_here, {name="trunks:twig_9", param2=2})
 | 
									minetest.set_node(right_here, {name="trunks:twig_9", param2=2})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
			if minetest.registered_nodes[node_south.name].buildable_to then
 | 
								if minetest.registered_nodes[node_south.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(south, 	  {name="trunks:twig_10", param2=2})
 | 
									minetest.set_node(south,	  {name="trunks:twig_10", param2=2})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
			if minetest.registered_nodes[node_s_w.name].buildable_to then
 | 
								if minetest.registered_nodes[node_s_w.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(south_west, {name="trunks:twig_11", param2=2})
 | 
									minetest.set_node(south_west, {name="trunks:twig_11", param2=2})
 | 
				
			||||||
@@ -144,12 +144,12 @@ abstract_trunks.place_twig = function(pos)
 | 
				
			|||||||
	elseif twig_size == 24 then
 | 
						elseif twig_size == 24 then
 | 
				
			||||||
		if not (minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name].buildable_to
 | 
							if not (minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name].buildable_to
 | 
				
			||||||
			or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1}).name].buildable_to) then
 | 
								or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1}).name].buildable_to) then
 | 
				
			||||||
			
 | 
					
 | 
				
			||||||
			if minetest.registered_nodes[node_here.name].buildable_to then
 | 
								if minetest.registered_nodes[node_here.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(right_here, {name="trunks:twig_9", param2=3})
 | 
									minetest.set_node(right_here, {name="trunks:twig_9", param2=3})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
			if minetest.registered_nodes[node_west.name].buildable_to then
 | 
								if minetest.registered_nodes[node_west.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(west, 	  {name="trunks:twig_10", param2=3})
 | 
									minetest.set_node(west,		  {name="trunks:twig_10", param2=3})
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
			if minetest.registered_nodes[node_n_w.name].buildable_to then
 | 
								if minetest.registered_nodes[node_n_w.name].buildable_to then
 | 
				
			||||||
				minetest.set_node(north_west, {name="trunks:twig_11", param2=3})
 | 
									minetest.set_node(north_west, {name="trunks:twig_11", param2=3})
 | 
				
			||||||
@@ -199,12 +199,12 @@ end
 | 
				
			|||||||
-- TRuNKS
 | 
					-- TRuNKS
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
local TRuNKS = {
 | 
					local TRuNKS = {
 | 
				
			||||||
--	  MoD 						 TRuNK						NR
 | 
					--	  MoD						 TRuNK						NR
 | 
				
			||||||
    {"default",  				"tree",				 		 1},
 | 
					    {"default",					"tree",						 1},
 | 
				
			||||||
	{"default",					"jungletree",				 2},
 | 
						{"default",					"jungletree",				 2},
 | 
				
			||||||
	{"default",					"pine_tree",				12},
 | 
						{"default",					"pine_tree",				12},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	{"trees",					"tree_conifer",		 		 3},
 | 
						{"trees",					"tree_conifer",				 3},
 | 
				
			||||||
	{"trees",					"tree_mangrove",			 4},
 | 
						{"trees",					"tree_mangrove",			 4},
 | 
				
			||||||
	{"trees",					"tree_palm",				 5},
 | 
						{"trees",					"tree_palm",				 5},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -223,11 +223,11 @@ local TRuNKS = {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
if Horizontal_Trunks == true then -- see settings.txt
 | 
					if Horizontal_Trunks == true then -- see settings.txt
 | 
				
			||||||
for i in pairs(TRuNKS) do
 | 
					for i in pairs(TRuNKS) do
 | 
				
			||||||
	local 	MoD = 	TRuNKS[i][1]
 | 
						local	MoD =	TRuNKS[i][1]
 | 
				
			||||||
	local 	TRuNK = TRuNKS[i][2]
 | 
						local	TRuNK = TRuNKS[i][2]
 | 
				
			||||||
	local 	NR = 	TRuNKS[i][3]
 | 
						local	NR =	TRuNKS[i][3]
 | 
				
			||||||
	local	trunkname = MoD..":"..TRuNK
 | 
						local	trunkname = MoD..":"..TRuNK
 | 
				
			||||||
	if minetest.get_modpath(MoD) ~= nil 
 | 
						if minetest.get_modpath(MoD) ~= nil
 | 
				
			||||||
	and NR < 6 -- moretrees trunks allready have facedir
 | 
						and NR < 6 -- moretrees trunks allready have facedir
 | 
				
			||||||
	and minetest.registered_nodes[trunkname] then -- the node being called exists.
 | 
						and minetest.registered_nodes[trunkname] then -- the node being called exists.
 | 
				
			||||||
			temptrunk = clone_node(trunkname)
 | 
								temptrunk = clone_node(trunkname)
 | 
				
			||||||
@@ -236,9 +236,9 @@ for i in pairs(TRuNKS) do
 | 
				
			|||||||
	end
 | 
						end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
abstract_trunks.place_trunk = function(pos)
 | 
					abstract_trunks.place_trunk = function(pos)
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
 | 
						local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
 | 
				
			||||||
	local north = {x=pos.x, y=pos.y+1, z=pos.z+1}
 | 
						local north = {x=pos.x, y=pos.y+1, z=pos.z+1}
 | 
				
			||||||
	local north2 = {x=pos.x, y=pos.y+1, z=pos.z+2}
 | 
						local north2 = {x=pos.x, y=pos.y+1, z=pos.z+2}
 | 
				
			||||||
@@ -248,7 +248,7 @@ abstract_trunks.place_trunk = function(pos)
 | 
				
			|||||||
	local west2 = {x=pos.x-2, y=pos.y+1, z=pos.z}
 | 
						local west2 = {x=pos.x-2, y=pos.y+1, z=pos.z}
 | 
				
			||||||
	local east = {x=pos.x+1, y=pos.y+1, z=pos.z}
 | 
						local east = {x=pos.x+1, y=pos.y+1, z=pos.z}
 | 
				
			||||||
	local east2 = {x=pos.x+2, y=pos.y+1, z=pos.z}
 | 
						local east2 = {x=pos.x+2, y=pos.y+1, z=pos.z}
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	local node_here = minetest.get_node(right_here)
 | 
						local node_here = minetest.get_node(right_here)
 | 
				
			||||||
	local node_north = minetest.get_node(north)
 | 
						local node_north = minetest.get_node(north)
 | 
				
			||||||
	local node_north2 = minetest.get_node(north2)
 | 
						local node_north2 = minetest.get_node(north2)
 | 
				
			||||||
@@ -260,11 +260,11 @@ abstract_trunks.place_trunk = function(pos)
 | 
				
			|||||||
	local node_east2 = minetest.get_node(east2)
 | 
						local node_east2 = minetest.get_node(east2)
 | 
				
			||||||
	if minetest.registered_nodes[node_here.name].buildable_to then -- instead of check_air = true,
 | 
						if minetest.registered_nodes[node_here.name].buildable_to then -- instead of check_air = true,
 | 
				
			||||||
		for i in pairs(TRuNKS) do
 | 
							for i in pairs(TRuNKS) do
 | 
				
			||||||
			local 	MoD = 			TRuNKS[i][1]
 | 
								local	MoD =			TRuNKS[i][1]
 | 
				
			||||||
			local 	TRuNK = 		TRuNKS[i][2]
 | 
								local	TRuNK =			TRuNKS[i][2]
 | 
				
			||||||
			local 	NR = 			TRuNKS[i][3]
 | 
								local	NR =			TRuNKS[i][3]
 | 
				
			||||||
			local 	chance = 		math.random(1, 17)
 | 
								local	chance =		math.random(1, 17)
 | 
				
			||||||
			local 	length = 		math.random(3,5)
 | 
								local	length =		math.random(3,5)
 | 
				
			||||||
			if chance == NR then
 | 
								if chance == NR then
 | 
				
			||||||
				local trunk_type = math.random(1,3)
 | 
									local trunk_type = math.random(1,3)
 | 
				
			||||||
				if trunk_type == 1 then
 | 
									if trunk_type == 1 then
 | 
				
			||||||
@@ -278,7 +278,7 @@ abstract_trunks.place_trunk = function(pos)
 | 
				
			|||||||
						if minetest.registered_nodes[node_north.name].buildable_to then
 | 
											if minetest.registered_nodes[node_north.name].buildable_to then
 | 
				
			||||||
							minetest.set_node(north, {name=MoD..":"..TRuNK, param2=4})
 | 
												minetest.set_node(north, {name=MoD..":"..TRuNK, param2=4})
 | 
				
			||||||
						end
 | 
											end
 | 
				
			||||||
						
 | 
					
 | 
				
			||||||
						if length >= 4 and minetest.registered_nodes[node_north2.name].buildable_to then
 | 
											if length >= 4 and minetest.registered_nodes[node_north2.name].buildable_to then
 | 
				
			||||||
							minetest.set_node(north2, {name=MoD..":"..TRuNK, param2=4})
 | 
												minetest.set_node(north2, {name=MoD..":"..TRuNK, param2=4})
 | 
				
			||||||
						end
 | 
											end
 | 
				
			||||||
@@ -365,13 +365,13 @@ if Moss_on_ground == true then
 | 
				
			|||||||
abstract_trunks.grow_moss_on_ground = function(pos)
 | 
					abstract_trunks.grow_moss_on_ground = function(pos)
 | 
				
			||||||
	local on_ground = {x=pos.x, y=pos.y+1, z=pos.z}
 | 
						local on_ground = {x=pos.x, y=pos.y+1, z=pos.z}
 | 
				
			||||||
	local moss_type = math.random(1,21)
 | 
						local moss_type = math.random(1,21)
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	if moss_type == 1 then
 | 
						if moss_type == 1 then
 | 
				
			||||||
		minetest.set_node(on_ground, {name="trunks:moss_fungus", param2=math.random(0,3)})
 | 
							minetest.set_node(on_ground, {name="trunks:moss_fungus", param2=math.random(0,3)})
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		minetest.set_node(on_ground, {name="trunks:moss", param2=math.random(0,3)})
 | 
							minetest.set_node(on_ground, {name="trunks:moss", param2=math.random(0,3)})
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
biome_lib:register_generate_plant({
 | 
					biome_lib:register_generate_plant({
 | 
				
			||||||
@@ -406,14 +406,14 @@ abstract_trunks.grow_moss_on_trunk = function(pos)
 | 
				
			|||||||
	local at_side_s = {x=pos.x, y=pos.y, z=pos.z-1}
 | 
						local at_side_s = {x=pos.x, y=pos.y, z=pos.z-1}
 | 
				
			||||||
	local at_side_w = {x=pos.x-1, y=pos.y, z=pos.z}
 | 
						local at_side_w = {x=pos.x-1, y=pos.y, z=pos.z}
 | 
				
			||||||
	local undrneath = {x=pos.x, y=pos.y-1, z=pos.z}
 | 
						local undrneath = {x=pos.x, y=pos.y-1, z=pos.z}
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	local node_here = minetest.get_node(on_ground)
 | 
						local node_here = minetest.get_node(on_ground)
 | 
				
			||||||
	local node_north = minetest.get_node(at_side_n)
 | 
						local node_north = minetest.get_node(at_side_n)
 | 
				
			||||||
	local node_east = minetest.get_node(at_side_e)
 | 
						local node_east = minetest.get_node(at_side_e)
 | 
				
			||||||
	local node_south = minetest.get_node(at_side_s)
 | 
						local node_south = minetest.get_node(at_side_s)
 | 
				
			||||||
	local node_west = minetest.get_node(at_side_w)
 | 
						local node_west = minetest.get_node(at_side_w)
 | 
				
			||||||
	local node_under = minetest.get_node(undrneath)
 | 
						local node_under = minetest.get_node(undrneath)
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	--if minetest.get_item_group(node_under.name, "tree") < 1 then
 | 
						--if minetest.get_item_group(node_under.name, "tree") < 1 then
 | 
				
			||||||
		local moss_type = math.random(1,41)
 | 
							local moss_type = math.random(1,41)
 | 
				
			||||||
		if minetest.registered_nodes[node_here.name].buildable_to then -- instead of check_air = true,
 | 
							if minetest.registered_nodes[node_here.name].buildable_to then -- instead of check_air = true,
 | 
				
			||||||
@@ -491,32 +491,32 @@ biome_lib:register_generate_plant({
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- RooTS 
 | 
					-- RooTS
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
if Roots == true then -- see settings.txt
 | 
					if Roots == true then -- see settings.txt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
abstract_trunks.grow_roots = function(pos)
 | 
					abstract_trunks.grow_roots = function(pos)
 | 
				
			||||||
	local twig_size 	= math.random(1,27)
 | 
						local twig_size		= math.random(1,27)
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	local right_here 	= {x=pos.x  , y=pos.y  , z=pos.z  }
 | 
						local right_here	= {x=pos.x  , y=pos.y  , z=pos.z  }
 | 
				
			||||||
	local below 		= {x=pos.x  , y=pos.y-1, z=pos.z  }
 | 
						local below		= {x=pos.x  , y=pos.y-1, z=pos.z  }
 | 
				
			||||||
	local north 		= {x=pos.x  , y=pos.y  , z=pos.z+1}
 | 
						local north		= {x=pos.x  , y=pos.y  , z=pos.z+1}
 | 
				
			||||||
	local east 			= {x=pos.x+1, y=pos.y  , z=pos.z  }
 | 
						local east			= {x=pos.x+1, y=pos.y  , z=pos.z  }
 | 
				
			||||||
	local south 		= {x=pos.x  , y=pos.y  , z=pos.z-1}
 | 
						local south		= {x=pos.x  , y=pos.y  , z=pos.z-1}
 | 
				
			||||||
	local west 			= {x=pos.x-1, y=pos.y  , z=pos.z  }
 | 
						local west			= {x=pos.x-1, y=pos.y  , z=pos.z  }
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	local node_here 	= minetest.get_node(right_here)
 | 
						local node_here		= minetest.get_node(right_here)
 | 
				
			||||||
	local node_below	= minetest.get_node(below)
 | 
						local node_below	= minetest.get_node(below)
 | 
				
			||||||
	local node_north 	= minetest.get_node(north)
 | 
						local node_north	= minetest.get_node(north)
 | 
				
			||||||
	local node_east 	= minetest.get_node(east)
 | 
						local node_east		= minetest.get_node(east)
 | 
				
			||||||
	local node_south 	= minetest.get_node(south)
 | 
						local node_south	= minetest.get_node(south)
 | 
				
			||||||
	local node_west 	= minetest.get_node(west)
 | 
						local node_west		= minetest.get_node(west)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for i in pairs(TRuNKS) do
 | 
						for i in pairs(TRuNKS) do
 | 
				
			||||||
		local 	MoD = 			TRuNKS[i][1]
 | 
							local	MoD =			TRuNKS[i][1]
 | 
				
			||||||
		local 	TRuNK = 		TRuNKS[i][2]
 | 
							local	TRuNK =			TRuNKS[i][2]
 | 
				
			||||||
		if minetest.get_modpath(MoD) ~= nil 
 | 
							if minetest.get_modpath(MoD) ~= nil
 | 
				
			||||||
		and node_here.name == MoD..":"..TRuNK 
 | 
							and node_here.name == MoD..":"..TRuNK
 | 
				
			||||||
		and string.find(node_below.name, "dirt")
 | 
							and string.find(node_below.name, "dirt")
 | 
				
			||||||
		and node_here.param2 == 0 then
 | 
							and node_here.param2 == 0 then
 | 
				
			||||||
			if minetest.registered_nodes[node_north.name].buildable_to then
 | 
								if minetest.registered_nodes[node_north.name].buildable_to then
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
local title		= "Trunks"
 | 
					local title		= "Trunks"
 | 
				
			||||||
local version 	= "0.1.4"
 | 
					local version	= "0.1.4"
 | 
				
			||||||
local mname		= "trunks"
 | 
					local mname		= "trunks"
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
-- Code by Mossmanikin & Neuromancer
 | 
					-- Code by Mossmanikin & Neuromancer
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -217,10 +217,10 @@ if Auto_Roof_Corner == true then
 | 
				
			|||||||
		chance = 1,
 | 
							chance = 1,
 | 
				
			||||||
		action = function(pos)
 | 
							action = function(pos)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			local node_east = 			minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z  })
 | 
								local node_east =			minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z  })
 | 
				
			||||||
			local node_west = 			minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z  })
 | 
								local node_west =			minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z  })
 | 
				
			||||||
			local node_north = 			minetest.get_node({x=pos.x,   y=pos.y, z=pos.z+1})
 | 
								local node_north =			minetest.get_node({x=pos.x,   y=pos.y, z=pos.z+1})
 | 
				
			||||||
			local node_south = 			minetest.get_node({x=pos.x,   y=pos.y, z=pos.z-1})
 | 
								local node_south =			minetest.get_node({x=pos.x,   y=pos.y, z=pos.z-1})
 | 
				
			||||||
		-- corner 1
 | 
							-- corner 1
 | 
				
			||||||
			if ((node_west.name == roof and node_west.param2 == 0)
 | 
								if ((node_west.name == roof and node_west.param2 == 0)
 | 
				
			||||||
			or (node_west.name == corner and node_west.param2 == 1))
 | 
								or (node_west.name == corner and node_west.param2 == 1))
 | 
				
			||||||
@@ -302,8 +302,8 @@ local roots_cube =	{-2/16, -1/2, -3/16, 2/16, 1/16, 1/2}
 | 
				
			|||||||
local roots_sheet = {0, -1/2, -1/2, 0, 1/16, 1/2}
 | 
					local roots_sheet = {0, -1/2, -1/2, 0, 1/16, 1/2}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
local TRuNKS = {
 | 
					local TRuNKS = {
 | 
				
			||||||
--	  MoD 						 TRuNK
 | 
					--	  MoD						 TRuNK
 | 
				
			||||||
    {"default",  				"tree"						},
 | 
					    {"default",					"tree"						},
 | 
				
			||||||
	{"default",					"jungletree"				},
 | 
						{"default",					"jungletree"				},
 | 
				
			||||||
	{"default",					"pine_tree"					},
 | 
						{"default",					"pine_tree"					},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -325,8 +325,8 @@ local TRuNKS = {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
for i in pairs(TRuNKS) do
 | 
					for i in pairs(TRuNKS) do
 | 
				
			||||||
	local 	MoD = 			TRuNKS[i][1]
 | 
						local	MoD =			TRuNKS[i][1]
 | 
				
			||||||
	local 	TRuNK = 		TRuNKS[i][2]
 | 
						local	TRuNK =			TRuNKS[i][2]
 | 
				
			||||||
	if minetest.get_modpath(MoD) ~= nil then
 | 
						if minetest.get_modpath(MoD) ~= nil then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		local node = minetest.registered_nodes[MoD..":"..TRuNK]
 | 
							local node = minetest.registered_nodes[MoD..":"..TRuNK]
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,4 +9,3 @@ vines.recipes['shears'] = {
 | 
				
			|||||||
  {'group:stick', 'group:wood', 'default:steel_ingot'},
 | 
					  {'group:stick', 'group:wood', 'default:steel_ingot'},
 | 
				
			||||||
  {'', '', 'group:stick'}
 | 
					  {'', '', 'group:stick'}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,7 +26,7 @@ local RaDiuS = {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
--  e = + , n = +
 | 
					--  e = + , n = +
 | 
				
			||||||
abstract_woodsoils.place_soil = function(pos)
 | 
					abstract_woodsoils.place_soil = function(pos)
 | 
				
			||||||
	
 | 
					
 | 
				
			||||||
	if minetest.get_item_group(minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name, "soil") > 0
 | 
						if minetest.get_item_group(minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name, "soil") > 0
 | 
				
			||||||
	or minetest.get_item_group(minetest.get_node({x=pos.x,y=pos.y-2,z=pos.z}).name, "soil") > 0 then
 | 
						or minetest.get_item_group(minetest.get_node({x=pos.x,y=pos.y-2,z=pos.z}).name, "soil") > 0 then
 | 
				
			||||||
		for i in pairs(RaDiuS) do
 | 
							for i in pairs(RaDiuS) do
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
local title		= "Wood Soils" -- former "Forest Soils"
 | 
					local title		= "Wood Soils" -- former "Forest Soils"
 | 
				
			||||||
local version 	= "0.0.9"
 | 
					local version	= "0.0.9"
 | 
				
			||||||
local mname		= "woodsoils" -- former "forestsoils"
 | 
					local mname		= "woodsoils" -- former "forestsoils"
 | 
				
			||||||
-----------------------------------------------------------------------------------------------
 | 
					-----------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user