Compare commits
	
		
			75 Commits
		
	
	
		
			2018-11-09
			...
			molehills_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					62b6245bd1 | ||
| 
						 | 
					c6fd4a12b8 | ||
| 
						 | 
					23d04af7d6 | ||
| 
						 | 
					577404c850 | ||
| 
						 | 
					a2cbc18351 | ||
| 
						 | 
					9483fee7b3 | ||
| 
						 | 
					1894d91609 | ||
| 
						 | 
					438a1adb32 | ||
| 
						 | 
					e159b843d2 | ||
| 
						 | 
					6e842d9b0d | ||
| 
						 | 
					8287ae2476 | ||
| 
						 | 
					ca2b47492e | ||
| 
						 | 
					f5490e3b58 | ||
| 
						 | 
					bde2082ee1 | ||
| 
						 | 
					d33907ca75 | ||
| 
						 | 
					244d5da0e2 | ||
| 
						 | 
					8de8b889c2 | ||
| 
						 | 
					1d71e2c64e | ||
| 
						 | 
					d3edfbeace | ||
| 
						 | 
					c82ba38e68 | ||
| 
						 | 
					031d5f4e4e | ||
| 
						 | 
					32bab30e1f | ||
| 
						 | 
					7094d8a369 | ||
| 
						 | 
					c990942ba2 | ||
| 
						 | 
					4953b1ba54 | ||
| 
						 | 
					cb2373f089 | ||
| 
						 | 
					1a96ac87a7 | ||
| 
						 | 
					a6dc4890d9 | ||
| 
						 | 
					a5b752f8b2 | ||
| 
						 | 
					4c48e5be29 | ||
| 
						 | 
					a7d0e42cd1 | ||
| 
						 | 
					2e4e4a2412 | ||
| 
						 | 
					1d3751d755 | ||
| 
						 | 
					e2486ca7f5 | ||
| 
						 | 
					98f0c6c20f | ||
| 
						 | 
					54d3b669be | ||
| 
						 | 
					93265656cc | ||
| 
						 | 
					c76fd45a2c | ||
| 
						 | 
					c7d0fd3c53 | ||
| 
						 | 
					a66b82f1f0 | ||
| 
						 | 
					63914caed1 | ||
| 
						 | 
					ba98359dd0 | ||
| 
						 | 
					6df36da4e1 | ||
| 
						 | 
					28ef3e0c4b | ||
| 
						 | 
					680b02f7e2 | ||
| 
						 | 
					a2976c609a | ||
| 
						 | 
					46717958bc | ||
| 
						 | 
					52b2d18523 | ||
| 
						 | 
					bfd08f01c8 | ||
| 
						 | 
					9ed4771515 | ||
| 
						 | 
					3f107a8067 | ||
| 
						 | 
					b3cbd3df2e | ||
| 
						 | 
					b1b4a08834 | ||
| 
						 | 
					f01e4bb55f | ||
| 
						 | 
					7b4f54ead0 | ||
| 
						 | 
					c061ef23cf | ||
| 
						 | 
					d87d8e51f5 | ||
| 
						 | 
					70df655a42 | ||
| 
						 | 
					4876fc1265 | ||
| 
						 | 
					81b2b0898b | ||
| 
						 | 
					a750bac532 | ||
| 
						 | 
					b4b24dedba | ||
| 
						 | 
					622016713e | ||
| 
						 | 
					9963e588d6 | ||
| 
						 | 
					686dd21b9d | ||
| 
						 | 
					47c20dc550 | ||
| 
						 | 
					31e0066238 | ||
| 
						 | 
					3d13053d97 | ||
| 
						 | 
					07b6fc48ea | ||
| 
						 | 
					9a3d101c89 | ||
| 
						 | 
					0d228f705c | ||
| 
						 | 
					229d6aba88 | ||
| 
						 | 
					4e32feaa55 | ||
| 
						 | 
					b9b592af44 | ||
| 
						 | 
					08698ecd60 | 
@@ -9,7 +9,6 @@ read_globals = {
 | 
			
		||||
	"vector", "nodeupdate",
 | 
			
		||||
	"VoxelManip", "VoxelArea",
 | 
			
		||||
	"PseudoRandom", "ItemStack",
 | 
			
		||||
	"intllib",
 | 
			
		||||
	"default",
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,2 +0,0 @@
 | 
			
		||||
default
 | 
			
		||||
flowers
 | 
			
		||||
@@ -2,6 +2,9 @@
 | 
			
		||||
 | 
			
		||||
mushroom = {}
 | 
			
		||||
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = minetest.get_translator("3dmushrooms")
 | 
			
		||||
 | 
			
		||||
minetest.override_item("flowers:mushroom_fertile_brown", {
 | 
			
		||||
	drawtype = "mesh",
 | 
			
		||||
	mesh = "3dmushrooms.obj",
 | 
			
		||||
@@ -10,7 +13,8 @@ minetest.override_item("flowers:mushroom_fertile_brown", {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
		fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
 | 
			
		||||
	},
 | 
			
		||||
	inventory_image = "3dmushrooms_brown_inv.png"
 | 
			
		||||
	inventory_image = "3dmushrooms_brown_inv.png",
 | 
			
		||||
	wield_image = "3dmushrooms_brown_inv.png"
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.override_item("flowers:mushroom_brown", {
 | 
			
		||||
@@ -21,7 +25,8 @@ minetest.override_item("flowers:mushroom_brown", {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
		fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
 | 
			
		||||
	},
 | 
			
		||||
	inventory_image = "3dmushrooms_brown_inv.png"
 | 
			
		||||
	inventory_image = "3dmushrooms_brown_inv.png",
 | 
			
		||||
	wield_image = "3dmushrooms_brown_inv.png"
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.override_item("flowers:mushroom_fertile_red", {
 | 
			
		||||
@@ -32,7 +37,8 @@ minetest.override_item("flowers:mushroom_fertile_red", {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
		fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
 | 
			
		||||
	},
 | 
			
		||||
	inventory_image = "3dmushrooms_red_inv.png"
 | 
			
		||||
	inventory_image = "3dmushrooms_red_inv.png",
 | 
			
		||||
	wield_image = "3dmushrooms_red_inv.png"
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.override_item("flowers:mushroom_red", {
 | 
			
		||||
@@ -43,7 +49,8 @@ minetest.override_item("flowers:mushroom_red", {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
		fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
 | 
			
		||||
	},
 | 
			
		||||
	inventory_image = "3dmushrooms_red_inv.png"
 | 
			
		||||
	inventory_image = "3dmushrooms_red_inv.png",
 | 
			
		||||
	wield_image = "3dmushrooms_red_inv.png"
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
-- aliases to the default mushrooms
 | 
			
		||||
@@ -62,4 +69,4 @@ minetest.register_alias("mushroom:poison", "flowers:mushroom_red")
 | 
			
		||||
 | 
			
		||||
minetest.register_alias("mushroom:identifier", "default:mese_crystal_fragment")
 | 
			
		||||
 | 
			
		||||
print("[3D Mushrooms] loaded.")
 | 
			
		||||
minetest.log("info", S("[3D Mushrooms] loaded."))
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								3dmushrooms/locale/3dmushrooms.de.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,8 @@
 | 
			
		||||
# textdomain: 3dmushrooms
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# reusityback, 2022.
 | 
			
		||||
 | 
			
		||||
[3D Mushrooms] loaded.=[3D Mushrooms] geladen.
 | 
			
		||||
							
								
								
									
										8
									
								
								3dmushrooms/locale/3dmushrooms.eo.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,8 @@
 | 
			
		||||
# textdomain: 3dmushrooms
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# Jolesh, 2022.
 | 
			
		||||
 | 
			
		||||
[3D Mushrooms] loaded.=[3D Mushrooms] ŝargis.
 | 
			
		||||
							
								
								
									
										8
									
								
								3dmushrooms/locale/template.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,8 @@
 | 
			
		||||
# textdomain: 3dmushrooms
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 | 
			
		||||
 | 
			
		||||
[3D Mushrooms] loaded.=
 | 
			
		||||
							
								
								
									
										2
									
								
								3dmushrooms/mod.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,2 @@
 | 
			
		||||
name = 3dmushrooms
 | 
			
		||||
depends = default, flowers
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
default
 | 
			
		||||
biome_lib
 | 
			
		||||
flowers_plus?
 | 
			
		||||
@@ -1,9 +0,0 @@
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
local title		= "Along the Shore"
 | 
			
		||||
local version	= "0.0.4"
 | 
			
		||||
local mname		= "along_shore"
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 234 B  | 
@@ -1,30 +0,0 @@
 | 
			
		||||
-------------------------------------------------------------
 | 
			
		||||
Credit for textures of "along_shore"
 | 
			
		||||
-------------------------------------------------------------
 | 
			
		||||
(If more than one author is listed the names are in alphabetical order)
 | 
			
		||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 | 
			
		||||
FOLDER									TEXTURE							AUTHORS
 | 
			
		||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 | 
			
		||||
../along_shore/textures				    along_shore_seaweed_1Darker.png	Neuromancer, VanessaE
 | 
			
		||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 | 
			
		||||
../along_shore/textures/old            (along_shore_empty.png) 		   (Mossmanikin)
 | 
			
		||||
										along_shore_lilypads_1.png		Mossmanikin, Neuromancer
 | 
			
		||||
										along_shore_lilypads_2.png		Mossmanikin, Neuromancer
 | 
			
		||||
										along_shore_lilypads_3.png		Mossmanikin, Neuromancer
 | 
			
		||||
										along_shore_lilypads_4.png		Mossmanikin, Neuromancer
 | 
			
		||||
										along_shore_pondscum_1.png		Neuromancer
 | 
			
		||||
										along_shore_seaweed_1.png		Neuromancer, VanessaE
 | 
			
		||||
										along_shore_seaweed_2.png		Mossmanikin, Neuromancer, VanessaE
 | 
			
		||||
										along_shore_seaweed_3.png		Mossmanikin, Neuromancer, VanessaE
 | 
			
		||||
										along_shore_seaweed_4.png		Mossmanikin, Neuromancer, VanessaE
 | 
			
		||||
										flowers_seaweed.png				Neuromancer, VanessaE
 | 
			
		||||
										flowers_waterlily.png			Mossmanikin, VanessaE
 | 
			
		||||
										flowers_waterlily_22.5.png		Mossmanikin, VanessaE
 | 
			
		||||
										flowers_waterlily_45.png		Mossmanikin, VanessaE
 | 
			
		||||
										flowers_waterlily_67.5.png		Mossmanikin, VanessaE
 | 
			
		||||
										lillypad3Flower16x.png			Neuromancer	
 | 
			
		||||
										LillyPad3x16.png				Neuromancer		
 | 
			
		||||
										lillyPad5x16.png				Neuromancer			
 | 
			
		||||
										MultiLilly16x.png				Neuromancer
 | 
			
		||||
										pondscum16xc.png				Neuromancer
 | 
			
		||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 439 B  | 
| 
		 Before Width: | Height: | Size: 305 B  | 
| 
		 Before Width: | Height: | Size: 74 B  | 
| 
		 Before Width: | Height: | Size: 305 B  | 
| 
		 Before Width: | Height: | Size: 382 B  | 
| 
		 Before Width: | Height: | Size: 314 B  | 
| 
		 Before Width: | Height: | Size: 209 B  | 
| 
		 Before Width: | Height: | Size: 543 B  | 
| 
		 Before Width: | Height: | Size: 222 B  | 
| 
		 Before Width: | Height: | Size: 224 B  | 
| 
		 Before Width: | Height: | Size: 226 B  | 
| 
		 Before Width: | Height: | Size: 178 B  | 
| 
		 Before Width: | Height: | Size: 222 B  | 
| 
		 Before Width: | Height: | Size: 404 B  | 
| 
		 Before Width: | Height: | Size: 429 B  | 
| 
		 Before Width: | Height: | Size: 424 B  | 
| 
		 Before Width: | Height: | Size: 427 B  | 
| 
		 Before Width: | Height: | Size: 308 B  | 
| 
		 Before Width: | Height: | Size: 411 B  | 
| 
		 Before Width: | Height: | Size: 543 B  | 
@@ -1,5 +0,0 @@
 | 
			
		||||
default
 | 
			
		||||
biome_lib
 | 
			
		||||
plantlife_i18n
 | 
			
		||||
stonage?
 | 
			
		||||
sumpf?
 | 
			
		||||
@@ -7,31 +7,40 @@
 | 
			
		||||
-- Branch textures created by Neuromancer.
 | 
			
		||||
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
  abstract_bushes = {}
 | 
			
		||||
local S = minetest.get_translator("bushes")
 | 
			
		||||
abstract_bushes = {}
 | 
			
		||||
 | 
			
		||||
  minetest.register_node("bushes:youngtree2_bottom", {
 | 
			
		||||
local bushes_bush_rarity = tonumber(minetest.settings:get("bushes_bush_rarity")) or 99.9
 | 
			
		||||
local bushes_bush_rarity_fertility = tonumber(minetest.settings:get("bushes_bush_rarity_fertility")) or 1.5
 | 
			
		||||
local bushes_bush_fertility = tonumber(minetest.settings:get("bushes_bush_fertility")) or -1
 | 
			
		||||
 | 
			
		||||
local bushes_youngtrees_rarity = tonumber(minetest.settings:get("bushes_youngtrees_rarity")) or 100
 | 
			
		||||
local bushes_youngtrees_rarity_fertility = tonumber(minetest.settings:get("bushes_youngtrees_rarity_fertility")) or 0.6
 | 
			
		||||
local bushes_youngtrees_fertility = tonumber(minetest.settings:get("bushes_youngtrees_fertility")) or -0.5
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
minetest.register_node("bushes:youngtree2_bottom", {
 | 
			
		||||
	description = S("Young Tree 2 (bottom)"),
 | 
			
		||||
	drawtype="nodebox",
 | 
			
		||||
	tiles = {"bushes_youngtree2trunk.png"},
 | 
			
		||||
	inventory_image = "bushes_youngtree2trunk_inv.png",
 | 
			
		||||
	wield_image = "bushes_youngtree2trunk_inv.png",
 | 
			
		||||
paramtype = "light",
 | 
			
		||||
	paramtype = "light",
 | 
			
		||||
	walkable = false,
 | 
			
		||||
	is_ground_content = true,
 | 
			
		||||
node_box = {
 | 
			
		||||
	node_box = {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
		fixed = {
 | 
			
		||||
			--{0.375000,-0.500000,-0.500000,0.500000,0.500000,-0.375000}, --NodeBox 1
 | 
			
		||||
			{-0.0612,-0.500000,-0.500000,0.0612,0.500000,-0.375000}, --NodeBox 1
 | 
			
		||||
		}
 | 
			
		||||
},
 | 
			
		||||
	groups = {snappy=3,flammable=2},
 | 
			
		||||
	},
 | 
			
		||||
	groups = {snappy=3,flammable=2,attached_node=1},
 | 
			
		||||
	sounds = default.node_sound_leaves_defaults(),
 | 
			
		||||
	drop = 'default:stick'
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
  local BushBranchCenter			= { {1,1}, {3,2} }
 | 
			
		||||
local BushBranchCenter			= { {1,1}, {3,2} }
 | 
			
		||||
for i in pairs(BushBranchCenter) do
 | 
			
		||||
	local Num		= BushBranchCenter[i][1]
 | 
			
		||||
	local TexNum	= BushBranchCenter[i][2]
 | 
			
		||||
@@ -42,6 +51,7 @@ for i in pairs(BushBranchCenter) do
 | 
			
		||||
			"bushes_leaves_"..TexNum..".png",
 | 
			
		||||
			"bushes_branches_center_"..TexNum..".png"
 | 
			
		||||
		},
 | 
			
		||||
		use_texture_alpha = "clip",
 | 
			
		||||
		node_box = {
 | 
			
		||||
			type = "fixed",
 | 
			
		||||
			fixed = {
 | 
			
		||||
@@ -61,7 +71,8 @@ for i in pairs(BushBranchCenter) do
 | 
			
		||||
		--	tree=1, -- MM: disabled because some recipes use group:tree for trunks
 | 
			
		||||
			snappy=3,
 | 
			
		||||
			flammable=2,
 | 
			
		||||
			leaves=1
 | 
			
		||||
			leaves=1,
 | 
			
		||||
			attached_node=1
 | 
			
		||||
		},
 | 
			
		||||
		sounds = default.node_sound_leaves_defaults(),
 | 
			
		||||
		drop = 'default:stick 4'
 | 
			
		||||
@@ -83,6 +94,7 @@ for i in pairs(BushBranchSide) do
 | 
			
		||||
--[[back]]	"bushes_branches_center_"..TexNum..".png",--		 unless U really want 'em 2 B different
 | 
			
		||||
--[[front]]	"bushes_branches_right_"..TexNum..".png"
 | 
			
		||||
		},
 | 
			
		||||
		use_texture_alpha = "clip",
 | 
			
		||||
		node_box = {
 | 
			
		||||
			type = "fixed",
 | 
			
		||||
			fixed = {
 | 
			
		||||
@@ -104,7 +116,8 @@ for i in pairs(BushBranchSide) do
 | 
			
		||||
		--	tree=1, -- MM: disabled because some recipes use group:tree for trunks
 | 
			
		||||
			snappy=3,
 | 
			
		||||
			flammable=2,
 | 
			
		||||
			leaves=1
 | 
			
		||||
			leaves=1,
 | 
			
		||||
			attached_node=1
 | 
			
		||||
		},
 | 
			
		||||
		sounds = default.node_sound_leaves_defaults(),
 | 
			
		||||
		drop = 'default:stick 3'
 | 
			
		||||
@@ -118,11 +131,13 @@ for i in pairs(BushLeafNode) do
 | 
			
		||||
		description = S("Bush Leaves @1", Num),
 | 
			
		||||
		drawtype = "allfaces_optional",
 | 
			
		||||
		tiles = {"bushes_leaves_"..Num..".png"},
 | 
			
		||||
		use_texture_alpha = "clip",
 | 
			
		||||
		paramtype = "light",
 | 
			
		||||
		groups = {	-- MM: Should we add leafdecay?
 | 
			
		||||
			snappy=3,
 | 
			
		||||
			flammable=2,
 | 
			
		||||
			attached_node=1
 | 
			
		||||
			attached_node=1,
 | 
			
		||||
			leaves=1
 | 
			
		||||
		},
 | 
			
		||||
		sounds = default.node_sound_leaves_defaults(),
 | 
			
		||||
	})
 | 
			
		||||
@@ -158,9 +173,8 @@ abstract_bushes.grow_bush = function(pos)
 | 
			
		||||
abstract_bushes.grow_bush_node(pos,5,leaf_type)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	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}
 | 
			
		||||
 | 
			
		||||
@@ -197,29 +211,28 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
biome_lib.register_on_generate({
 | 
			
		||||
		surface = {
 | 
			
		||||
			"default:dirt_with_grass",
 | 
			
		||||
			"stoneage:grass_with_silex",
 | 
			
		||||
			"sumpf:peat",
 | 
			
		||||
			"sumpf:sumpf"
 | 
			
		||||
		},
 | 
			
		||||
    max_count = 15,  --10,15
 | 
			
		||||
    rarity = 101 - 4,  --3,4
 | 
			
		||||
		rarity = bushes_bush_rarity,
 | 
			
		||||
		rarity_fertility = bushes_bush_rarity_fertility,
 | 
			
		||||
		plantlife_limit = bushes_bush_fertility,
 | 
			
		||||
		min_elevation = 1, -- above sea level
 | 
			
		||||
	plantlife_limit = -0.9,
 | 
			
		||||
	},
 | 
			
		||||
	abstract_bushes.grow_bush
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 abstract_bushes.grow_youngtree2 = function(pos)
 | 
			
		||||
abstract_bushes.grow_youngtree2 = function(pos)
 | 
			
		||||
	local height = math.random(4,5)
 | 
			
		||||
	abstract_bushes.grow_youngtree_node2(pos,height)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
abstract_bushes.grow_youngtree_node2 = function(pos, height)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	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 two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
 | 
			
		||||
@@ -237,24 +250,21 @@ abstract_bushes.grow_youngtree_node2 = function(pos, height)
 | 
			
		||||
			minetest.swap_node(three_above_right_here, {name="bushes:BushLeaves1" })
 | 
			
		||||
			minetest.swap_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
 | 
			
		||||
		end
 | 
			
		||||
 | 
			
		||||
	end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
biome_lib.register_on_generate({
 | 
			
		||||
		surface = {
 | 
			
		||||
			"default:dirt_with_grass",
 | 
			
		||||
			"stoneage:grass_with_silex",
 | 
			
		||||
			"sumpf:peat",
 | 
			
		||||
			"sumpf:sumpf"
 | 
			
		||||
		},
 | 
			
		||||
    max_count = 55,  --10,15
 | 
			
		||||
    rarity = 101 - 4,  --3,4
 | 
			
		||||
		rarity = bushes_youngtrees_rarity,
 | 
			
		||||
		rarity_fertility = bushes_youngtrees_rarity_fertility,
 | 
			
		||||
		plantlife_limit = bushes_youngtrees_fertility,
 | 
			
		||||
		min_elevation = 1, -- above sea level
 | 
			
		||||
	plantlife_limit = -0.9,
 | 
			
		||||
	},
 | 
			
		||||
	abstract_bushes.grow_youngtree2
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
		--http://dev.minetest.net/Node_Drawtypes
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								bushes/locale/bushes.de.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,10 @@
 | 
			
		||||
# textdomain: bushes
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 | 
			
		||||
 | 
			
		||||
Young Tree 2 (bottom)=Strauch 2 (Ansatz)
 | 
			
		||||
Bush Branches @1=Buschäste @1
 | 
			
		||||
Bush Leaves @1=Buschblätter @1
 | 
			
		||||
							
								
								
									
										10
									
								
								bushes/locale/bushes.eo.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,10 @@
 | 
			
		||||
# textdomain: bushes
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# Jolesh, 2022.
 | 
			
		||||
 | 
			
		||||
Young Tree 2 (bottom)=Juna Arbo 2 (malsupro)
 | 
			
		||||
Bush Branches @1=Arbustaj Branĉoj @1
 | 
			
		||||
Bush Leaves @1=Arbustaj Folioj @1
 | 
			
		||||
							
								
								
									
										11
									
								
								bushes/locale/bushes.fr.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,11 @@
 | 
			
		||||
# textdomain: bushes
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# fat115 <fat115@framasoft.org>, 2017.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Young Tree 2 (bottom)=Arbuste 2 (bas)
 | 
			
		||||
Bush Branches @1=Branches de buisson @1
 | 
			
		||||
Bush Leaves @1=Feuilles de buisson @1
 | 
			
		||||
							
								
								
									
										10
									
								
								bushes/locale/template.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,10 @@
 | 
			
		||||
# textdomain: bushes
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 | 
			
		||||
 | 
			
		||||
Young Tree 2 (bottom)=
 | 
			
		||||
Bush Branches @1=
 | 
			
		||||
Bush Leaves @1=
 | 
			
		||||
							
								
								
									
										3
									
								
								bushes/mod.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,3 @@
 | 
			
		||||
name = bushes
 | 
			
		||||
depends = default, biome_lib
 | 
			
		||||
optional_depends = stoneage, sumpf
 | 
			
		||||
							
								
								
									
										17
									
								
								bushes/settingtypes.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,17 @@
 | 
			
		||||
#Bush rarity %
 | 
			
		||||
bushes_bush_rarity (Bush rarity %) float 99.9 0 100
 | 
			
		||||
 | 
			
		||||
#How much the rarity is reduced by fertility %
 | 
			
		||||
bushes_bush_rarity_fertility (Bush rarity fertility reduction %) float 1.5 0 100
 | 
			
		||||
 | 
			
		||||
#Bush minimum fertility (-1 to +1)
 | 
			
		||||
bushes_bush_fertility (Bush minimum fertility) float -0.7 -1 1
 | 
			
		||||
 | 
			
		||||
#Youngtree (from bushes mod) rarity %
 | 
			
		||||
bushes_youngtrees_rarity (Youngtree bush rarity %) float 100 0 100
 | 
			
		||||
 | 
			
		||||
#How much the rarity is reduced by fertility %
 | 
			
		||||
bushes_youngtrees_rarity_fertility (Youngtree bush rarity fertility reduction %) float 0.6 0 100
 | 
			
		||||
 | 
			
		||||
#Youngtree (from bushes mod) minimum fertility (-1 to +1)
 | 
			
		||||
bushes_youngtrees_fertility (Youngtree bush minimum fertility) float -0.5 -1 1
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("bushes_classic")
 | 
			
		||||
 | 
			
		||||
-- Basket
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +0,0 @@
 | 
			
		||||
biome_lib
 | 
			
		||||
plantlife_i18n
 | 
			
		||||
farming?
 | 
			
		||||
farming_plus?
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
bushes_classic = {}
 | 
			
		||||
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("bushes_classic")
 | 
			
		||||
 | 
			
		||||
bushes_classic.bushes = {
 | 
			
		||||
  "strawberry",
 | 
			
		||||
@@ -30,7 +30,7 @@ local modpath = minetest.get_modpath('bushes_classic')
 | 
			
		||||
dofile(modpath..'/cooking.lua')
 | 
			
		||||
dofile(modpath..'/nodes.lua')
 | 
			
		||||
 | 
			
		||||
biome_lib:spawn_on_surfaces({
 | 
			
		||||
biome_lib.register_active_spawner({
 | 
			
		||||
	spawn_delay = 3600,
 | 
			
		||||
	spawn_plants = bushes_classic.spawn_list,
 | 
			
		||||
	avoid_radius = 10,
 | 
			
		||||
@@ -55,4 +55,4 @@ biome_lib:spawn_on_surfaces({
 | 
			
		||||
 | 
			
		||||
minetest.register_alias("bushes:basket_pies", "bushes:basket_strawberry")
 | 
			
		||||
 | 
			
		||||
print(S("[Bushes] Loaded."))
 | 
			
		||||
print("[Bushes] Loaded.")
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										46
									
								
								bushes_classic/locale/bushes_classic.de.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,46 @@
 | 
			
		||||
# textdomain: bushes_classic
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# Xanthin, 2017.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Sugar=Zucker
 | 
			
		||||
Basket with Strawberry pies=Korb mit Erdbeertorten
 | 
			
		||||
Cooked Strawberry pie=Erdbeertorte
 | 
			
		||||
Raw Strawberry pie=Rohe Erdbeertorte
 | 
			
		||||
Slice of Strawberry pie=Erdbeertortenstueck
 | 
			
		||||
Strawberry=Erdbeere
 | 
			
		||||
Strawberry Bush=Erdbeerbusch
 | 
			
		||||
Basket with Blackberry pies=Korb mit Brombeertorten
 | 
			
		||||
Blackberry=Brombeere
 | 
			
		||||
Blackberry Bush=Brombeerbusch
 | 
			
		||||
Cooked Blackberry pie=Brombeertorte
 | 
			
		||||
Raw Blackberry pie=Rohe Brombeertorte
 | 
			
		||||
Slice of Blackberry pie=Brombeertortenstueck
 | 
			
		||||
Basket with Blueberry pies=Korb mit Blaubeertorten
 | 
			
		||||
Blueberry=Blaubeere
 | 
			
		||||
Blueberry Bush=Blaubeerbusch
 | 
			
		||||
Cooked Blueberry pie=Blaubeertorte
 | 
			
		||||
Raw Blueberry pie=Rohe Blaubeertorte
 | 
			
		||||
Slice of Blueberry pie=Blaubeertortenstueck
 | 
			
		||||
Basket with Raspberry pies=Korb mit Himbeertorten
 | 
			
		||||
Cooked Raspberry pie=Himbeertorte
 | 
			
		||||
Raspberry=Himbeere
 | 
			
		||||
Raspberry Bush=Himbeerbusch
 | 
			
		||||
Raw Raspberry pie=Rohe Himbeertorte
 | 
			
		||||
Slice of Raspberry pie=Himbeertortenstueck
 | 
			
		||||
Basket with Gooseberry pies=Korb mit Stachelbeertorten
 | 
			
		||||
Cooked Gooseberry pie=Stachelbeertorte
 | 
			
		||||
Gooseberry=Stachelbeere
 | 
			
		||||
Gooseberry Bush=Stachelbeerbusch
 | 
			
		||||
Raw Gooseberry pie=Rohe Stachelbeertorte
 | 
			
		||||
Slice of Gooseberry pie=Stachelbeertortenstueck
 | 
			
		||||
Basket with Mixed Berry pies=Korb mit Beerenmixtorten
 | 
			
		||||
Cooked Mixed Berry pie=Beerenmixtorte
 | 
			
		||||
Currently fruitless Bush=zur Zeit fruechteloser
 | 
			
		||||
Mixed Berry=Beerenmix
 | 
			
		||||
Raw Mixed Berry pie=Rohe Beerenmixtorte
 | 
			
		||||
Slice of Mixed Berry pie=Beerenmixtortenstueck
 | 
			
		||||
Basket=Korb
 | 
			
		||||
							
								
								
									
										46
									
								
								bushes_classic/locale/bushes_classic.eo.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,46 @@
 | 
			
		||||
# textdomain: bushes_classic
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# Jolesh, 2022.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Sugar=Sukero
 | 
			
		||||
Basket with Strawberry pies=Korbo kun Fragokukoj
 | 
			
		||||
Cooked Strawberry pie=Kuirita Fragokuko
 | 
			
		||||
Raw Strawberry pie=Kruda Fragokuko
 | 
			
		||||
Slice of Strawberry pie=Tranĉaĵo de Fragokuko
 | 
			
		||||
Strawberry=Frago
 | 
			
		||||
Strawberry Bush=Fraga Arbusto
 | 
			
		||||
Basket with Blackberry pies=Korbo kun Rubusokukoj
 | 
			
		||||
Cooked Blackberry pie=Kuirita Rubusokuko
 | 
			
		||||
Raw Blackberry pie=Kruda Rubusokuko
 | 
			
		||||
Slice of Blackberry pie=Tranĉaĵo de Rubusokuko
 | 
			
		||||
Blackberry=Rubuso
 | 
			
		||||
Blackberry Bush=Rubusa Arbusto
 | 
			
		||||
Basket with Blueberry pies=Korbo kun Mirtelokukoj
 | 
			
		||||
Blueberry=Mirtelo
 | 
			
		||||
Blueberry Bush=Mirtela Arbusto
 | 
			
		||||
Cooked Blueberry pie=Kuirita Mirtelokuko
 | 
			
		||||
Raw Blueberry pie=Kruda Mirtelokuko
 | 
			
		||||
Slice of Blueberry pie=Tranĉaĵo de Mirtelokuko
 | 
			
		||||
Basket with Raspberry pies=Korbo kun Frambokukoj
 | 
			
		||||
Cooked Raspberry pie=Kuirita Frambokuko
 | 
			
		||||
Raspberry=Frambo
 | 
			
		||||
Raspberry Bush=Framba Arbusto
 | 
			
		||||
Raw Raspberry pie=Kruda Frambokuko
 | 
			
		||||
Slice of Raspberry pie=Tranĉaĵo de Frambokuko
 | 
			
		||||
Basket with Gooseberry pies=Korbo kun Grosberkuko
 | 
			
		||||
Cooked Gooseberry pie=Kuirita Grosberkuko
 | 
			
		||||
Gooseberry=Grosbero
 | 
			
		||||
Gooseberry Bush=Grosberarbusto
 | 
			
		||||
Raw Gooseberry pie=Kruda Grosberkuko
 | 
			
		||||
Slice of Gooseberry pie=Tranĉaĵo de Grosberkuko
 | 
			
		||||
Basket with Mixed Berry pies=Korbo kun Miksitaj Beraj Kukoj
 | 
			
		||||
Cooked Mixed Berry pie=Kuirita Miksa Beraj Kukoj
 | 
			
		||||
Currently fruitless Bush=Nuntempe senfrukta Arbusto
 | 
			
		||||
Mixed Berry=Miksita Bero
 | 
			
		||||
Raw Mixed Berry pie=Kruda Miksita Bera Kuko
 | 
			
		||||
Slice of Mixed Berry pie=Tranĉaĵo de Miksita Bera Kuko
 | 
			
		||||
Basket=Korbo
 | 
			
		||||
							
								
								
									
										46
									
								
								bushes_classic/locale/bushes_classic.es.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,46 @@
 | 
			
		||||
# textdomain: bushes_classic
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# Carlos Barraza <carlosbarrazaes@gmail.com>, 2017.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Sugar=Azúcar
 | 
			
		||||
Basket with Strawberry pies=Cesta con Pasteles de Frutilla
 | 
			
		||||
Cooked Strawberry pie=Pastel de Frutilla Cocido
 | 
			
		||||
Raw Strawberry pie=Pastel de Frutilla Crudo
 | 
			
		||||
Slice of Strawberry pie=Rebanada de Pastel de Frutilla
 | 
			
		||||
Strawberry=Frutilla
 | 
			
		||||
Strawberry Bush=Arbusto de Frutilla
 | 
			
		||||
Basket with Blackberry pies=Cesta con Pasteles de Mora
 | 
			
		||||
Blackberry=Mora
 | 
			
		||||
Blackberry Bush=Arbusto de Mora
 | 
			
		||||
Cooked Blackberry pie=Pastel de Mora Cocido
 | 
			
		||||
Raw Blackberry pie=Pastel de Mora Crudo
 | 
			
		||||
Slice of Blackberry pie=Rebanada de Pastel de Mora
 | 
			
		||||
Basket with Blueberry pies=Cesta con Pasteles de Arándano
 | 
			
		||||
Blueberry=Arándano
 | 
			
		||||
Blueberry Bush=Arbusto de Arándano
 | 
			
		||||
Cooked Blueberry pie=Pastel de Arándano Cocido
 | 
			
		||||
Raw Blueberry pie=Pastel de Arándano Crudo
 | 
			
		||||
Slice of Blueberry pie=Rebanada de Pastel de Arándano
 | 
			
		||||
Basket with Raspberry pies=Cesta con Pasteles de Frambuesa
 | 
			
		||||
Cooked Raspberry pie=Pastel de Frambuesa Cocido
 | 
			
		||||
Raspberry=Frambuesa
 | 
			
		||||
Raspberry Bush=Arbusto de Frambuesa
 | 
			
		||||
Raw Raspberry pie=Pastel de Frambuesa Crudo
 | 
			
		||||
Slice of Raspberry pie=Rebanada de Pastel de Frambuesa
 | 
			
		||||
Basket with Gooseberry pies=Cesta con Pasteles de Grosella
 | 
			
		||||
Cooked Gooseberry pie=Pastel de Grosella Cocido
 | 
			
		||||
Gooseberry=Grosella
 | 
			
		||||
Gooseberry Bush=Arbusto de Grosella
 | 
			
		||||
Raw Gooseberry pie=Pastel de Grosella Crudo
 | 
			
		||||
Slice of Gooseberry pie=Rebanada de Pastel de Grosella
 | 
			
		||||
Basket with Mixed Berry pies=Cesta con Pasteles de Mezcla de Baya
 | 
			
		||||
Cooked Mixed Berry pie=Pastel de Mezcla de Bayas Cocido
 | 
			
		||||
Currently fruitless Bush=Arbusto actualmente infructuoso
 | 
			
		||||
Mixed Berry=Mezcla de Baya
 | 
			
		||||
Raw Mixed Berry pie=Pastel de Mezcla de Bayas Cruda
 | 
			
		||||
Slice of Mixed Berry pie=Rebanada de Pastel de Mezcla de Bayas
 | 
			
		||||
Basket=Cesta
 | 
			
		||||
							
								
								
									
										46
									
								
								bushes_classic/locale/bushes_classic.fr.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,46 @@
 | 
			
		||||
# textdomain: bushes_classic
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# fat115 <fat115@framasoft.org>, 2017.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Sugar=Sucre
 | 
			
		||||
Basket with Strawberry pies=Panier de tartes aux fraises
 | 
			
		||||
Cooked Strawberry pie=Tarte aux fraises (cuite)
 | 
			
		||||
Raw Strawberry pie=Tarte aux fraises (crue)
 | 
			
		||||
Slice of Strawberry pie=Part de tarte aux fraises
 | 
			
		||||
Strawberry=Fraises
 | 
			
		||||
Strawberry Bush=Buisson de fraises
 | 
			
		||||
Basket with Blackberry pies=Panier de tartes aux fraises
 | 
			
		||||
Blackberry=Mûres
 | 
			
		||||
Blackberry Bush=Buisson de mûres
 | 
			
		||||
Cooked Blackberry pie=Tarte aux mûres (cuite)
 | 
			
		||||
Raw Blackberry pie=Tarte aux mûres (crue)
 | 
			
		||||
Slice of Blackberry pie=Part de tarte aux mûres
 | 
			
		||||
Basket with Blueberry pies=Panier de tartes aux mûres
 | 
			
		||||
Blueberry=Myrtilles
 | 
			
		||||
Blueberry Bush=Buisson de myrtilles
 | 
			
		||||
Cooked Blueberry pie=Tarte aux myrtilles (cuite)
 | 
			
		||||
Raw Blueberry pie=Tarte aux myrtilles (crue)
 | 
			
		||||
Slice of Blueberry pie=Part de tarte aux myrtilles
 | 
			
		||||
Basket with Raspberry pies=Panier de tartes aux framboises
 | 
			
		||||
Cooked Raspberry pie=Tarte aux framboises (cuite)
 | 
			
		||||
Raspberry=Framboises
 | 
			
		||||
Raspberry Bush=Buisson de framboises
 | 
			
		||||
Raw Raspberry pie=Tarte aux framboises (crue)
 | 
			
		||||
Slice of Raspberry pie=Part de tarts aux framboises
 | 
			
		||||
Basket with Gooseberry pies=Panier de tartes aux groseilles
 | 
			
		||||
Cooked Gooseberry pie=Tarte aux groseilles (cuite)
 | 
			
		||||
Gooseberry=Groseilles
 | 
			
		||||
Gooseberry Bush=Buisson de groseilles
 | 
			
		||||
Raw Gooseberry pie=Tarte aux groseilles (crue)
 | 
			
		||||
Slice of Gooseberry pie=Part de tarte aux groseilles
 | 
			
		||||
Basket with Mixed Berry pies=Panier de tartes aux fruits rouges
 | 
			
		||||
Cooked Mixed Berry pie=Tarte aux fruits rouges (cuite)
 | 
			
		||||
Currently fruitless Bush=Buisson sans fruits pour l'instant
 | 
			
		||||
Mixed Berry=Fruits rouges
 | 
			
		||||
Raw Mixed Berry pie=Tarte aux fruits rouges (crue)
 | 
			
		||||
Slice of Mixed Berry pie=Part de tarte aux fruits rouges
 | 
			
		||||
Basket=Panier
 | 
			
		||||
							
								
								
									
										46
									
								
								bushes_classic/locale/bushes_classic.tr.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,46 @@
 | 
			
		||||
# textdomain: bushes_classic
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# mahmutelmas06@hotmail.com, 2017.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Sugar=Şeker
 | 
			
		||||
Basket with Strawberry pies=Çilekli pasta sepeti
 | 
			
		||||
Cooked Strawberry pie=Pişmiş çilekli pasta 
 | 
			
		||||
Raw Strawberry pie=Çilekli çiğ pasta
 | 
			
		||||
Slice of Strawberry pie=Çilekli pasta dilimi
 | 
			
		||||
Strawberry=Çilek
 | 
			
		||||
Strawberry Bush=Çilek fidanı
 | 
			
		||||
Basket with Blackberry pies=Böğürtlenli pasta sepeti
 | 
			
		||||
Blackberry=Böğürtlen
 | 
			
		||||
Blackberry Bush=Böğürtlen fidanı
 | 
			
		||||
Cooked Blackberry pie=Pişmiş böğürtlenli pasta
 | 
			
		||||
Raw Blackberry pie=Böğürtlenli çiğ pasta
 | 
			
		||||
Slice of Blackberry pie=Böğürtlenli pasta dilimi
 | 
			
		||||
Basket with Blueberry pies=Yaban mersini pastalı sepet
 | 
			
		||||
Blueberry=Yaban mersini
 | 
			
		||||
Blueberry Bush=Yaban mersini fidanı
 | 
			
		||||
Cooked Blueberry pie=Pişmiş yaban mersinli pasta
 | 
			
		||||
Raw Blueberry pie=Yaban mersinli çiğ pasta
 | 
			
		||||
Slice of Blueberry pie=Yaban mersinli pasta dilimi
 | 
			
		||||
Basket with Raspberry pies=Ahududulu pasta sepeti
 | 
			
		||||
Cooked Raspberry pie=Pişmiş ahududulu pasta
 | 
			
		||||
Raspberry=Ahududu
 | 
			
		||||
Raspberry Bush=Ahududu fidanı
 | 
			
		||||
Raw Raspberry pie=Ahududulu çiğ pasta
 | 
			
		||||
Slice of Raspberry pie=Ahududulu pasta dilimi
 | 
			
		||||
Basket with Gooseberry pies=Bektaşi üzümlü pasta sepeti
 | 
			
		||||
Cooked Gooseberry pie=Pişmiş bektaşi üzümlü pasta
 | 
			
		||||
Gooseberry=Bektaşi üzümü
 | 
			
		||||
Gooseberry Bush=Bektaşi üzümü fidanı
 | 
			
		||||
Raw Gooseberry pie=Bektaşi üzümlü çiğ pasta
 | 
			
		||||
Slice of Gooseberry pie=Bektaşi üzümlü pasta dilimi
 | 
			
		||||
Basket with Mixed Berry pies=Dutlu pasta sepeti
 | 
			
		||||
Cooked Mixed Berry pie=Pişmiş dutlu pasta
 | 
			
		||||
Currently fruitless Bush=Fidanı şu anda meyvesiz
 | 
			
		||||
Mixed Berry=Dut
 | 
			
		||||
Raw Mixed Berry pie=Dutlu çiğ pasta
 | 
			
		||||
Slice of Mixed Berry pie=Dutlu pasta dilimi
 | 
			
		||||
Basket=Sepet
 | 
			
		||||
							
								
								
									
										46
									
								
								bushes_classic/locale/template.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,46 @@
 | 
			
		||||
# textdomain: bushes_classic
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Sugar=
 | 
			
		||||
Basket with Strawberry pies=
 | 
			
		||||
Cooked Strawberry pie=
 | 
			
		||||
Raw Strawberry pie=
 | 
			
		||||
Slice of Strawberry pie=
 | 
			
		||||
Strawberry=
 | 
			
		||||
Strawberry Bush=
 | 
			
		||||
Basket with Blackberry pies=
 | 
			
		||||
Blackberry=
 | 
			
		||||
Blackberry Bush=
 | 
			
		||||
Cooked Blackberry pie=
 | 
			
		||||
Raw Blackberry pie=
 | 
			
		||||
Slice of Blackberry pie=
 | 
			
		||||
Basket with Blueberry pies=
 | 
			
		||||
Blueberry=
 | 
			
		||||
Blueberry Bush=
 | 
			
		||||
Cooked Blueberry pie=
 | 
			
		||||
Raw Blueberry pie=
 | 
			
		||||
Slice of Blueberry pie=
 | 
			
		||||
Basket with Raspberry pies=
 | 
			
		||||
Cooked Raspberry pie=
 | 
			
		||||
Raspberry=
 | 
			
		||||
Raspberry Bush=
 | 
			
		||||
Raw Raspberry pie=
 | 
			
		||||
Slice of Raspberry pie=
 | 
			
		||||
Basket with Gooseberry pies=
 | 
			
		||||
Cooked Gooseberry pie=
 | 
			
		||||
Gooseberry=
 | 
			
		||||
Gooseberry Bush=
 | 
			
		||||
Raw Gooseberry pie=
 | 
			
		||||
Slice of Gooseberry pie=
 | 
			
		||||
Basket with Mixed Berry pies=
 | 
			
		||||
Cooked Mixed Berry pie=
 | 
			
		||||
Currently fruitless Bush=
 | 
			
		||||
Mixed Berry=
 | 
			
		||||
Raw Mixed Berry pie=
 | 
			
		||||
Slice of Mixed Berry pie=
 | 
			
		||||
Basket=
 | 
			
		||||
							
								
								
									
										3
									
								
								bushes_classic/mod.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,3 @@
 | 
			
		||||
name = bushes_classic
 | 
			
		||||
depends = biome_lib
 | 
			
		||||
optional_depends = farming, farming_plus
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("bushes_classic")
 | 
			
		||||
 | 
			
		||||
plantlife_bushes = {}
 | 
			
		||||
 | 
			
		||||
@@ -63,7 +63,7 @@ plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
 | 
			
		||||
 | 
			
		||||
		-- with a chance of 1/3, return 2 bushes
 | 
			
		||||
		local amount
 | 
			
		||||
		if math.random(1,3) == 1 then
 | 
			
		||||
		if can_harvest and math.random(1,3) == 1 then
 | 
			
		||||
			amount = "2"
 | 
			
		||||
		else
 | 
			
		||||
			amount = "1"
 | 
			
		||||
@@ -174,6 +174,13 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
 | 
			
		||||
		texture_bottom = "bushes_bush_bottom.png"
 | 
			
		||||
	end
 | 
			
		||||
	
 | 
			
		||||
	local node_dig_prediction
 | 
			
		||||
	local node_placement_prediction
 | 
			
		||||
	if bush_name ~= "fruitless" then
 | 
			
		||||
		node_dig_prediction = "bushes:fruitless_bush"
 | 
			
		||||
		node_placement_prediction = "bushes:fruitless_bush"
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	minetest.register_node(":bushes:" .. bush_name .. "_bush", {
 | 
			
		||||
		description = bushes_classic.bushes_descriptions[i][6],
 | 
			
		||||
		drawtype = "mesh",
 | 
			
		||||
@@ -185,6 +192,8 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
 | 
			
		||||
		groups = groups,
 | 
			
		||||
		sounds = default.node_sound_leaves_defaults(),
 | 
			
		||||
		drop = "",
 | 
			
		||||
		node_dig_prediction = node_dig_prediction,
 | 
			
		||||
		node_placement_prediction = node_placement_prediction,
 | 
			
		||||
		after_dig_node = function( pos, oldnode, oldmetadata, digger )
 | 
			
		||||
			return plantlife_bushes.after_dig_node(pos, oldnode, oldmetadata, digger);
 | 
			
		||||
		end,
 | 
			
		||||
 
 | 
			
		||||
@@ -1,2 +0,0 @@
 | 
			
		||||
default
 | 
			
		||||
plantlife_i18n
 | 
			
		||||
@@ -5,7 +5,9 @@ local mname		= "cavestuff"
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("cavestuff")
 | 
			
		||||
 | 
			
		||||
cavestuff = {}
 | 
			
		||||
 | 
			
		||||
dofile(minetest.get_modpath("cavestuff").."/nodes.lua")
 | 
			
		||||
dofile(minetest.get_modpath("cavestuff").."/mapgen.lua")
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								cavestuff/locale/cavestuff.de.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,11 @@
 | 
			
		||||
# textdomain: cavestuff
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# reusityback, 2022.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Pebble=Kieselstein
 | 
			
		||||
Desert Pebble=Wüstenkiesel
 | 
			
		||||
Stalactite=Stalaktit
 | 
			
		||||
							
								
								
									
										11
									
								
								cavestuff/locale/cavestuff.eo.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,11 @@
 | 
			
		||||
# textdomain: cavestuff
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# Jolesh, 2022.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Pebble=Ŝtoneto
 | 
			
		||||
Desert Pebble=Dezerta Ŝtoneto
 | 
			
		||||
Stalactite=Stalaktito
 | 
			
		||||
							
								
								
									
										11
									
								
								cavestuff/locale/cavestuff.fr.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,11 @@
 | 
			
		||||
# textdomain: cavestuff
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# fat115 <fat115@framasoft.org>, 2017.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Pebble=Caillou
 | 
			
		||||
Desert Pebble=Caillou du désert
 | 
			
		||||
Stalactite=Stalactite
 | 
			
		||||
							
								
								
									
										11
									
								
								cavestuff/locale/template.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,11 @@
 | 
			
		||||
# textdomain: cavestuff
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Pebble=
 | 
			
		||||
Desert Pebble=
 | 
			
		||||
Stalactite=
 | 
			
		||||
@@ -1,52 +1,65 @@
 | 
			
		||||
--Map Generation Stuff
 | 
			
		||||
 | 
			
		||||
minetest.register_on_generated(function(minp, maxp, seed)
 | 
			
		||||
	if maxp.y >= 2 and minp.y <= 0 then
 | 
			
		||||
		-- Generate pebbles
 | 
			
		||||
		local perlin1 = minetest.get_perlin(329, 3, 0.6, 100)
 | 
			
		||||
		-- Assume X and Z lengths are equal
 | 
			
		||||
		local divlen = 16
 | 
			
		||||
		local divs = (maxp.x-minp.x)/divlen+1;
 | 
			
		||||
		for divx=0,divs-1 do
 | 
			
		||||
		for divz=0,divs-1 do
 | 
			
		||||
			local x0 = minp.x + math.floor((divx+0)*divlen)
 | 
			
		||||
			local z0 = minp.z + math.floor((divz+0)*divlen)
 | 
			
		||||
			local x1 = minp.x + math.floor((divx+1)*divlen)
 | 
			
		||||
			local z1 = minp.z + math.floor((divz+1)*divlen)
 | 
			
		||||
			-- Determine pebble amount from perlin noise
 | 
			
		||||
			local pebble_amount = math.floor(perlin1:get2d({x=x0, y=z0}) ^ 2 * 2)
 | 
			
		||||
			-- Find random positions for pebbles based on this random
 | 
			
		||||
			local pr = PseudoRandom(seed+1)
 | 
			
		||||
			for i=0,pebble_amount do
 | 
			
		||||
				local x = pr:next(x0, x1)
 | 
			
		||||
				local z = pr:next(z0, z1)
 | 
			
		||||
				-- Find ground level (0...15)
 | 
			
		||||
				local ground_y = nil
 | 
			
		||||
				for y=30,0,-1 do
 | 
			
		||||
					if minetest.get_node({x=x,y=y,z=z}).name ~= "air" then
 | 
			
		||||
						ground_y = y
 | 
			
		||||
						break
 | 
			
		||||
					end
 | 
			
		||||
				end
 | 
			
		||||
minetest.register_decoration({
 | 
			
		||||
	decoration = {
 | 
			
		||||
		"cavestuff:pebble_1",
 | 
			
		||||
		"cavestuff:pebble_2"
 | 
			
		||||
	},
 | 
			
		||||
	place_on = {
 | 
			
		||||
		"default:dirt_with_grass",
 | 
			
		||||
		"default:gravel",
 | 
			
		||||
		"default:stone",
 | 
			
		||||
		"default:permafrost_with_stones"
 | 
			
		||||
	},
 | 
			
		||||
	noise_params = {
 | 
			
		||||
		offset = 0,
 | 
			
		||||
		scale = 0.0078125,
 | 
			
		||||
		spread = {
 | 
			
		||||
			y = 100,
 | 
			
		||||
			z = 100,
 | 
			
		||||
			x = 100
 | 
			
		||||
		},
 | 
			
		||||
		seed = 0,
 | 
			
		||||
		octaves = 3,
 | 
			
		||||
		persist = 0.6,
 | 
			
		||||
		flags = "absvalue",
 | 
			
		||||
		lacunarity = 2
 | 
			
		||||
	},
 | 
			
		||||
	param2 = 0,
 | 
			
		||||
	flags = "all_floors",
 | 
			
		||||
	deco_type = "simple",
 | 
			
		||||
	param2_max = 3,
 | 
			
		||||
	y_min = -16,
 | 
			
		||||
	y_max = 48
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
				if ground_y then
 | 
			
		||||
					local p = {x=x,y=ground_y+1,z=z}
 | 
			
		||||
					local nn = minetest.get_node(p).name
 | 
			
		||||
					-- Check if the node can be replaced
 | 
			
		||||
					if minetest.registered_nodes[nn] and
 | 
			
		||||
						minetest.registered_nodes[nn].buildable_to then
 | 
			
		||||
						nn = minetest.get_node({x=x,y=ground_y,z=z}).name
 | 
			
		||||
						-- If desert sand, add dry shrub
 | 
			
		||||
						if nn == "default:dirt_with_grass" then
 | 
			
		||||
							minetest.swap_node(p,{name="cavestuff:pebble_"..pr:next(1,2), param2=math.random(0,3)})
 | 
			
		||||
						elseif nn == "default:desert_sand" then
 | 
			
		||||
							minetest.swap_node(p,{name="cavestuff:desert_pebble_"..pr:next(1,2), param2=math.random(0,3)})
 | 
			
		||||
					    end
 | 
			
		||||
					end
 | 
			
		||||
				end
 | 
			
		||||
 | 
			
		||||
			end
 | 
			
		||||
		end
 | 
			
		||||
		end
 | 
			
		||||
	end
 | 
			
		||||
end)
 | 
			
		||||
minetest.register_decoration({
 | 
			
		||||
	decoration = {
 | 
			
		||||
		"cavestuff:desert_pebble_1",
 | 
			
		||||
		"cavestuff:desert_pebble_2"
 | 
			
		||||
	},
 | 
			
		||||
	place_on = {
 | 
			
		||||
		"default:desert_sand",
 | 
			
		||||
		"default:desert_stone"
 | 
			
		||||
	},
 | 
			
		||||
	noise_params = {
 | 
			
		||||
		offset = 0,
 | 
			
		||||
		scale = 0.0078125,
 | 
			
		||||
		spread = {
 | 
			
		||||
				y = 100,
 | 
			
		||||
				z = 100,
 | 
			
		||||
				x = 100
 | 
			
		||||
		},
 | 
			
		||||
		seed = 0,
 | 
			
		||||
		octaves = 3,
 | 
			
		||||
		persist = 0.6,
 | 
			
		||||
		flags = "absvalue",
 | 
			
		||||
		lacunarity = 2
 | 
			
		||||
	},
 | 
			
		||||
	param2 = 0,
 | 
			
		||||
	flags = "all_floors",
 | 
			
		||||
	deco_type = "simple",
 | 
			
		||||
	param2_max = 3,
 | 
			
		||||
	y_min = -16,
 | 
			
		||||
	y_max = 48
 | 
			
		||||
})
 | 
			
		||||
							
								
								
									
										2
									
								
								cavestuff/mod.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,2 @@
 | 
			
		||||
name = cavestuff
 | 
			
		||||
depends = default
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("cavestuff")
 | 
			
		||||
 | 
			
		||||
--Rocks
 | 
			
		||||
 | 
			
		||||
@@ -15,7 +15,7 @@ minetest.register_node("cavestuff:pebble_1",{
 | 
			
		||||
	 tiles = {"undergrowth_pebble.png"},
 | 
			
		||||
	 paramtype = "light",
 | 
			
		||||
	paramtype2 = "facedir",
 | 
			
		||||
    groups = {cracky=3, stone=1},
 | 
			
		||||
	 groups = {cracky=3, stone=1, attached_node=1},
 | 
			
		||||
	 selection_box = cbox,
 | 
			
		||||
	 collision_box = cbox,
 | 
			
		||||
	 on_place = function(itemstack, placer, pointed_thing)
 | 
			
		||||
@@ -35,7 +35,7 @@ minetest.register_node("cavestuff:pebble_2",{
 | 
			
		||||
	 tiles = {"undergrowth_pebble.png"},
 | 
			
		||||
	 paramtype = "light",
 | 
			
		||||
	paramtype2 = "facedir",
 | 
			
		||||
    groups = {cracky=3, stone=1, not_in_creative_inventory=1},
 | 
			
		||||
	 groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
 | 
			
		||||
	selection_box = cbox,
 | 
			
		||||
	collision_box = cbox,
 | 
			
		||||
	 sounds = default.node_sound_stone_defaults(),
 | 
			
		||||
@@ -48,7 +48,7 @@ minetest.register_node("cavestuff:desert_pebble_1",{
 | 
			
		||||
	 tiles = {"default_desert_stone.png"},
 | 
			
		||||
	 paramtype = "light",
 | 
			
		||||
	paramtype2 = "facedir",
 | 
			
		||||
    groups = {cracky=3, stone=1},
 | 
			
		||||
	 groups = {cracky=3, stone=1, attached_node=1},
 | 
			
		||||
	selection_box = cbox,
 | 
			
		||||
	collision_box = cbox,
 | 
			
		||||
	 on_place = function(itemstack, placer, pointed_thing)
 | 
			
		||||
@@ -67,7 +67,7 @@ minetest.register_node("cavestuff:desert_pebble_2",{
 | 
			
		||||
	 tiles = {"default_desert_stone.png"},
 | 
			
		||||
	 paramtype = "light",
 | 
			
		||||
	paramtype2 = "facedir",
 | 
			
		||||
    groups = {cracky=3, stone=1, not_in_creative_inventory=1},
 | 
			
		||||
	 groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
 | 
			
		||||
	selection_box = cbox,
 | 
			
		||||
	collision_box = cbox,
 | 
			
		||||
	 sounds = default.node_sound_stone_defaults(),
 | 
			
		||||
@@ -85,19 +85,34 @@ minetest.register_node("cavestuff:stalactite_1",{
 | 
			
		||||
	node_box = {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
		fixed = {
 | 
			
		||||
			{-0.187500,0.425000,-0.150003,0.162500,0.500000,0.162500},
 | 
			
		||||
			{-0.112500,0.162500,-0.100000,0.087500,0.475000,0.087500},
 | 
			
		||||
			{-0.062500,-0.275000,-0.062500,0.062500,0.500000,0.062500},
 | 
			
		||||
			{-0.037500,-0.837500,0.037500,0.037500,0.500000,-0.025000},
 | 
			
		||||
			{-0.187500,-0.425000,-0.150003,0.162500,-0.500000,0.162500},
 | 
			
		||||
			{-0.112500,-0.162500,-0.100000,0.087500,-0.475000,0.087500},
 | 
			
		||||
			{-0.062500,0.275000,-0.062500,0.062500,-0.500000,0.062500},
 | 
			
		||||
			{-0.037500,0.837500,0.037500,0.037500,-0.500000,-0.025000},
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	on_place = function(itemstack, placer, pointed_thing)
 | 
			
		||||
		local pt = pointed_thing
 | 
			
		||||
		if minetest.get_node(pt.under).name=="default:stone"
 | 
			
		||||
		and minetest.get_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}).name=="air"
 | 
			
		||||
		and minetest.get_node({x=pt.under.x, y=pt.under.y-2, z=pt.under.z}).name=="air" then
 | 
			
		||||
			minetest.swap_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}, {name="cavestuff:stalactite_"..math.random(1,3)})
 | 
			
		||||
		local dir = vector.subtract(pointed_thing.above, pointed_thing.under)
 | 
			
		||||
		local base = pointed_thing.under
 | 
			
		||||
		local place = vector.add(base, dir)
 | 
			
		||||
		local above = vector.add(place, dir)
 | 
			
		||||
 | 
			
		||||
		if not placer then return end
 | 
			
		||||
		local playername = placer:get_player_name()
 | 
			
		||||
		if minetest.is_protected(place, playername)
 | 
			
		||||
		or minetest.is_protected(above, playername) then 
 | 
			
		||||
			minetest.record_protection_violation(place, playername)
 | 
			
		||||
			return
 | 
			
		||||
		end
 | 
			
		||||
 | 
			
		||||
		if minetest.get_node(base).name == "default:stone"
 | 
			
		||||
		and minetest.get_node(place).name == "air"
 | 
			
		||||
		and minetest.get_node(above).name == "air"
 | 
			
		||||
		then
 | 
			
		||||
			minetest.swap_node(place, {
 | 
			
		||||
				name = "cavestuff:stalactite_"..math.random(1,3),
 | 
			
		||||
				param2 = minetest.dir_to_wallmounted(vector.multiply(dir, -1))
 | 
			
		||||
			})
 | 
			
		||||
			if not minetest.setting_getbool("creative_mode") then
 | 
			
		||||
				itemstack:take_item()
 | 
			
		||||
			end
 | 
			
		||||
@@ -116,10 +131,10 @@ minetest.register_node("cavestuff:stalactite_2",{
 | 
			
		||||
	node_box = {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
		fixed = {
 | 
			
		||||
				{-0.187500,0.387500,-0.150003,0.162500,0.500000,0.162500},
 | 
			
		||||
	            {-0.112500,0.112500,-0.100000,0.087500,0.475000,0.087500},
 | 
			
		||||
	            {-0.062500,-0.675000,-0.062500,0.062500,0.500000,0.062500},
 | 
			
		||||
	            {-0.037500,-0.975000,0.037500,0.037500,0.500000,-0.025000},
 | 
			
		||||
			{-0.187500,-0.387500,-0.150003,0.162500,-0.500000,0.162500},
 | 
			
		||||
			{-0.112500,-0.112500,-0.100000,0.087500,-0.475000,0.087500},
 | 
			
		||||
			{-0.062500,0.675000,-0.062500,0.062500,-0.500000,0.062500},
 | 
			
		||||
			{-0.037500,0.975000,0.037500,0.037500,-0.500000,-0.025000},
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
})
 | 
			
		||||
@@ -134,10 +149,10 @@ minetest.register_node("cavestuff:stalactite_3",{
 | 
			
		||||
	node_box = {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
		fixed = {
 | 
			
		||||
		   {-0.187500,0.387500,-0.150003,0.162500,0.500000,0.162500},
 | 
			
		||||
		   {-0.112500,0.037500,-0.100000,0.087500,0.475000,0.087500},
 | 
			
		||||
		   {-0.062500,-0.437500,-0.062500,0.062500,0.500000,0.062500},
 | 
			
		||||
		   {-0.037500,-1.237500,0.037500,0.037500,0.500000,-0.025000},
 | 
			
		||||
			{-0.187500,-0.387500,-0.150003,0.162500,-0.500000,0.162500},
 | 
			
		||||
			{-0.112500,-0.037500,-0.100000,0.087500,-0.475000,0.087500},
 | 
			
		||||
			{-0.062500,0.437500,-0.062500,0.062500,-0.500000,0.062500},
 | 
			
		||||
			{-0.037500,1.237500,0.037500,0.037500,-0.500000,-0.025000},
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +0,0 @@
 | 
			
		||||
default
 | 
			
		||||
biome_lib
 | 
			
		||||
plantlife_i18n
 | 
			
		||||
farming?
 | 
			
		||||
@@ -14,7 +14,7 @@ local mname		= "dryplants"
 | 
			
		||||
abstract_dryplants = {}
 | 
			
		||||
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("dryplants")
 | 
			
		||||
 | 
			
		||||
dofile(minetest.get_modpath("dryplants").."/crafting.lua")
 | 
			
		||||
dofile(minetest.get_modpath("dryplants").."/settings.txt")
 | 
			
		||||
@@ -130,6 +130,7 @@ minetest.register_node("dryplants:grass", {
 | 
			
		||||
	paramtype = "light",
 | 
			
		||||
	sunlight_propagates = true,
 | 
			
		||||
	tiles = {"dryplants_grass.png"},
 | 
			
		||||
	use_texture_alpha = "clip",
 | 
			
		||||
	drawtype = "nodebox",
 | 
			
		||||
	node_box = {
 | 
			
		||||
	    type = "fixed",
 | 
			
		||||
@@ -161,6 +162,7 @@ minetest.register_node("dryplants:hay", {
 | 
			
		||||
	paramtype = "light",
 | 
			
		||||
	sunlight_propagates = true,
 | 
			
		||||
	tiles = {"dryplants_hay.png"},
 | 
			
		||||
	use_texture_alpha = "clip",
 | 
			
		||||
	drawtype = "nodebox",
 | 
			
		||||
	node_box = {
 | 
			
		||||
	    type = "fixed",
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("dryplants")
 | 
			
		||||
 | 
			
		||||
abstract_dryplants.grow_juncus = function(pos)
 | 
			
		||||
	local juncus_type = math.random(2,3)
 | 
			
		||||
@@ -92,7 +92,7 @@ minetest.register_node("dryplants:juncus_02", {
 | 
			
		||||
-- GENERATE SMALL JUNCUS
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
-- near water or swamp
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
biome_lib.register_on_generate({
 | 
			
		||||
    surface = {
 | 
			
		||||
		"default:dirt_with_grass",
 | 
			
		||||
		--"default:desert_sand",
 | 
			
		||||
@@ -113,7 +113,7 @@ biome_lib:register_generate_plant({
 | 
			
		||||
  abstract_dryplants.grow_juncus
 | 
			
		||||
)
 | 
			
		||||
-- at dunes/beach
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
biome_lib.register_on_generate({
 | 
			
		||||
    surface = {
 | 
			
		||||
		--"default:dirt_with_grass",
 | 
			
		||||
		--"default:desert_sand",
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										28
									
								
								dryplants/locale/dryplants.de.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,28 @@
 | 
			
		||||
# textdomain: dryplants
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# reusityback, 2022.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Sickle=Sichel
 | 
			
		||||
Cut Grass=Gras schneiden
 | 
			
		||||
Hay=Heu
 | 
			
		||||
Short Grass=Kurzes Gras
 | 
			
		||||
Juncus=Binsen
 | 
			
		||||
Wet Reed=Nasses Schilf
 | 
			
		||||
Wet Reed Slab=Nasse Schilfstufe
 | 
			
		||||
Wet Reed Roof=Nasses Schilfdach
 | 
			
		||||
Wet Reed Roof Corner=Nasser Schilfdachwinkel
 | 
			
		||||
Wet Reed Roof Corner 2=Nasser Schilfdachwinkel 2
 | 
			
		||||
Reed=Schilf
 | 
			
		||||
Reed Slab=Schilfstufe
 | 
			
		||||
Reed Roof=Schilfdach
 | 
			
		||||
Reed Roof Corner=Schilfdachwinkel
 | 
			
		||||
Reed Roof Corner 2=Schilfdachwinkel
 | 
			
		||||
Reedmace=Rohrkolben
 | 
			
		||||
Reedmace, height: 1=Rohrkolben, Höhe: 1
 | 
			
		||||
Reedmace, height: 2=Rohrkolben, Höhe: 2
 | 
			
		||||
Reedmace, height: 3=Rohrkolben, Höhe: 3
 | 
			
		||||
Reedmace, height: 3 & Spikes=Rohrkolben, Höhe: 3 & Rispe
 | 
			
		||||
							
								
								
									
										28
									
								
								dryplants/locale/dryplants.eo.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,28 @@
 | 
			
		||||
# textdomain: dryplants
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# Jolesh, 2022.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Sickle=
 | 
			
		||||
Cut Grass=Tranĉita Herbenon
 | 
			
		||||
Hay=Fojno
 | 
			
		||||
Short Grass=Mallonga Herbo
 | 
			
		||||
Juncus=Junko
 | 
			
		||||
Wet Reed=Malseka Kano
 | 
			
		||||
Wet Reed Slab=Slabo de Malseka Kano
 | 
			
		||||
Wet Reed Roof=Tegmento de Malseka Kano
 | 
			
		||||
Wet Reed Roof Corner=Tegmentangulo de Malseka Kano
 | 
			
		||||
Wet Reed Roof Corner 2=Tegmentangulo 2 de Malseka Kano
 | 
			
		||||
Reed=Kano
 | 
			
		||||
Reed Slab=Slabo de Kano
 | 
			
		||||
Reed Roof=Tegmento de Kano
 | 
			
		||||
Reed Roof Corner=Tegmentangulo de Kano
 | 
			
		||||
Reed Roof Corner 2=Tegmentangulo 2 de Kano
 | 
			
		||||
Reedmace=Tifeo
 | 
			
		||||
Reedmace, height: 1=Tifeo, alteco: 1
 | 
			
		||||
Reedmace, height: 2=Tifeo, alteco: 2
 | 
			
		||||
Reedmace, height: 3=Tifeo, alteco: 3
 | 
			
		||||
Reedmace, height: 3 & Spikes=Tifeo, alteco: 3 & Pikiloj
 | 
			
		||||
							
								
								
									
										28
									
								
								dryplants/locale/dryplants.fr.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,28 @@
 | 
			
		||||
# textdomain: dryplants
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# fat115 <fat115@framasoft.org>, 2017.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Sickle=Faucille
 | 
			
		||||
Cut Grass=Herbe coupée
 | 
			
		||||
Hay=Foin
 | 
			
		||||
Short Grass=Herbes courtes
 | 
			
		||||
Juncus=Joncs
 | 
			
		||||
Wet Reed=Bloc de roseau humide
 | 
			
		||||
Wet Reed Slab=Dalle en roseau humide
 | 
			
		||||
Wet Reed Roof=Toit en roseau humide
 | 
			
		||||
Wet Reed Roof Corner=Angle de toit en roseau humide
 | 
			
		||||
Wet Reed Roof Corner 2=Angle de toit en roseau humide 2
 | 
			
		||||
Reed=Roseau
 | 
			
		||||
Reed Slab=Dalle en roseau
 | 
			
		||||
Reed Roof=Toit en roseau
 | 
			
		||||
Reed Roof Corner=Angle de toit en roseau
 | 
			
		||||
Reed Roof Corner 2=Angle de toit en roseau 2
 | 
			
		||||
Reedmace=Roseau
 | 
			
		||||
Reedmace, height: 1=Roseau, 1 de hauteur
 | 
			
		||||
Reedmace, height: 2=Roseau, 2 de hauteur
 | 
			
		||||
Reedmace, height: 3=Roseau, 3 de hauteur
 | 
			
		||||
Reedmace, height: 3 & Spikes=Roseau, 3 de hauteur avec panicules
 | 
			
		||||
							
								
								
									
										28
									
								
								dryplants/locale/template.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,28 @@
 | 
			
		||||
# textdomain: dryplants
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Sickle=
 | 
			
		||||
Cut Grass=
 | 
			
		||||
Hay=
 | 
			
		||||
Short Grass=
 | 
			
		||||
Juncus=
 | 
			
		||||
Wet Reed=
 | 
			
		||||
Wet Reed Slab=
 | 
			
		||||
Wet Reed Roof=
 | 
			
		||||
Wet Reed Roof Corner=
 | 
			
		||||
Wet Reed Roof Corner 2=
 | 
			
		||||
Reed=
 | 
			
		||||
Reed Slab=
 | 
			
		||||
Reed Roof=
 | 
			
		||||
Reed Roof Corner=
 | 
			
		||||
Reed Roof Corner 2=
 | 
			
		||||
Reedmace=
 | 
			
		||||
Reedmace, height: 1=
 | 
			
		||||
Reedmace, height: 2=
 | 
			
		||||
Reedmace, height: 3=
 | 
			
		||||
Reedmace, height: 3 & Spikes=
 | 
			
		||||
@@ -12,7 +12,7 @@ abstract_dryplants.grow_grass_variation = function(pos)
 | 
			
		||||
	minetest.swap_node(right_here, {name="dryplants:grass_short"})
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
biome_lib.register_on_generate({
 | 
			
		||||
    surface = {
 | 
			
		||||
		"default:dirt_with_grass",
 | 
			
		||||
	},
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								dryplants/mod.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,3 @@
 | 
			
		||||
name = dryplants
 | 
			
		||||
depends = default, biome_lib
 | 
			
		||||
optional_depends = farming
 | 
			
		||||
@@ -7,16 +7,8 @@
 | 
			
		||||
-- Looked at code from:		default
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
abstract_dryplants.grow_grass = function(pos)
 | 
			
		||||
	local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
 | 
			
		||||
	local grass_size = math.random(1,5)
 | 
			
		||||
	if minetest.get_node(right_here).name == "air"  -- instead of check_air = true,
 | 
			
		||||
	or minetest.get_node(right_here).name == "default:junglegrass" then
 | 
			
		||||
		minetest.swap_node(right_here, {name="default:grass_"..grass_size})
 | 
			
		||||
	end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
biome_lib.register_on_generate(
 | 
			
		||||
	{
 | 
			
		||||
		surface = {
 | 
			
		||||
			"default:dirt_with_grass",
 | 
			
		||||
			"stoneage:grass_with_silex",
 | 
			
		||||
@@ -27,6 +19,12 @@ biome_lib:register_generate_plant({
 | 
			
		||||
		rarity = 101 - TALL_GRASS_RARITY,
 | 
			
		||||
		min_elevation = 1, -- above sea level
 | 
			
		||||
		plantlife_limit = -0.9,
 | 
			
		||||
		check_air = true,
 | 
			
		||||
	},
 | 
			
		||||
  abstract_dryplants.grow_grass
 | 
			
		||||
	{	"default:grass_1",
 | 
			
		||||
		"default:grass_2",
 | 
			
		||||
		"default:grass_3",
 | 
			
		||||
		"default:grass_4",
 | 
			
		||||
		"default:grass_5"
 | 
			
		||||
	}
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
-- Dependencies:			default
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("dryplants")
 | 
			
		||||
 | 
			
		||||
minetest.register_alias("stairs:stair_wetreed",				"dryplants:wetreed_roof")
 | 
			
		||||
minetest.register_alias("stairs:slab_wetreed",				"dryplants:wetreed_slab")
 | 
			
		||||
 
 | 
			
		||||
@@ -18,7 +18,7 @@
 | 
			
		||||
-- The seed hairs were used by some Native American groups as tinder for starting fires
 | 
			
		||||
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("dryplants")
 | 
			
		||||
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
-- REEDMACE SHAPES
 | 
			
		||||
@@ -264,7 +264,8 @@ minetest.register_node("dryplants:reedmace_sapling", {
 | 
			
		||||
	groups = {
 | 
			
		||||
		snappy=3,
 | 
			
		||||
		flammable=2,
 | 
			
		||||
		attached_node=1
 | 
			
		||||
		attached_node=1,
 | 
			
		||||
		sapling=1,
 | 
			
		||||
	},
 | 
			
		||||
	sounds = default.node_sound_leaves_defaults(),
 | 
			
		||||
	selection_box = {
 | 
			
		||||
@@ -327,7 +328,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
-- SPAWN REEDMACE
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
--[[biome_lib:spawn_on_surfaces({
 | 
			
		||||
--[[biome_lib.register_active_spawner({
 | 
			
		||||
	spawn_delay = 1200,
 | 
			
		||||
	spawn_plants = {"dryplants:reedmace_sapling"},
 | 
			
		||||
	spawn_chance = 400,
 | 
			
		||||
@@ -348,7 +349,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
 | 
			
		||||
-- GENERATE REEDMACE
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
-- near water or swamp
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
biome_lib.register_on_generate({
 | 
			
		||||
    surface = {
 | 
			
		||||
		"default:dirt_with_grass",
 | 
			
		||||
		"default:desert_sand",
 | 
			
		||||
@@ -369,7 +370,7 @@ biome_lib:register_generate_plant({
 | 
			
		||||
  abstract_dryplants.grow_reedmace
 | 
			
		||||
)
 | 
			
		||||
-- in water
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
biome_lib.register_on_generate({
 | 
			
		||||
    surface = {
 | 
			
		||||
		"default:dirt",
 | 
			
		||||
		"default:dirt_with_grass",
 | 
			
		||||
@@ -392,7 +393,7 @@ biome_lib:register_generate_plant({
 | 
			
		||||
  abstract_dryplants.grow_reedmace_water
 | 
			
		||||
)
 | 
			
		||||
-- for oases & tropical beaches & tropical swamps
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
biome_lib.register_on_generate({
 | 
			
		||||
    surface = {
 | 
			
		||||
		"default:sand",
 | 
			
		||||
		"sumpf:sumpf"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("ferns")
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
-- Ferns - Crafting 0.0.5
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
default
 | 
			
		||||
biome_lib
 | 
			
		||||
plantlife_i18n
 | 
			
		||||
@@ -15,7 +15,7 @@
 | 
			
		||||
assert(abstract_ferns.config.enable_lady_fern == true)
 | 
			
		||||
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("ferns")
 | 
			
		||||
 | 
			
		||||
-- Maintain backward compatibilty
 | 
			
		||||
-- minetest-0.5: Begin
 | 
			
		||||
@@ -87,7 +87,7 @@ end
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
if abstract_ferns.config.lady_ferns_near_tree == true then
 | 
			
		||||
	biome_lib:register_generate_plant({ -- near trees (woodlands)
 | 
			
		||||
	biome_lib.register_on_generate({ -- near trees (woodlands)
 | 
			
		||||
		surface = {
 | 
			
		||||
			"default:dirt_with_grass",
 | 
			
		||||
			"default:mossycobble",
 | 
			
		||||
@@ -116,7 +116,7 @@ if abstract_ferns.config.lady_ferns_near_tree == true then
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
if abstract_ferns.config.lady_ferns_near_rock == true then
 | 
			
		||||
	biome_lib:register_generate_plant({ -- near stone (mountains)
 | 
			
		||||
	biome_lib.register_on_generate({ -- near stone (mountains)
 | 
			
		||||
		surface = {
 | 
			
		||||
			"default:dirt_with_grass",
 | 
			
		||||
			"default:mossycobble",
 | 
			
		||||
@@ -143,7 +143,7 @@ if abstract_ferns.config.lady_ferns_near_rock == true then
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
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_on_generate({ -- near ores (potential mining sites)
 | 
			
		||||
		surface = {
 | 
			
		||||
			"default:dirt_with_grass",
 | 
			
		||||
			"default:mossycobble",
 | 
			
		||||
@@ -183,7 +183,7 @@ if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
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_on_generate({
 | 
			
		||||
		surface = {
 | 
			
		||||
			"default:dirt_with_grass",
 | 
			
		||||
			"default:mossycobble",
 | 
			
		||||
 
 | 
			
		||||
@@ -10,14 +10,33 @@
 | 
			
		||||
assert(abstract_ferns.config.enable_giant_treefern == true)
 | 
			
		||||
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("ferns")
 | 
			
		||||
-- lot of code, lot to load
 | 
			
		||||
 | 
			
		||||
function abstract_ferns.can_grow_giant_tree_fern(pos)
 | 
			
		||||
	local node_name = minetest.get_node(pos).name
 | 
			
		||||
	if node_name ~= "air" and node_name ~= "ferns:sapling_giant_tree_fern" and node_name ~= "default:junglegrass" then
 | 
			
		||||
		return false
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	local below_name = minetest.get_node(vector.new(pos.x, pos.y - 1, pos.z)).name
 | 
			
		||||
	if minetest.get_item_group(below_name, "soil") == 0 and minetest.get_item_group(below_name, "sand") == 0 then
 | 
			
		||||
		return false
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	local light = minetest.get_node_light(pos, 0.5)
 | 
			
		||||
	if light <= 8 then
 | 
			
		||||
		return false
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	return true
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
abstract_ferns.grow_giant_tree_fern = function(pos)
 | 
			
		||||
	local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z}
 | 
			
		||||
	if minetest.get_node(pos_01).name ~= "air"
 | 
			
		||||
			and minetest.get_node(pos_01).name ~= "ferns:sapling_giant_tree_fern"
 | 
			
		||||
			and minetest.get_node(pos_01).name ~= "default:junglegrass" then
 | 
			
		||||
	local pos_aux = {x = pos.x, y = pos.y + 1, z = pos.z}
 | 
			
		||||
	local name = minetest.get_node(pos_aux).name
 | 
			
		||||
	if name ~= "air" and name ~= "ferns:sapling_giant_tree_fern"
 | 
			
		||||
			and name ~= "default:junglegrass" then
 | 
			
		||||
		return
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
@@ -64,7 +83,9 @@ abstract_ferns.grow_giant_tree_fern = function(pos)
 | 
			
		||||
 | 
			
		||||
	local brk = false
 | 
			
		||||
	for i = 1, size-3 do
 | 
			
		||||
		if minetest.get_node({x = pos.x, y = pos.y + i, z = pos.z}).name ~= "air" then
 | 
			
		||||
		pos_aux.y = pos.y + i
 | 
			
		||||
		local name = minetest.get_node(pos_aux).name
 | 
			
		||||
		if not (name == "air" or (i == 1 and name == "ferns:sapling_giant_tree_fern")) then
 | 
			
		||||
			brk = true
 | 
			
		||||
			break
 | 
			
		||||
		end
 | 
			
		||||
@@ -160,6 +181,14 @@ minetest.register_node("ferns:tree_fern_leave_big", {
 | 
			
		||||
	},
 | 
			
		||||
	drop = "",
 | 
			
		||||
	sounds = default.node_sound_leaves_defaults(),
 | 
			
		||||
	after_destruct = function(pos,oldnode)
 | 
			
		||||
		for _, d in pairs({{x=-1,z=0},{x=1,z=0},{x=0,z=-1},{x=0,z=1}}) do
 | 
			
		||||
			local node = minetest.get_node({x=pos.x+d.x,y=pos.y+1,z=pos.z+d.z})
 | 
			
		||||
			if node.name == "ferns:tree_fern_leave_big" then
 | 
			
		||||
				minetest.dig_node({x=pos.x+d.x,y=pos.y+1,z=pos.z+d.z})
 | 
			
		||||
			end
 | 
			
		||||
		end
 | 
			
		||||
	end,
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
@@ -171,6 +200,7 @@ minetest.register_node("ferns:tree_fern_leave_big_end", {
 | 
			
		||||
	paramtype = "light",
 | 
			
		||||
	paramtype2 = "facedir",
 | 
			
		||||
	tiles = { "ferns_tree_fern_leave_big_end.png" },
 | 
			
		||||
	use_texture_alpha = "clip",
 | 
			
		||||
	walkable = false,
 | 
			
		||||
	node_box = {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
@@ -203,6 +233,7 @@ minetest.register_node("ferns:fern_trunk_big_top", {
 | 
			
		||||
		"ferns_fern_trunk_big_top.png^ferns_tree_fern_leave_big_cross.png",
 | 
			
		||||
		"ferns_fern_trunk_big.png"
 | 
			
		||||
	},
 | 
			
		||||
	use_texture_alpha = "clip",
 | 
			
		||||
	node_box = {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
--			{left, bottom, front, right, top,   back }
 | 
			
		||||
@@ -240,6 +271,7 @@ minetest.register_node("ferns:fern_trunk_big", {
 | 
			
		||||
		"ferns_fern_trunk_big_top.png",
 | 
			
		||||
		"ferns_fern_trunk_big.png"
 | 
			
		||||
	},
 | 
			
		||||
	use_texture_alpha = "clip",
 | 
			
		||||
	node_box = {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
		fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
 | 
			
		||||
@@ -269,7 +301,7 @@ minetest.register_node("ferns:sapling_giant_tree_fern", {
 | 
			
		||||
	tiles = {"ferns_sapling_tree_fern_giant.png"},
 | 
			
		||||
	inventory_image = "ferns_sapling_tree_fern_giant.png",
 | 
			
		||||
	walkable = false,
 | 
			
		||||
	groups = {snappy=3,flammable=2,flora=1,attached_node=1},
 | 
			
		||||
	groups = {snappy=3,flammable=2,flora=1,attached_node=1,sapling=1},
 | 
			
		||||
	sounds = default.node_sound_leaves_defaults(),
 | 
			
		||||
	selection_box = {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
@@ -283,8 +315,10 @@ minetest.register_abm({
 | 
			
		||||
	interval = 1000,
 | 
			
		||||
	chance = 4,
 | 
			
		||||
	action = function(pos, node, _, _)
 | 
			
		||||
		if abstract_ferns.can_grow_giant_tree_fern(pos) then
 | 
			
		||||
			abstract_ferns.grow_giant_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
 | 
			
		||||
		end
 | 
			
		||||
    end
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
@@ -293,7 +327,7 @@ minetest.register_abm({
 | 
			
		||||
 | 
			
		||||
-- in jungles
 | 
			
		||||
if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
 | 
			
		||||
	biome_lib:register_generate_plant({
 | 
			
		||||
	biome_lib.register_on_generate({
 | 
			
		||||
		surface = {
 | 
			
		||||
			"default:dirt_with_grass",
 | 
			
		||||
			"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
 | 
			
		||||
@@ -319,7 +353,7 @@ end
 | 
			
		||||
 | 
			
		||||
-- for oases & tropical beaches
 | 
			
		||||
if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
 | 
			
		||||
	biome_lib:register_generate_plant({
 | 
			
		||||
	biome_lib.register_on_generate({
 | 
			
		||||
		surface = {
 | 
			
		||||
			"default:sand"--,
 | 
			
		||||
			--"default:desert_sand"
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@
 | 
			
		||||
assert(abstract_ferns.config.enable_horsetails == true)
 | 
			
		||||
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("ferns")
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
-- HORSETAIL  (EQUISETUM)
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
@@ -75,7 +75,7 @@ create_nodes()
 | 
			
		||||
-- Spawning
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
if abstract_ferns.config.enable_horsetails_spawning == true then
 | 
			
		||||
	biome_lib:spawn_on_surfaces({
 | 
			
		||||
	biome_lib.register_active_spawner({
 | 
			
		||||
		spawn_delay = 1200,
 | 
			
		||||
		spawn_plants = node_names,
 | 
			
		||||
		spawn_chance = 400,
 | 
			
		||||
@@ -104,7 +104,7 @@ end
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
if abstract_ferns.config.enable_horsetails_on_grass == true then
 | 
			
		||||
	biome_lib:register_generate_plant({
 | 
			
		||||
	biome_lib.register_on_generate({
 | 
			
		||||
		surface = {
 | 
			
		||||
			"default:dirt_with_grass",
 | 
			
		||||
			"default:dirt_with_coniferous_litter", -- minetest >= 0.5
 | 
			
		||||
@@ -137,7 +137,7 @@ if abstract_ferns.config.enable_horsetails_on_grass == true then
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
if abstract_ferns.config.enable_horsetails_on_stones == true then
 | 
			
		||||
	biome_lib:register_generate_plant({
 | 
			
		||||
	biome_lib.register_on_generate({
 | 
			
		||||
		surface = {
 | 
			
		||||
			"default:gravel", -- roots go deep
 | 
			
		||||
			"default:mossycobble",
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ local mname		= "ferns" -- former "archaeplantae"
 | 
			
		||||
abstract_ferns = {}
 | 
			
		||||
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("ferns")
 | 
			
		||||
 | 
			
		||||
dofile(minetest.get_modpath("ferns").."/settings.lua")
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										23
									
								
								ferns/locale/ferns.de.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,23 @@
 | 
			
		||||
# textdomain: ferns
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# reusityback, 2022.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Fiddlehead=Geigenkopf
 | 
			
		||||
Roasted Fiddlehead=Gerösteter Geigenkopf
 | 
			
		||||
Fern Tuber=Farnknolle
 | 
			
		||||
Roasted Fern Tuber=Geröstete Farnknolle
 | 
			
		||||
Lady-fern (Athyrium)=Frauenfarn (Athyrium)
 | 
			
		||||
Tree Fern Crown (Dicksonia)=Baumfarnkrone (Dicksonia)
 | 
			
		||||
Giant Tree Fern Leaves=Riesige Baumfarnblätter
 | 
			
		||||
Giant Tree Fern Leave End=Riesiges Baumfarnblattende
 | 
			
		||||
Giant Fern Trunk=Riesiger Baumfarnstamm
 | 
			
		||||
Giant Tree Fern Sapling=Riesiger Baumfarnsetzling
 | 
			
		||||
Young Horsetail (Equisetum)=Junger Schachtelhalm (Equisetum)
 | 
			
		||||
Horsetail (Equisetum)=Schachtelhalm (Equisetum)
 | 
			
		||||
Fern Trunk (Dicksonia)=Farnstamm (Dicksonia)
 | 
			
		||||
Tree Fern Sapling (Dicksonia)=Baumfarnsetzling (Dicksonia)
 | 
			
		||||
							
								
								
									
										23
									
								
								ferns/locale/ferns.eo.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,23 @@
 | 
			
		||||
# textdomain: ferns
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# Jolesh, 2022.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Fiddlehead=Filika Supro
 | 
			
		||||
Roasted Fiddlehead=Rostita Filika Supro
 | 
			
		||||
Fern Tuber=Filika Tubero
 | 
			
		||||
Roasted Fern Tuber=Rostita Filika Tubero
 | 
			
		||||
Lady-fern (Athyrium)=Afiriumo (Athyrium)
 | 
			
		||||
Tree Fern Crown (Dicksonia)=Krono de Arba Filiko
 | 
			
		||||
Giant Tree Fern Leaves=Folioj de Giganta Arba Filiko
 | 
			
		||||
Giant Tree Fern Leave End=Folifino de Giganta Arba Filiko
 | 
			
		||||
Giant Fern Trunk=Trunko de Giganta Arba Filiko
 | 
			
		||||
Giant Tree Fern Sapling=Arbido de Giganta Arba Filiko
 | 
			
		||||
Young Horsetail (Equisetum)=Juna Ekvizeto (Equisetum)
 | 
			
		||||
Horsetail (Equisetum)=Ekvizeto (Equisetum)
 | 
			
		||||
Fern Trunk (Dicksonia)=Trunko de Arba Filiko (Dicksonia)
 | 
			
		||||
Tree Fern Sapling (Dicksonia)=Arbido de Arba Filiko (Dicksonia)
 | 
			
		||||
							
								
								
									
										22
									
								
								ferns/locale/ferns.fr.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,22 @@
 | 
			
		||||
# textdomain: ferns
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# fat115 <fat115@framasoft.org>, 2017.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Fiddlehead=Crosse de fougère
 | 
			
		||||
Roasted Fiddlehead=Crosse de fougère rôtie
 | 
			
		||||
Fern Tuber=Tubercule de fougère
 | 
			
		||||
Roasted Fern Tuber=Tubercule de fougère rôti
 | 
			
		||||
Lady-fern (Athyrium)=Fougère (Athyrium)
 | 
			
		||||
Tree Fern Crown (Dicksonia)=Fougère en couronne (Dicksonia)
 | 
			
		||||
Giant Tree Fern Leaves=Feuilles de fougère géante
 | 
			
		||||
Giant Tree Fern Leave End=Feuilles de fougère géante (extrémité)
 | 
			
		||||
Giant Fern Trunk=Tronc de fougère géante
 | 
			
		||||
Giant Tree Fern Sapling=Pousse de fougère géante
 | 
			
		||||
Young Horsetail (Equisetum)=Pousse de prêle (Equisetum)
 | 
			
		||||
Horsetail (Equisetum)=Prêle (Equisetum)
 | 
			
		||||
Fern Trunk (Dicksonia)=Tronc de fougère en couronne (Dicksonia)
 | 
			
		||||
Tree Fern Sapling (Dicksonia)=Pousse de fougère en couronne (Dicksonia)
 | 
			
		||||
							
								
								
									
										23
									
								
								ferns/locale/template.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,23 @@
 | 
			
		||||
# textdomain: ferns
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Fiddlehead=
 | 
			
		||||
Roasted Fiddlehead=
 | 
			
		||||
Fern Tuber=
 | 
			
		||||
Roasted Fern Tuber=
 | 
			
		||||
Lady-fern (Athyrium)=
 | 
			
		||||
Tree Fern Crown (Dicksonia)=
 | 
			
		||||
Giant Tree Fern Leaves=
 | 
			
		||||
Giant Tree Fern Leave End=
 | 
			
		||||
Giant Fern Trunk=
 | 
			
		||||
Giant Tree Fern Sapling=
 | 
			
		||||
Young Horsetail (Equisetum)=
 | 
			
		||||
Horsetail (Equisetum)=
 | 
			
		||||
Fern Trunk (Dicksonia)=
 | 
			
		||||
Tree Fern Sapling (Dicksonia)=
 | 
			
		||||
							
								
								
									
										2
									
								
								ferns/mod.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,2 @@
 | 
			
		||||
name = ferns
 | 
			
		||||
depends = default, biome_lib
 | 
			
		||||
@@ -7,16 +7,35 @@
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("ferns")
 | 
			
		||||
 | 
			
		||||
assert(abstract_ferns.config.enable_treefern == true)
 | 
			
		||||
 | 
			
		||||
function abstract_ferns.can_grow_tree_fern(pos)
 | 
			
		||||
	local node_name = minetest.get_node(pos).name
 | 
			
		||||
	if node_name ~= "air" and node_name ~= "ferns:sapling_tree_fern" and node_name ~= "default:junglegrass" then
 | 
			
		||||
		return false
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	local below_name = minetest.get_node(vector.new(pos.x, pos.y - 1, pos.z)).name
 | 
			
		||||
	if minetest.get_item_group(below_name, "soil") == 0 and minetest.get_item_group(below_name, "sand") == 0 then
 | 
			
		||||
		return false
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	local light = minetest.get_node_light(pos, 0.5)
 | 
			
		||||
	if light <= 8 then
 | 
			
		||||
		return false
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	return true
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
abstract_ferns.grow_tree_fern = function(pos)
 | 
			
		||||
 | 
			
		||||
	local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z}
 | 
			
		||||
	if minetest.get_node(pos_01).name ~= "air"
 | 
			
		||||
			and minetest.get_node(pos_01).name ~= "ferns:sapling_tree_fern"
 | 
			
		||||
			and minetest.get_node(pos_01).name ~= "default:junglegrass" then
 | 
			
		||||
	local pos_aux = {x = pos.x, y = pos.y + 1, z = pos.z}
 | 
			
		||||
	local name = minetest.get_node(pos_aux).name
 | 
			
		||||
	if name ~= "air" and name ~= "ferns:sapling_tree_fern"
 | 
			
		||||
			and name ~= "default:junglegrass" then
 | 
			
		||||
		return
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
@@ -30,7 +49,9 @@ abstract_ferns.grow_tree_fern = function(pos)
 | 
			
		||||
	local i = 1
 | 
			
		||||
	local brk = false
 | 
			
		||||
	while (i < size) do
 | 
			
		||||
		if minetest.get_node({x = pos.x, y = pos.y + i, z = pos.z}).name ~= "air" then
 | 
			
		||||
		pos_aux.y = pos.y + i
 | 
			
		||||
		name = minetest.get_node(pos_aux).name
 | 
			
		||||
		if not (name == "air" or (i == 1 and name == "ferns:sapling_tree_fern")) then
 | 
			
		||||
			brk = true
 | 
			
		||||
			break
 | 
			
		||||
		end
 | 
			
		||||
@@ -126,6 +147,7 @@ minetest.register_node("ferns:fern_trunk", {
 | 
			
		||||
		"ferns_fern_trunk_top.png",
 | 
			
		||||
		"ferns_fern_trunk.png"
 | 
			
		||||
	},
 | 
			
		||||
	use_texture_alpha = "clip",
 | 
			
		||||
	node_box = {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
		fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8},
 | 
			
		||||
@@ -156,7 +178,7 @@ minetest.register_node("ferns:sapling_tree_fern", {
 | 
			
		||||
	tiles = {"ferns_sapling_tree_fern.png"},
 | 
			
		||||
	inventory_image = "ferns_sapling_tree_fern.png",
 | 
			
		||||
	walkable = false,
 | 
			
		||||
	groups = {snappy=3,flammable=2,flora=1,attached_node=1},
 | 
			
		||||
	groups = {snappy=3,flammable=2,flora=1,attached_node=1,sapling=1},
 | 
			
		||||
	sounds = default.node_sound_leaves_defaults(),
 | 
			
		||||
	selection_box = {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
@@ -169,8 +191,10 @@ minetest.register_abm({
 | 
			
		||||
	interval = 1000,
 | 
			
		||||
	chance = 4,
 | 
			
		||||
	action = function(pos, node, _, _)
 | 
			
		||||
		if abstract_ferns.can_grow_tree_fern(pos) then
 | 
			
		||||
			abstract_ferns.grow_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
 | 
			
		||||
		end
 | 
			
		||||
    end
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
@@ -179,7 +203,7 @@ minetest.register_abm({
 | 
			
		||||
 | 
			
		||||
-- in jungles
 | 
			
		||||
if abstract_ferns.config.enable_treeferns_in_jungle == true then
 | 
			
		||||
	biome_lib:register_generate_plant({
 | 
			
		||||
	biome_lib.register_on_generate({
 | 
			
		||||
		surface = {
 | 
			
		||||
			"default:dirt_with_grass",
 | 
			
		||||
			"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
 | 
			
		||||
@@ -208,7 +232,7 @@ end
 | 
			
		||||
 | 
			
		||||
-- for oases & tropical beaches
 | 
			
		||||
if abstract_ferns.config.enable_treeferns_in_oases == true then
 | 
			
		||||
	biome_lib:register_generate_plant({
 | 
			
		||||
	biome_lib.register_on_generate({
 | 
			
		||||
		surface = {
 | 
			
		||||
			"default:sand"--,
 | 
			
		||||
			--"default:desert_sand"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +0,0 @@
 | 
			
		||||
biome_lib
 | 
			
		||||
plantlife_i18n
 | 
			
		||||
farming?
 | 
			
		||||
flowers?
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
Changelog
 | 
			
		||||
---------
 | 
			
		||||
 | 
			
		||||
2012-08-06: Tweaked selection boxes on all nodes.  Tweaked seaweed to use 
 | 
			
		||||
signlike instead of raillike drawtype, (still forced to only spawn flat as 
 | 
			
		||||
usual).  Adjusted light level limits to give it more time to grow.  Created 
 | 
			
		||||
this changelog file using github commit messages as the basis.  Shrunk the 
 | 
			
		||||
geranium flower down a bit to better match the others.
 | 
			
		||||
 | 
			
		||||
2012-08-03: Tuned out the random-numbers-inside-ABM stuff. Uses the ABM's 
 | 
			
		||||
chance setting instead.  Should be approximately the same as before, but 
 | 
			
		||||
hopefully using a tad less CPU.  Minor tweak to ABM interval/growing delay.
 | 
			
		||||
 | 
			
		||||
2012-08-01: Added blue geranium to the collection of flowers.
 | 
			
		||||
 | 
			
		||||
2012-07-31: Disable debug by default.
 | 
			
		||||
 | 
			
		||||
2012-07-30: many updates over the course of the day - first commit, removed 
 | 
			
		||||
some redundant files, added wield/inventory image entries for each item, to 
 | 
			
		||||
force the game to draw them properly (these shouldn't be needed, must be a 
 | 
			
		||||
bug).  Tweaked spawn code so that the radius check also includes the name of 
 | 
			
		||||
the item being spawned as well as items in group:flower, that way all items can 
 | 
			
		||||
have a radius test, and not just those in group:flower. Fiddled with the spawn 
 | 
			
		||||
rates a bit.
 | 
			
		||||
@@ -1,481 +0,0 @@
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
 | 
			
		||||
-- This file supplies a few additional plants and some related crafts
 | 
			
		||||
-- for the plantlife modpack.  Last revision:  2013-04-24
 | 
			
		||||
 | 
			
		||||
flowers_plus = {}
 | 
			
		||||
 | 
			
		||||
local SPAWN_DELAY = 1000
 | 
			
		||||
local SPAWN_CHANCE = 200
 | 
			
		||||
local flowers_seed_diff = 329
 | 
			
		||||
local lilies_max_count = 320
 | 
			
		||||
local lilies_rarity = 33
 | 
			
		||||
local seaweed_max_count = 320
 | 
			
		||||
local seaweed_rarity = 33
 | 
			
		||||
local sunflowers_max_count = 10
 | 
			
		||||
local sunflowers_rarity = 25
 | 
			
		||||
 | 
			
		||||
-- register the various rotations of waterlilies
 | 
			
		||||
 | 
			
		||||
local lilies_list = {
 | 
			
		||||
	{ nil  , nil	   , 1	},
 | 
			
		||||
	{ "225", "22.5"    , 2	},
 | 
			
		||||
	{ "45" , "45"      , 3	},
 | 
			
		||||
	{ "675", "67.5"    , 4	},
 | 
			
		||||
	{ "s1" , "small_1" , 5	},
 | 
			
		||||
	{ "s2" , "small_2" , 6	},
 | 
			
		||||
	{ "s3" , "small_3" , 7	},
 | 
			
		||||
	{ "s4" , "small_4" , 8	},
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for i in ipairs(lilies_list) do
 | 
			
		||||
	local deg1 = ""
 | 
			
		||||
	local deg2 = ""
 | 
			
		||||
	local lily_groups = {snappy = 3,flammable=2,flower=1}
 | 
			
		||||
 | 
			
		||||
	if lilies_list[i][1] ~= nil then
 | 
			
		||||
		deg1 = "_"..lilies_list[i][1]
 | 
			
		||||
		deg2 = "_"..lilies_list[i][2]
 | 
			
		||||
		lily_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	minetest.register_node(":flowers:waterlily"..deg1, {
 | 
			
		||||
		description = S("Waterlily"),
 | 
			
		||||
		drawtype = "nodebox",
 | 
			
		||||
		tiles = {
 | 
			
		||||
			"flowers_waterlily"..deg2..".png",
 | 
			
		||||
			"flowers_waterlily"..deg2..".png^[transformFY"
 | 
			
		||||
		},
 | 
			
		||||
		inventory_image = "flowers_waterlily.png",
 | 
			
		||||
		wield_image  = "flowers_waterlily.png",
 | 
			
		||||
		sunlight_propagates = true,
 | 
			
		||||
		paramtype = "light",
 | 
			
		||||
		paramtype2 = "facedir",
 | 
			
		||||
		walkable = false,
 | 
			
		||||
		groups = lily_groups,
 | 
			
		||||
		sounds = default.node_sound_leaves_defaults(),
 | 
			
		||||
		selection_box = {
 | 
			
		||||
			type = "fixed",
 | 
			
		||||
			fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
 | 
			
		||||
		},
 | 
			
		||||
		node_box = {
 | 
			
		||||
			type = "fixed",
 | 
			
		||||
			fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
 | 
			
		||||
		},
 | 
			
		||||
		buildable_to = true,
 | 
			
		||||
		node_placement_prediction = "",
 | 
			
		||||
 | 
			
		||||
		liquids_pointable = true,
 | 
			
		||||
		drop = "flowers:waterlily",
 | 
			
		||||
		on_place = function(itemstack, placer, pointed_thing)
 | 
			
		||||
			local keys=placer:get_player_control()
 | 
			
		||||
			local pt = pointed_thing
 | 
			
		||||
 | 
			
		||||
			local place_pos = nil
 | 
			
		||||
			local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
 | 
			
		||||
			local under_node = minetest.get_node(pt.under)
 | 
			
		||||
			local above_node = minetest.get_node(pt.above)
 | 
			
		||||
			local top_node   = minetest.get_node(top_pos)
 | 
			
		||||
 | 
			
		||||
			if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
 | 
			
		||||
				if under_node.name ~= "default:water_source" then
 | 
			
		||||
					place_pos = pt.under
 | 
			
		||||
				elseif top_node.name ~= "default:water_source"
 | 
			
		||||
				       and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
 | 
			
		||||
					place_pos = top_pos
 | 
			
		||||
				else
 | 
			
		||||
					return
 | 
			
		||||
				end
 | 
			
		||||
			elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
 | 
			
		||||
				place_pos = pt.above
 | 
			
		||||
			end
 | 
			
		||||
 | 
			
		||||
			if place_pos and not minetest.is_protected(place_pos, placer:get_player_name()) then
 | 
			
		||||
 | 
			
		||||
			local nodename = "default:cobble" -- if this block appears, something went....wrong :-)
 | 
			
		||||
 | 
			
		||||
				if not keys["sneak"] then
 | 
			
		||||
					local node = minetest.get_node(pt.under)
 | 
			
		||||
					local waterlily = math.random(1,8)
 | 
			
		||||
					if waterlily == 1 then
 | 
			
		||||
						nodename = "flowers:waterlily"
 | 
			
		||||
					elseif waterlily == 2 then
 | 
			
		||||
						nodename = "flowers:waterlily_225"
 | 
			
		||||
					elseif waterlily == 3 then
 | 
			
		||||
						nodename = "flowers:waterlily_45"
 | 
			
		||||
					elseif waterlily == 4 then
 | 
			
		||||
						nodename = "flowers:waterlily_675"
 | 
			
		||||
					elseif waterlily == 5 then
 | 
			
		||||
						nodename = "flowers:waterlily_s1"
 | 
			
		||||
					elseif waterlily == 6 then
 | 
			
		||||
						nodename = "flowers:waterlily_s2"
 | 
			
		||||
					elseif waterlily == 7 then
 | 
			
		||||
						nodename = "flowers:waterlily_s3"
 | 
			
		||||
					elseif waterlily == 8 then
 | 
			
		||||
						nodename = "flowers:waterlily_s4"
 | 
			
		||||
					end
 | 
			
		||||
					minetest.swap_node(place_pos, {name = nodename, param2 = math.random(0,3) })
 | 
			
		||||
				else
 | 
			
		||||
					local fdir = minetest.dir_to_facedir(placer:get_look_dir())
 | 
			
		||||
					minetest.swap_node(place_pos, {name = "flowers:waterlily", param2 = fdir})
 | 
			
		||||
				end
 | 
			
		||||
 | 
			
		||||
				if not biome_lib.expect_infinite_stacks then
 | 
			
		||||
					itemstack:take_item()
 | 
			
		||||
				end
 | 
			
		||||
				return itemstack
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
	})
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
local algae_list = { {nil}, {2}, {3}, {4} }
 | 
			
		||||
 | 
			
		||||
for i in ipairs(algae_list) do
 | 
			
		||||
	local num = ""
 | 
			
		||||
	local algae_groups = {snappy = 3,flammable=2,flower=1}
 | 
			
		||||
 | 
			
		||||
	if algae_list[i][1] ~= nil then
 | 
			
		||||
		num = "_"..algae_list[i][1]
 | 
			
		||||
		algae_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	minetest.register_node(":flowers:seaweed"..num, {
 | 
			
		||||
		description = S("Seaweed"),
 | 
			
		||||
		drawtype = "nodebox",
 | 
			
		||||
		tiles = {
 | 
			
		||||
			"flowers_seaweed"..num..".png",
 | 
			
		||||
			"flowers_seaweed"..num..".png^[transformFY"
 | 
			
		||||
		},
 | 
			
		||||
		inventory_image = "flowers_seaweed_2.png",
 | 
			
		||||
		wield_image  = "flowers_seaweed_2.png",
 | 
			
		||||
		sunlight_propagates = true,
 | 
			
		||||
		paramtype = "light",
 | 
			
		||||
		paramtype2 = "facedir",
 | 
			
		||||
		walkable = false,
 | 
			
		||||
		groups = algae_groups,
 | 
			
		||||
		sounds = default.node_sound_leaves_defaults(),
 | 
			
		||||
		selection_box = {
 | 
			
		||||
			type = "fixed",
 | 
			
		||||
			fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
 | 
			
		||||
		},
 | 
			
		||||
		node_box = {
 | 
			
		||||
			type = "fixed",
 | 
			
		||||
			fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
 | 
			
		||||
		},
 | 
			
		||||
		buildable_to = true,
 | 
			
		||||
 | 
			
		||||
		liquids_pointable = true,
 | 
			
		||||
		drop = "flowers:seaweed",
 | 
			
		||||
		on_place = function(itemstack, placer, pointed_thing)
 | 
			
		||||
			local keys=placer:get_player_control()
 | 
			
		||||
			local pt = pointed_thing
 | 
			
		||||
 | 
			
		||||
			local place_pos = nil
 | 
			
		||||
			local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
 | 
			
		||||
			local under_node = minetest.get_node(pt.under)
 | 
			
		||||
			local above_node = minetest.get_node(pt.above)
 | 
			
		||||
			local top_node   = minetest.get_node(top_pos)
 | 
			
		||||
 | 
			
		||||
			if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
 | 
			
		||||
				if under_node.name ~= "default:water_source" then
 | 
			
		||||
					place_pos = pt.under
 | 
			
		||||
				elseif top_node.name ~= "default:water_source"
 | 
			
		||||
				       and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
 | 
			
		||||
					place_pos = top_pos
 | 
			
		||||
				else
 | 
			
		||||
					return
 | 
			
		||||
				end
 | 
			
		||||
			elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
 | 
			
		||||
				place_pos = pt.above
 | 
			
		||||
			end
 | 
			
		||||
 | 
			
		||||
			if not minetest.is_protected(place_pos, placer:get_player_name()) then
 | 
			
		||||
 | 
			
		||||
			local nodename = "default:cobble" -- :D
 | 
			
		||||
 | 
			
		||||
				if not keys["sneak"] then
 | 
			
		||||
					--local node = minetest.get_node(pt.under)
 | 
			
		||||
					local seaweed = math.random(1,4)
 | 
			
		||||
					if seaweed == 1 then
 | 
			
		||||
						nodename = "flowers:seaweed"
 | 
			
		||||
					elseif seaweed == 2 then
 | 
			
		||||
						nodename = "flowers:seaweed_2"
 | 
			
		||||
					elseif seaweed == 3 then
 | 
			
		||||
						nodename = "flowers:seaweed_3"
 | 
			
		||||
					elseif seaweed == 4 then
 | 
			
		||||
						nodename = "flowers:seaweed_4"
 | 
			
		||||
					end
 | 
			
		||||
					minetest.swap_node(place_pos, {name = nodename, param2 = math.random(0,3) })
 | 
			
		||||
				else
 | 
			
		||||
					local fdir = minetest.dir_to_facedir(placer:get_look_dir())
 | 
			
		||||
					minetest.swap_node(place_pos, {name = "flowers:seaweed", param2 = fdir})
 | 
			
		||||
				end
 | 
			
		||||
 | 
			
		||||
				if not biome_lib.expect_infinite_stacks then
 | 
			
		||||
					itemstack:take_item()
 | 
			
		||||
				end
 | 
			
		||||
				return itemstack
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
	})
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
local box = {
 | 
			
		||||
	type="fixed",
 | 
			
		||||
	fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } },
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
local sunflower_drop = "farming:seed_wheat"
 | 
			
		||||
if minetest.registered_items["farming:seed_spelt"] then
 | 
			
		||||
	sunflower_drop = "farming:seed_spelt"
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
minetest.register_node(":flowers:sunflower", {
 | 
			
		||||
	description = S("Sunflower"),
 | 
			
		||||
	drawtype = "mesh",
 | 
			
		||||
	paramtype = "light",
 | 
			
		||||
	paramtype2 = "facedir",
 | 
			
		||||
	inventory_image = "flowers_sunflower_inv.png",
 | 
			
		||||
	mesh = "flowers_sunflower.obj",
 | 
			
		||||
	tiles = { "flowers_sunflower.png" },
 | 
			
		||||
	walkable = false,
 | 
			
		||||
	buildable_to = true,
 | 
			
		||||
	is_ground_content = true,
 | 
			
		||||
	groups = { dig_immediate=3, flora=1, flammable=3 },
 | 
			
		||||
	sounds = default.node_sound_leaves_defaults(),
 | 
			
		||||
	selection_box = box,
 | 
			
		||||
	collision_box = box,
 | 
			
		||||
	drop = {
 | 
			
		||||
		max_items = 1,
 | 
			
		||||
		items = {
 | 
			
		||||
			{items = {sunflower_drop}, rarity = 8},
 | 
			
		||||
			{items = {"flowers:sunflower"}},
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
local extra_aliases = {
 | 
			
		||||
	"waterlily",
 | 
			
		||||
	"waterlily_225",
 | 
			
		||||
	"waterlily_45",
 | 
			
		||||
	"waterlily_675",
 | 
			
		||||
	"seaweed"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for i in ipairs(extra_aliases) do
 | 
			
		||||
	local flower = extra_aliases[i]
 | 
			
		||||
	minetest.register_alias("flowers:flower_"..flower, "flowers:"..flower)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
minetest.register_alias( "trunks:lilypad"         ,	"flowers:waterlily_s1" )
 | 
			
		||||
minetest.register_alias( "along_shore:lilypads_1" , "flowers:waterlily_s1" )
 | 
			
		||||
minetest.register_alias( "along_shore:lilypads_2" , "flowers:waterlily_s2" )
 | 
			
		||||
minetest.register_alias( "along_shore:lilypads_3" , "flowers:waterlily_s3" )
 | 
			
		||||
minetest.register_alias( "along_shore:lilypads_4" , "flowers:waterlily_s4" )
 | 
			
		||||
minetest.register_alias( "along_shore:pondscum_1" ,	"flowers:seaweed"      )
 | 
			
		||||
minetest.register_alias( "along_shore:seaweed_1"  ,	"flowers:seaweed"      )
 | 
			
		||||
minetest.register_alias( "along_shore:seaweed_2"  ,	"flowers:seaweed_2"    )
 | 
			
		||||
minetest.register_alias( "along_shore:seaweed_3"  ,	"flowers:seaweed_3"    )
 | 
			
		||||
minetest.register_alias( "along_shore:seaweed_4"  ,	"flowers:seaweed_4"    )
 | 
			
		||||
 | 
			
		||||
-- ongen registrations
 | 
			
		||||
 | 
			
		||||
flowers_plus.grow_waterlily = function(pos)
 | 
			
		||||
	local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
 | 
			
		||||
	for i in ipairs(lilies_list) do
 | 
			
		||||
		local chance = math.random(1,8)
 | 
			
		||||
		local ext = ""
 | 
			
		||||
		local num = lilies_list[i][3]
 | 
			
		||||
 | 
			
		||||
		if lilies_list[i][1] ~= nil then
 | 
			
		||||
			ext = "_"..lilies_list[i][1]
 | 
			
		||||
		end
 | 
			
		||||
 | 
			
		||||
		if chance == num then
 | 
			
		||||
			minetest.swap_node(right_here, {name="flowers:waterlily"..ext, param2=math.random(0,3)})
 | 
			
		||||
		end
 | 
			
		||||
	end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
    surface = {"default:water_source"},
 | 
			
		||||
    max_count = lilies_max_count,
 | 
			
		||||
    rarity = lilies_rarity,
 | 
			
		||||
    min_elevation = 1,
 | 
			
		||||
	max_elevation = 40,
 | 
			
		||||
	near_nodes = {"default:dirt_with_grass"},
 | 
			
		||||
	near_nodes_size = 4,
 | 
			
		||||
	near_nodes_vertical = 1,
 | 
			
		||||
	near_nodes_count = 1,
 | 
			
		||||
    plantlife_limit = -0.9,
 | 
			
		||||
	temp_max = -0.22,
 | 
			
		||||
    temp_min = 0.22,
 | 
			
		||||
  },
 | 
			
		||||
  flowers_plus.grow_waterlily
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
flowers_plus.grow_seaweed = function(pos)
 | 
			
		||||
	local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
 | 
			
		||||
	minetest.swap_node(right_here, {name="along_shore:seaweed_"..math.random(1,4), param2=math.random(1,3)})
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
    surface = {"default:water_source"},
 | 
			
		||||
    max_count = seaweed_max_count,
 | 
			
		||||
    rarity = seaweed_rarity,
 | 
			
		||||
    min_elevation = 1,
 | 
			
		||||
	max_elevation = 40,
 | 
			
		||||
	near_nodes = {"default:dirt_with_grass"},
 | 
			
		||||
	near_nodes_size = 4,
 | 
			
		||||
	near_nodes_vertical = 1,
 | 
			
		||||
	near_nodes_count = 1,
 | 
			
		||||
    plantlife_limit = -0.9,
 | 
			
		||||
  },
 | 
			
		||||
  flowers_plus.grow_seaweed
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
-- seaweed at beaches
 | 
			
		||||
-- MM: not satisfied with it, but IMHO some beaches should have some algae
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
    surface = {"default:water_source"},
 | 
			
		||||
    max_count = seaweed_max_count,
 | 
			
		||||
    rarity = seaweed_rarity,
 | 
			
		||||
    min_elevation = 1,
 | 
			
		||||
	max_elevation = 40,
 | 
			
		||||
	near_nodes = {"default:sand"},
 | 
			
		||||
	near_nodes_size = 1,
 | 
			
		||||
	near_nodes_vertical = 0,
 | 
			
		||||
	near_nodes_count = 3,
 | 
			
		||||
    plantlife_limit = -0.9,
 | 
			
		||||
	temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
 | 
			
		||||
    temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
 | 
			
		||||
  },
 | 
			
		||||
  flowers_plus.grow_seaweed
 | 
			
		||||
)
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
    surface = {"default:sand"},
 | 
			
		||||
    max_count = seaweed_max_count*2,
 | 
			
		||||
    rarity = seaweed_rarity/2,
 | 
			
		||||
    min_elevation = 1,
 | 
			
		||||
	max_elevation = 40,
 | 
			
		||||
	near_nodes = {"default:water_source"},
 | 
			
		||||
	near_nodes_size = 1,
 | 
			
		||||
	near_nodes_vertical = 0,
 | 
			
		||||
	near_nodes_count = 3,
 | 
			
		||||
    plantlife_limit = -0.9,
 | 
			
		||||
	temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
 | 
			
		||||
    temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
 | 
			
		||||
  },
 | 
			
		||||
  flowers_plus.grow_seaweed
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
	surface = {"default:dirt_with_grass"},
 | 
			
		||||
	avoid_nodes = { "flowers:sunflower" },
 | 
			
		||||
	max_count = sunflowers_max_count,
 | 
			
		||||
	rarity = sunflowers_rarity,
 | 
			
		||||
	min_elevation = 0,
 | 
			
		||||
	plantlife_limit = -0.9,
 | 
			
		||||
	temp_max = 0.53,
 | 
			
		||||
	random_facedir = {0,3},
 | 
			
		||||
  },
 | 
			
		||||
  "flowers:sunflower"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
-- spawn ABM registrations
 | 
			
		||||
 | 
			
		||||
biome_lib:spawn_on_surfaces({
 | 
			
		||||
	spawn_delay = SPAWN_DELAY/2,
 | 
			
		||||
	spawn_plants = {
 | 
			
		||||
		"flowers:waterlily",
 | 
			
		||||
		"flowers:waterlily_225",
 | 
			
		||||
		"flowers:waterlily_45",
 | 
			
		||||
		"flowers:waterlily_675",
 | 
			
		||||
		"flowers:waterlily_s1",
 | 
			
		||||
		"flowers:waterlily_s2",
 | 
			
		||||
		"flowers:waterlily_s3",
 | 
			
		||||
		"flowers:waterlily_s4"
 | 
			
		||||
	},
 | 
			
		||||
	avoid_radius = 2.5,
 | 
			
		||||
	spawn_chance = SPAWN_CHANCE*4,
 | 
			
		||||
	spawn_surfaces = {"default:water_source"},
 | 
			
		||||
	avoid_nodes = {"group:flower", "group:flora" },
 | 
			
		||||
	seed_diff = flowers_seed_diff,
 | 
			
		||||
	light_min = 9,
 | 
			
		||||
	depth_max = 2,
 | 
			
		||||
	random_facedir = {0,3}
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
biome_lib:spawn_on_surfaces({
 | 
			
		||||
	spawn_delay = SPAWN_DELAY*2,
 | 
			
		||||
	spawn_plants = {"flowers:seaweed"},
 | 
			
		||||
	spawn_chance = SPAWN_CHANCE*2,
 | 
			
		||||
	spawn_surfaces = {"default:water_source"},
 | 
			
		||||
	avoid_nodes = {"group:flower", "group:flora"},
 | 
			
		||||
	seed_diff = flowers_seed_diff,
 | 
			
		||||
	light_min = 4,
 | 
			
		||||
	light_max = 10,
 | 
			
		||||
	neighbors = {"default:dirt_with_grass"},
 | 
			
		||||
	facedir = 1
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
biome_lib:spawn_on_surfaces({
 | 
			
		||||
	spawn_delay = SPAWN_DELAY*2,
 | 
			
		||||
	spawn_plants = {"flowers:seaweed"},
 | 
			
		||||
	spawn_chance = SPAWN_CHANCE*2,
 | 
			
		||||
	spawn_surfaces = {"default:dirt_with_grass"},
 | 
			
		||||
	avoid_nodes = {"group:flower", "group:flora" },
 | 
			
		||||
	seed_diff = flowers_seed_diff,
 | 
			
		||||
	light_min = 4,
 | 
			
		||||
	light_max = 10,
 | 
			
		||||
	neighbors = {"default:water_source"},
 | 
			
		||||
	ncount = 1,
 | 
			
		||||
	facedir = 1
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
biome_lib:spawn_on_surfaces({
 | 
			
		||||
	spawn_delay = SPAWN_DELAY*2,
 | 
			
		||||
	spawn_plants = {"flowers:seaweed"},
 | 
			
		||||
	spawn_chance = SPAWN_CHANCE*2,
 | 
			
		||||
	spawn_surfaces = {"default:stone"},
 | 
			
		||||
	avoid_nodes = {"group:flower", "group:flora" },
 | 
			
		||||
	seed_diff = flowers_seed_diff,
 | 
			
		||||
	light_min = 4,
 | 
			
		||||
	light_max = 10,
 | 
			
		||||
	neighbors = {"default:water_source"},
 | 
			
		||||
	ncount = 6,
 | 
			
		||||
	facedir = 1
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
biome_lib:spawn_on_surfaces({
 | 
			
		||||
	spawn_delay = SPAWN_DELAY*2,
 | 
			
		||||
	spawn_plants = {"flowers:sunflower"},
 | 
			
		||||
	spawn_chance = SPAWN_CHANCE*2,
 | 
			
		||||
	spawn_surfaces = {"default:dirt_with_grass"},
 | 
			
		||||
	avoid_nodes = {"group:flower", "flowers:sunflower"},
 | 
			
		||||
	seed_diff = flowers_seed_diff,
 | 
			
		||||
	light_min = 11,
 | 
			
		||||
	light_max = 14,
 | 
			
		||||
	min_elevation = 0,
 | 
			
		||||
	plantlife_limit = -0.9,
 | 
			
		||||
	temp_max = 0.53,
 | 
			
		||||
	random_facedir = {0,3},
 | 
			
		||||
	avoid_radius = 5
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
-- Cotton plants are now provided by the default "farming" mod.
 | 
			
		||||
-- old cotton plants -> farming cotton stage 8
 | 
			
		||||
-- cotton wads -> string (can be crafted into wool blocks)
 | 
			
		||||
-- potted cotton plants -> potted white dandelions
 | 
			
		||||
 | 
			
		||||
minetest.register_alias("flowers:cotton_plant", "farming:cotton_8")
 | 
			
		||||
minetest.register_alias("flowers:flower_cotton", "farming:cotton_8")
 | 
			
		||||
minetest.register_alias("flowers:flower_cotton_pot", "flowers:potted_dandelion_white")
 | 
			
		||||
minetest.register_alias("flowers:potted_cotton_plant", "flowers:potted_dandelion_white")
 | 
			
		||||
minetest.register_alias("flowers:cotton", "farming:string")
 | 
			
		||||
minetest.register_alias("flowers:cotton_wad", "farming:string")
 | 
			
		||||
minetest.register_alias("sunflower:sunflower", "flowers:sunflower")
 | 
			
		||||
 | 
			
		||||
print(S("[Flowers] Loaded."))
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
minetest.register_alias("junglegrass:shortest", "air")
 | 
			
		||||
minetest.register_alias("junglegrass:short", "air")
 | 
			
		||||
minetest.register_alias("junglegrass:medium", "air")
 | 
			
		||||
							
								
								
									
										1
									
								
								modpack.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1 @@
 | 
			
		||||
min_minetest_version = 5.2.0
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
default
 | 
			
		||||
plantlife_i18n
 | 
			
		||||
biome_lib
 | 
			
		||||
@@ -1,17 +1,9 @@
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
local title		= "Mole Hills"
 | 
			
		||||
local version	= "0.0.3"
 | 
			
		||||
local mname		= "molehills"
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
-- Idea by Sokomine
 | 
			
		||||
-- Code & textures by Mossmanikin
 | 
			
		||||
 | 
			
		||||
abstract_molehills = {}
 | 
			
		||||
 | 
			
		||||
dofile(minetest.get_modpath("molehills").."/molehills_settings.txt")
 | 
			
		||||
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("molehills")
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
-- NoDe
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
@@ -27,6 +19,7 @@ minetest.register_node("molehills:molehill",{
 | 
			
		||||
	description = S("Mole Hill"),
 | 
			
		||||
	inventory_image = "molehills_side.png",
 | 
			
		||||
	tiles = { "molehills_dirt.png" },
 | 
			
		||||
	use_texture_alpha = "clip",
 | 
			
		||||
	paramtype = "light",
 | 
			
		||||
	selection_box = mh_cbox,
 | 
			
		||||
	collision_box = mh_cbox,
 | 
			
		||||
@@ -48,33 +41,18 @@ minetest.register_craft({ -- molehills --> dirt
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
-- GeNeRaTiNG
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
abstract_molehills.place_molehill = function(pos)
 | 
			
		||||
	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"
 | 
			
		||||
	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"
 | 
			
		||||
	and minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z+1}).name ~= "air"
 | 
			
		||||
	and minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z-1}).name ~= "air"
 | 
			
		||||
	and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z+1}).name ~= "air"
 | 
			
		||||
	and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z-1}).name ~= "air" then
 | 
			
		||||
		minetest.swap_node(right_here, {name="molehills:molehill"})
 | 
			
		||||
	end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
biome_lib:register_generate_plant({
 | 
			
		||||
    surface = {"default:dirt_with_grass"},
 | 
			
		||||
    max_count = Molehills_Max_Count,
 | 
			
		||||
    rarity = Molehills_Rarity,
 | 
			
		||||
    min_elevation = 1,
 | 
			
		||||
	max_elevation = 40,
 | 
			
		||||
	avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"--[[,"air"]]},
 | 
			
		||||
	avoid_radius = 4,
 | 
			
		||||
    plantlife_limit = -0.3,
 | 
			
		||||
minetest.register_decoration({
 | 
			
		||||
	decoration = {
 | 
			
		||||
		"molehills:molehill"
 | 
			
		||||
	},
 | 
			
		||||
  abstract_molehills.place_molehill
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
print("[Mod] "..title.." ["..version.."] ["..mname.."]"..S("Loaded..."))
 | 
			
		||||
-----------------------------------------------------------------------------------------------
 | 
			
		||||
	fill_ratio = 0.002,
 | 
			
		||||
	y_min = 1,
 | 
			
		||||
	y_max = 40,
 | 
			
		||||
	place_on = {
 | 
			
		||||
		"default:dirt_with_grass"
 | 
			
		||||
	},
 | 
			
		||||
	spawn_by = "air",
 | 
			
		||||
	num_spawn_by = 3,
 | 
			
		||||
	deco_type = "simple",
 | 
			
		||||
	flags = "all_floors",
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								molehills/locale/molehills.de.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,9 @@
 | 
			
		||||
# textdomain: molehills
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# reusityback, 2022.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Mole Hill=Maulwurfshügel
 | 
			
		||||
							
								
								
									
										9
									
								
								molehills/locale/molehills.eo.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,9 @@
 | 
			
		||||
# textdomain: molehills
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# Jolesh, 2022.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Mole Hill=Talpa Monteto
 | 
			
		||||
							
								
								
									
										9
									
								
								molehills/locale/molehills.fr.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,9 @@
 | 
			
		||||
# textdomain: molehills
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# fat115 <fat115@framasoft.org>, 2017.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Mole Hill=Taupinière
 | 
			
		||||
							
								
								
									
										9
									
								
								molehills/locale/template.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,9 @@
 | 
			
		||||
# textdomain: molehills
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Mole Hill=
 | 
			
		||||
							
								
								
									
										2
									
								
								molehills/mod.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,2 @@
 | 
			
		||||
name = molehills
 | 
			
		||||
depends = default
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
-- Settings for generation of stuff (at map-generation time)
 | 
			
		||||
 | 
			
		||||
Molehills_Max_Count		= 320 -- absolute maximum number in an area of 80x80x80 nodes
 | 
			
		||||
 | 
			
		||||
Molehills_Rarity		= 87 -- larger values make molehills more rare (100 means chance of 0 %)
 | 
			
		||||
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("nature_classic")
 | 
			
		||||
-- Blossoms and such
 | 
			
		||||
 | 
			
		||||
local function spawn_apple_under(pos)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
default
 | 
			
		||||
plantlife_i18n
 | 
			
		||||
moretrees?
 | 
			
		||||
@@ -7,7 +7,7 @@ local current_mod_name = minetest.get_current_modname()
 | 
			
		||||
 | 
			
		||||
nature = {}
 | 
			
		||||
-- support for i18n
 | 
			
		||||
local S = plantlife_i18n.gettext
 | 
			
		||||
local S = minetest.get_translator("nature_classic")
 | 
			
		||||
 | 
			
		||||
nature.blossomqueue = {}
 | 
			
		||||
nature.blossomqueue_max = 1000
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								nature_classic/locale/nature_classic.de.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,10 @@
 | 
			
		||||
# textdomain: nature_classic
 | 
			
		||||
 | 
			
		||||
# SOME DESCRIPTIVE TITLE.
 | 
			
		||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 | 
			
		||||
# This file is distributed under the same license as the PACKAGE package.
 | 
			
		||||
# reusityback, 2022.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Apple blossoms=Apfelblüten
 | 
			
		||||
[Nature Classic] loaded!=[Nature Classic] geladen!
 | 
			
		||||