Compare commits
70 Commits
2020-02-16
...
replace_bi
Author | SHA1 | Date | |
---|---|---|---|
99d58e0876 | |||
59c483fd4f | |||
640cfd3ac7 | |||
cdfbf20ab0 | |||
85569605f5 | |||
a154cb9904 | |||
d55f066686 | |||
252c2bd1d2 | |||
15f62452b8 | |||
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 |
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
mushroom = {}
|
mushroom = {}
|
||||||
|
|
||||||
|
-- support for i18n
|
||||||
|
local S = minetest.get_translator("3dmushrooms")
|
||||||
|
|
||||||
minetest.override_item("flowers:mushroom_fertile_brown", {
|
minetest.override_item("flowers:mushroom_fertile_brown", {
|
||||||
drawtype = "mesh",
|
drawtype = "mesh",
|
||||||
mesh = "3dmushrooms.obj",
|
mesh = "3dmushrooms.obj",
|
||||||
@ -10,7 +13,8 @@ minetest.override_item("flowers:mushroom_fertile_brown", {
|
|||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
|
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", {
|
minetest.override_item("flowers:mushroom_brown", {
|
||||||
@ -21,7 +25,8 @@ minetest.override_item("flowers:mushroom_brown", {
|
|||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
|
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", {
|
minetest.override_item("flowers:mushroom_fertile_red", {
|
||||||
@ -32,7 +37,8 @@ minetest.override_item("flowers:mushroom_fertile_red", {
|
|||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
|
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", {
|
minetest.override_item("flowers:mushroom_red", {
|
||||||
@ -43,7 +49,8 @@ minetest.override_item("flowers:mushroom_red", {
|
|||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
|
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
|
-- 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")
|
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.=
|
@ -1,9 +0,0 @@
|
|||||||
-----------------------------------------------------------------------------------------------
|
|
||||||
local title = "Along the Shore"
|
|
||||||
local version = "0.0.4"
|
|
||||||
local mname = "along_shore"
|
|
||||||
-----------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------
|
|
||||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
|
||||||
-----------------------------------------------------------------------------------------------
|
|
@ -1,3 +0,0 @@
|
|||||||
name = along_shore
|
|
||||||
depends = default, biome_lib
|
|
||||||
optional_depends = flowers_plus
|
|
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 |
@ -8,30 +8,37 @@
|
|||||||
|
|
||||||
-- support for i18n
|
-- support for i18n
|
||||||
local S = minetest.get_translator("bushes")
|
local S = minetest.get_translator("bushes")
|
||||||
abstract_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_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
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_node("bushes:youngtree2_bottom", {
|
||||||
description = S("Young Tree 2 (bottom)"),
|
description = S("Young Tree 2 (bottom)"),
|
||||||
drawtype="nodebox",
|
drawtype="nodebox",
|
||||||
tiles = {"bushes_youngtree2trunk.png"},
|
tiles = {"bushes_youngtree2trunk.png"},
|
||||||
inventory_image = "bushes_youngtree2trunk_inv.png",
|
inventory_image = "bushes_youngtree2trunk_inv.png",
|
||||||
wield_image = "bushes_youngtree2trunk_inv.png",
|
wield_image = "bushes_youngtree2trunk_inv.png",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
--{0.375000,-0.500000,-0.500000,0.500000,0.500000,-0.375000}, --NodeBox 1
|
--{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
|
{-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(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
drop = 'default:stick'
|
drop = 'default:stick'
|
||||||
})
|
})
|
||||||
|
|
||||||
local BushBranchCenter = { {1,1}, {3,2} }
|
local BushBranchCenter = { {1,1}, {3,2} }
|
||||||
for i in pairs(BushBranchCenter) do
|
for i in pairs(BushBranchCenter) do
|
||||||
local Num = BushBranchCenter[i][1]
|
local Num = BushBranchCenter[i][1]
|
||||||
local TexNum = BushBranchCenter[i][2]
|
local TexNum = BushBranchCenter[i][2]
|
||||||
@ -42,6 +49,7 @@ for i in pairs(BushBranchCenter) do
|
|||||||
"bushes_leaves_"..TexNum..".png",
|
"bushes_leaves_"..TexNum..".png",
|
||||||
"bushes_branches_center_"..TexNum..".png"
|
"bushes_branches_center_"..TexNum..".png"
|
||||||
},
|
},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
@ -61,7 +69,8 @@ for i in pairs(BushBranchCenter) do
|
|||||||
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
|
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
|
||||||
snappy=3,
|
snappy=3,
|
||||||
flammable=2,
|
flammable=2,
|
||||||
leaves=1
|
leaves=1,
|
||||||
|
attached_node=1
|
||||||
},
|
},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
drop = 'default:stick 4'
|
drop = 'default:stick 4'
|
||||||
@ -83,6 +92,7 @@ for i in pairs(BushBranchSide) do
|
|||||||
--[[back]] "bushes_branches_center_"..TexNum..".png",-- unless U really want 'em 2 B different
|
--[[back]] "bushes_branches_center_"..TexNum..".png",-- unless U really want 'em 2 B different
|
||||||
--[[front]] "bushes_branches_right_"..TexNum..".png"
|
--[[front]] "bushes_branches_right_"..TexNum..".png"
|
||||||
},
|
},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
@ -104,7 +114,8 @@ for i in pairs(BushBranchSide) do
|
|||||||
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
|
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
|
||||||
snappy=3,
|
snappy=3,
|
||||||
flammable=2,
|
flammable=2,
|
||||||
leaves=1
|
leaves=1,
|
||||||
|
attached_node=1
|
||||||
},
|
},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
drop = 'default:stick 3'
|
drop = 'default:stick 3'
|
||||||
@ -118,11 +129,13 @@ for i in pairs(BushLeafNode) do
|
|||||||
description = S("Bush Leaves @1", Num),
|
description = S("Bush Leaves @1", Num),
|
||||||
drawtype = "allfaces_optional",
|
drawtype = "allfaces_optional",
|
||||||
tiles = {"bushes_leaves_"..Num..".png"},
|
tiles = {"bushes_leaves_"..Num..".png"},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
groups = { -- MM: Should we add leafdecay?
|
groups = { -- MM: Should we add leafdecay?
|
||||||
snappy=3,
|
snappy=3,
|
||||||
flammable=2,
|
flammable=2,
|
||||||
attached_node=1
|
attached_node=1,
|
||||||
|
leaves=1
|
||||||
},
|
},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
@ -158,9 +171,8 @@ abstract_bushes.grow_bush = function(pos)
|
|||||||
abstract_bushes.grow_bush_node(pos,5,leaf_type)
|
abstract_bushes.grow_bush_node(pos,5,leaf_type)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
||||||
|
|
||||||
|
|
||||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||||
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
||||||
|
|
||||||
@ -197,29 +209,27 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
pl.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"stoneage:grass_with_silex",
|
"stoneage:grass_with_silex",
|
||||||
"sumpf:peat",
|
"sumpf:peat",
|
||||||
"sumpf:sumpf"
|
"sumpf:sumpf"
|
||||||
},
|
},
|
||||||
max_count = 15, --10,15
|
noise_params = pl.generate_noise_params({rarity = bushes_bush_rarity, rarity_fertility = bushes_bush_rarity_fertility}),
|
||||||
rarity = 101 - 4, --3,4
|
|
||||||
min_elevation = 1, -- above sea level
|
min_elevation = 1, -- above sea level
|
||||||
plantlife_limit = -0.9,
|
|
||||||
},
|
},
|
||||||
|
"bushes:bushes",
|
||||||
abstract_bushes.grow_bush
|
abstract_bushes.grow_bush
|
||||||
)
|
)
|
||||||
|
|
||||||
abstract_bushes.grow_youngtree2 = function(pos)
|
abstract_bushes.grow_youngtree2 = function(pos)
|
||||||
local height = math.random(4,5)
|
local height = math.random(4,5)
|
||||||
abstract_bushes.grow_youngtree_node2(pos,height)
|
abstract_bushes.grow_youngtree_node2(pos,height)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
abstract_bushes.grow_youngtree_node2 = function(pos, height)
|
abstract_bushes.grow_youngtree_node2 = function(pos, height)
|
||||||
|
|
||||||
|
|
||||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||||
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
||||||
local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
|
local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
|
||||||
@ -237,24 +247,20 @@ 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, {name="bushes:BushLeaves1" })
|
||||||
minetest.swap_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
|
minetest.swap_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
pl.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"stoneage:grass_with_silex",
|
"stoneage:grass_with_silex",
|
||||||
"sumpf:peat",
|
"sumpf:peat",
|
||||||
"sumpf:sumpf"
|
"sumpf:sumpf"
|
||||||
},
|
},
|
||||||
max_count = 55, --10,15
|
noise_params = pl.generate_noise_params({rarity = bushes_youngtrees_rarity, rarity_fertility = bushes_youngtrees_rarity_fertility}),
|
||||||
rarity = 101 - 4, --3,4
|
|
||||||
min_elevation = 1, -- above sea level
|
min_elevation = 1, -- above sea level
|
||||||
plantlife_limit = -0.9,
|
|
||||||
},
|
},
|
||||||
|
"bushes:youngtrees",
|
||||||
abstract_bushes.grow_youngtree2
|
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
|
@ -1,3 +1,3 @@
|
|||||||
name = bushes
|
name = bushes
|
||||||
depends = default, biome_lib
|
depends = default, biome_lib
|
||||||
optional_depends = stonage, sumpf
|
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
|
@ -30,7 +30,7 @@ local modpath = minetest.get_modpath('bushes_classic')
|
|||||||
dofile(modpath..'/cooking.lua')
|
dofile(modpath..'/cooking.lua')
|
||||||
dofile(modpath..'/nodes.lua')
|
dofile(modpath..'/nodes.lua')
|
||||||
|
|
||||||
biome_lib:spawn_on_surfaces({
|
biome_lib.register_active_spawner({
|
||||||
spawn_delay = 3600,
|
spawn_delay = 3600,
|
||||||
spawn_plants = bushes_classic.spawn_list,
|
spawn_plants = bushes_classic.spawn_list,
|
||||||
avoid_radius = 10,
|
avoid_radius = 10,
|
||||||
|
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
|
@ -63,7 +63,7 @@ plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
|||||||
|
|
||||||
-- with a chance of 1/3, return 2 bushes
|
-- with a chance of 1/3, return 2 bushes
|
||||||
local amount
|
local amount
|
||||||
if math.random(1,3) == 1 then
|
if can_harvest and math.random(1,3) == 1 then
|
||||||
amount = "2"
|
amount = "2"
|
||||||
else
|
else
|
||||||
amount = "1"
|
amount = "1"
|
||||||
@ -174,6 +174,13 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
|
|||||||
texture_bottom = "bushes_bush_bottom.png"
|
texture_bottom = "bushes_bush_bottom.png"
|
||||||
end
|
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", {
|
minetest.register_node(":bushes:" .. bush_name .. "_bush", {
|
||||||
description = bushes_classic.bushes_descriptions[i][6],
|
description = bushes_classic.bushes_descriptions[i][6],
|
||||||
drawtype = "mesh",
|
drawtype = "mesh",
|
||||||
@ -185,6 +192,8 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
|
|||||||
groups = groups,
|
groups = groups,
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
drop = "",
|
drop = "",
|
||||||
|
node_dig_prediction = node_dig_prediction,
|
||||||
|
node_placement_prediction = node_placement_prediction,
|
||||||
after_dig_node = function( pos, oldnode, oldmetadata, digger )
|
after_dig_node = function( pos, oldnode, oldmetadata, digger )
|
||||||
return plantlife_bushes.after_dig_node(pos, oldnode, oldmetadata, digger);
|
return plantlife_bushes.after_dig_node(pos, oldnode, oldmetadata, digger);
|
||||||
end,
|
end,
|
||||||
|
@ -7,6 +7,8 @@ local mname = "cavestuff"
|
|||||||
-- support for i18n
|
-- support for i18n
|
||||||
local S = minetest.get_translator("cavestuff")
|
local S = minetest.get_translator("cavestuff")
|
||||||
|
|
||||||
|
cavestuff = {}
|
||||||
|
|
||||||
dofile(minetest.get_modpath("cavestuff").."/nodes.lua")
|
dofile(minetest.get_modpath("cavestuff").."/nodes.lua")
|
||||||
dofile(minetest.get_modpath("cavestuff").."/mapgen.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
|
@ -1,52 +1,65 @@
|
|||||||
--Map Generation Stuff
|
--Map Generation Stuff
|
||||||
|
|
||||||
minetest.register_on_generated(function(minp, maxp, seed)
|
minetest.register_decoration({
|
||||||
if maxp.y >= 2 and minp.y <= 0 then
|
decoration = {
|
||||||
-- Generate pebbles
|
"cavestuff:pebble_1",
|
||||||
local perlin1 = minetest.get_perlin(329, 3, 0.6, 100)
|
"cavestuff:pebble_2"
|
||||||
-- Assume X and Z lengths are equal
|
},
|
||||||
local divlen = 16
|
place_on = {
|
||||||
local divs = (maxp.x-minp.x)/divlen+1;
|
"default:dirt_with_grass",
|
||||||
for divx=0,divs-1 do
|
"default:gravel",
|
||||||
for divz=0,divs-1 do
|
"default:stone",
|
||||||
local x0 = minp.x + math.floor((divx+0)*divlen)
|
"default:permafrost_with_stones"
|
||||||
local z0 = minp.z + math.floor((divz+0)*divlen)
|
},
|
||||||
local x1 = minp.x + math.floor((divx+1)*divlen)
|
noise_params = {
|
||||||
local z1 = minp.z + math.floor((divz+1)*divlen)
|
offset = 0,
|
||||||
-- Determine pebble amount from perlin noise
|
scale = 0.0078125,
|
||||||
local pebble_amount = math.floor(perlin1:get2d({x=x0, y=z0}) ^ 2 * 2)
|
spread = {
|
||||||
-- Find random positions for pebbles based on this random
|
y = 100,
|
||||||
local pr = PseudoRandom(seed+1)
|
z = 100,
|
||||||
for i=0,pebble_amount do
|
x = 100
|
||||||
local x = pr:next(x0, x1)
|
},
|
||||||
local z = pr:next(z0, z1)
|
seed = 0,
|
||||||
-- Find ground level (0...15)
|
octaves = 3,
|
||||||
local ground_y = nil
|
persist = 0.6,
|
||||||
for y=30,0,-1 do
|
flags = "absvalue",
|
||||||
if minetest.get_node({x=x,y=y,z=z}).name ~= "air" then
|
lacunarity = 2
|
||||||
ground_y = y
|
},
|
||||||
break
|
param2 = 0,
|
||||||
end
|
flags = "all_floors",
|
||||||
end
|
deco_type = "simple",
|
||||||
|
param2_max = 3,
|
||||||
|
y_min = -16,
|
||||||
|
y_max = 48
|
||||||
|
})
|
||||||
|
|
||||||
if ground_y then
|
minetest.register_decoration({
|
||||||
local p = {x=x,y=ground_y+1,z=z}
|
decoration = {
|
||||||
local nn = minetest.get_node(p).name
|
"cavestuff:desert_pebble_1",
|
||||||
-- Check if the node can be replaced
|
"cavestuff:desert_pebble_2"
|
||||||
if minetest.registered_nodes[nn] and
|
},
|
||||||
minetest.registered_nodes[nn].buildable_to then
|
place_on = {
|
||||||
nn = minetest.get_node({x=x,y=ground_y,z=z}).name
|
"default:desert_sand",
|
||||||
-- If desert sand, add dry shrub
|
"default:desert_stone"
|
||||||
if nn == "default:dirt_with_grass" then
|
},
|
||||||
minetest.swap_node(p,{name="cavestuff:pebble_"..pr:next(1,2), param2=math.random(0,3)})
|
noise_params = {
|
||||||
elseif nn == "default:desert_sand" then
|
offset = 0,
|
||||||
minetest.swap_node(p,{name="cavestuff:desert_pebble_"..pr:next(1,2), param2=math.random(0,3)})
|
scale = 0.0078125,
|
||||||
end
|
spread = {
|
||||||
end
|
y = 100,
|
||||||
end
|
z = 100,
|
||||||
|
x = 100
|
||||||
end
|
},
|
||||||
end
|
seed = 0,
|
||||||
end
|
octaves = 3,
|
||||||
end
|
persist = 0.6,
|
||||||
end)
|
flags = "absvalue",
|
||||||
|
lacunarity = 2
|
||||||
|
},
|
||||||
|
param2 = 0,
|
||||||
|
flags = "all_floors",
|
||||||
|
deco_type = "simple",
|
||||||
|
param2_max = 3,
|
||||||
|
y_min = -16,
|
||||||
|
y_max = 48
|
||||||
|
})
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
name = cavestuff
|
name = cavestuff
|
||||||
depends = default
|
depends = default,biome_lib
|
||||||
|
@ -15,7 +15,7 @@ minetest.register_node("cavestuff:pebble_1",{
|
|||||||
tiles = {"undergrowth_pebble.png"},
|
tiles = {"undergrowth_pebble.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {cracky=3, stone=1},
|
groups = {cracky=3, stone=1, attached_node=1},
|
||||||
selection_box = cbox,
|
selection_box = cbox,
|
||||||
collision_box = cbox,
|
collision_box = cbox,
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
@ -35,7 +35,7 @@ minetest.register_node("cavestuff:pebble_2",{
|
|||||||
tiles = {"undergrowth_pebble.png"},
|
tiles = {"undergrowth_pebble.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
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,
|
selection_box = cbox,
|
||||||
collision_box = cbox,
|
collision_box = cbox,
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
@ -48,7 +48,7 @@ minetest.register_node("cavestuff:desert_pebble_1",{
|
|||||||
tiles = {"default_desert_stone.png"},
|
tiles = {"default_desert_stone.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {cracky=3, stone=1},
|
groups = {cracky=3, stone=1, attached_node=1},
|
||||||
selection_box = cbox,
|
selection_box = cbox,
|
||||||
collision_box = cbox,
|
collision_box = cbox,
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
@ -67,7 +67,7 @@ minetest.register_node("cavestuff:desert_pebble_2",{
|
|||||||
tiles = {"default_desert_stone.png"},
|
tiles = {"default_desert_stone.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
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,
|
selection_box = cbox,
|
||||||
collision_box = cbox,
|
collision_box = cbox,
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
@ -85,19 +85,34 @@ minetest.register_node("cavestuff:stalactite_1",{
|
|||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.187500,0.425000,-0.150003,0.162500,0.500000,0.162500},
|
{-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.112500,-0.162500,-0.100000,0.087500,-0.475000,0.087500},
|
||||||
{-0.062500,-0.275000,-0.062500,0.062500,0.500000,0.062500},
|
{-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.037500,0.837500,0.037500,0.037500,-0.500000,-0.025000},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
local pt = pointed_thing
|
local dir = vector.subtract(pointed_thing.above, pointed_thing.under)
|
||||||
if minetest.get_node(pt.under).name=="default:stone"
|
local base = pointed_thing.under
|
||||||
and minetest.get_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}).name=="air"
|
local place = vector.add(base, dir)
|
||||||
and minetest.get_node({x=pt.under.x, y=pt.under.y-2, z=pt.under.z}).name=="air" then
|
local above = vector.add(place, dir)
|
||||||
minetest.swap_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}, {name="cavestuff:stalactite_"..math.random(1,3)})
|
|
||||||
|
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
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
@ -116,10 +131,10 @@ minetest.register_node("cavestuff:stalactite_2",{
|
|||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.187500,0.387500,-0.150003,0.162500,0.500000,0.162500},
|
{-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.112500,-0.112500,-0.100000,0.087500,-0.475000,0.087500},
|
||||||
{-0.062500,-0.675000,-0.062500,0.062500,0.500000,0.062500},
|
{-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.037500,0.975000,0.037500,0.037500,-0.500000,-0.025000},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -134,10 +149,10 @@ minetest.register_node("cavestuff:stalactite_3",{
|
|||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.187500,0.387500,-0.150003,0.162500,0.500000,0.162500},
|
{-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.112500,-0.037500,-0.100000,0.087500,-0.475000,0.087500},
|
||||||
{-0.062500,-0.437500,-0.062500,0.062500,0.500000,0.062500},
|
{-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.037500,1.237500,0.037500,0.037500,-0.500000,-0.025000},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -130,6 +130,7 @@ minetest.register_node("dryplants:grass", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
tiles = {"dryplants_grass.png"},
|
tiles = {"dryplants_grass.png"},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -161,6 +162,7 @@ minetest.register_node("dryplants:hay", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
tiles = {"dryplants_hay.png"},
|
tiles = {"dryplants_hay.png"},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
@ -92,7 +92,7 @@ minetest.register_node("dryplants:juncus_02", {
|
|||||||
-- GENERATE SMALL JUNCUS
|
-- GENERATE SMALL JUNCUS
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- near water or swamp
|
-- near water or swamp
|
||||||
biome_lib:register_generate_plant({
|
pl.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
--"default:desert_sand",
|
--"default:desert_sand",
|
||||||
@ -101,19 +101,18 @@ biome_lib:register_generate_plant({
|
|||||||
"sumpf:peat",
|
"sumpf:peat",
|
||||||
"sumpf:sumpf"
|
"sumpf:sumpf"
|
||||||
},
|
},
|
||||||
max_count = JUNCUS_NEAR_WATER_PER_MAPBLOCK,
|
noise_params = pl.generate_noise_params({max_count = JUNCUS_NEAR_WATER_PER_MAPBLOCK, rarity = 101 - JUNCUS_NEAR_WATER_RARITY}),
|
||||||
rarity = 101 - JUNCUS_NEAR_WATER_RARITY,
|
|
||||||
min_elevation = 1, -- above sea level
|
min_elevation = 1, -- above sea level
|
||||||
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||||
near_nodes_size = 2,
|
near_nodes_size = 2,
|
||||||
near_nodes_vertical = 1,
|
near_nodes_vertical = 1,
|
||||||
near_nodes_count = 1,
|
near_nodes_count = 1,
|
||||||
plantlife_limit = -0.9,
|
|
||||||
},
|
},
|
||||||
|
"dryplants:juncus_near_water",
|
||||||
abstract_dryplants.grow_juncus
|
abstract_dryplants.grow_juncus
|
||||||
)
|
)
|
||||||
-- at dunes/beach
|
-- at dunes/beach
|
||||||
biome_lib:register_generate_plant({
|
pl.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
--"default:dirt_with_grass",
|
--"default:dirt_with_grass",
|
||||||
--"default:desert_sand",
|
--"default:desert_sand",
|
||||||
@ -122,14 +121,13 @@ biome_lib:register_generate_plant({
|
|||||||
--"sumpf:peat",
|
--"sumpf:peat",
|
||||||
--"sumpf:sumpf"
|
--"sumpf:sumpf"
|
||||||
},
|
},
|
||||||
max_count = JUNCUS_AT_BEACH_PER_MAPBLOCK,
|
noise_params = pl.generate_noise_params({max_count = JUNCUS_AT_BEACH_PER_MAPBLOCK, rarity = 101 - JUNCUS_AT_BEACH_RARITY}),
|
||||||
rarity = 101 - JUNCUS_AT_BEACH_RARITY,
|
|
||||||
min_elevation = 1, -- above sea level
|
min_elevation = 1, -- above sea level
|
||||||
near_nodes = {"default:dirt_with_grass"},
|
near_nodes = {"default:dirt_with_grass"},
|
||||||
near_nodes_size = 2,
|
near_nodes_size = 2,
|
||||||
near_nodes_vertical = 1,
|
near_nodes_vertical = 1,
|
||||||
near_nodes_count = 1,
|
near_nodes_count = 1,
|
||||||
plantlife_limit = -0.9,
|
|
||||||
},
|
},
|
||||||
|
"dryplants:junces_at_beach",
|
||||||
abstract_dryplants.grow_juncus
|
abstract_dryplants.grow_juncus
|
||||||
)
|
)
|
||||||
|
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
|
@ -12,14 +12,13 @@ abstract_dryplants.grow_grass_variation = function(pos)
|
|||||||
minetest.swap_node(right_here, {name="dryplants:grass_short"})
|
minetest.swap_node(right_here, {name="dryplants:grass_short"})
|
||||||
end
|
end
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
pl.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
},
|
},
|
||||||
max_count = 4800,
|
noise_params = pl.generate_noise_params({max_count = 4800, rarity = 25}),
|
||||||
rarity = 25,
|
|
||||||
min_elevation = 1, -- above sea level
|
min_elevation = 1, -- above sea level
|
||||||
plantlife_limit = -0.9,
|
|
||||||
},
|
},
|
||||||
|
"dryplants:grass",
|
||||||
abstract_dryplants.grow_grass_variation
|
abstract_dryplants.grow_grass_variation
|
||||||
)
|
)
|
||||||
|
@ -7,26 +7,23 @@
|
|||||||
-- Looked at code from: default
|
-- Looked at code from: default
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
abstract_dryplants.grow_grass = function(pos)
|
minetest.register_decoration({
|
||||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
decoration = {
|
||||||
local grass_size = math.random(1,5)
|
"default:grass_1",
|
||||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
"default:grass_2",
|
||||||
or minetest.get_node(right_here).name == "default:junglegrass" then
|
"default:grass_3",
|
||||||
minetest.swap_node(right_here, {name="default:grass_"..grass_size})
|
"default:grass_4",
|
||||||
end
|
"default:grass_5"
|
||||||
end
|
},
|
||||||
|
place_on = {
|
||||||
biome_lib:register_generate_plant({
|
|
||||||
surface = {
|
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"stoneage:grass_with_silex",
|
"stoneage:grass_with_silex",
|
||||||
"sumpf:peat",
|
"sumpf:peat",
|
||||||
"sumpf:sumpf"
|
"sumpf:sumpf"
|
||||||
},
|
},
|
||||||
max_count = TALL_GRASS_PER_MAPBLOCK,
|
noise_params = pl.generate_noise_params({max_count = TALL_GRASS_PER_MAPBLOCK, rarity = 101 - TALL_GRASS_RARITY}),
|
||||||
rarity = 101 - TALL_GRASS_RARITY,
|
flags = "all_floors",
|
||||||
min_elevation = 1, -- above sea level
|
deco_type = "simple",
|
||||||
plantlife_limit = -0.9,
|
y_min = 1,
|
||||||
},
|
y_max = 48
|
||||||
abstract_dryplants.grow_grass
|
})
|
||||||
)
|
|
@ -264,7 +264,8 @@ minetest.register_node("dryplants:reedmace_sapling", {
|
|||||||
groups = {
|
groups = {
|
||||||
snappy=3,
|
snappy=3,
|
||||||
flammable=2,
|
flammable=2,
|
||||||
attached_node=1
|
attached_node=1,
|
||||||
|
sapling=1,
|
||||||
},
|
},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
selection_box = {
|
selection_box = {
|
||||||
@ -327,7 +328,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- SPAWN REEDMACE
|
-- SPAWN REEDMACE
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
--[[biome_lib:spawn_on_surfaces({
|
--[[biome_lib.register_active_spawner({
|
||||||
spawn_delay = 1200,
|
spawn_delay = 1200,
|
||||||
spawn_plants = {"dryplants:reedmace_sapling"},
|
spawn_plants = {"dryplants:reedmace_sapling"},
|
||||||
spawn_chance = 400,
|
spawn_chance = 400,
|
||||||
@ -348,7 +349,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
|||||||
-- GENERATE REEDMACE
|
-- GENERATE REEDMACE
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- near water or swamp
|
-- near water or swamp
|
||||||
biome_lib:register_generate_plant({
|
pl.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:desert_sand",
|
"default:desert_sand",
|
||||||
@ -356,20 +357,19 @@ biome_lib:register_generate_plant({
|
|||||||
"sumpf:peat",
|
"sumpf:peat",
|
||||||
"sumpf:sumpf"
|
"sumpf:sumpf"
|
||||||
},
|
},
|
||||||
max_count = REEDMACE_NEAR_WATER_PER_MAPBLOCK,
|
noise_params = pl.generate_noise_params({max_count = REEDMACE_NEAR_WATER_PER_MAPBLOCK, rarity = 101 - REEDMACE_NEAR_WATER_RARITY}),
|
||||||
rarity = 101 - REEDMACE_NEAR_WATER_RARITY,
|
|
||||||
--rarity = 60,
|
--rarity = 60,
|
||||||
min_elevation = 1, -- above sea level
|
min_elevation = 1, -- above sea level
|
||||||
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||||
near_nodes_size = 2,
|
near_nodes_size = 2,
|
||||||
near_nodes_vertical = 1,
|
near_nodes_vertical = 1,
|
||||||
near_nodes_count = 1,
|
near_nodes_count = 1,
|
||||||
plantlife_limit = -0.9,
|
|
||||||
},
|
},
|
||||||
|
"dryplants:reedmace_near_water",
|
||||||
abstract_dryplants.grow_reedmace
|
abstract_dryplants.grow_reedmace
|
||||||
)
|
)
|
||||||
-- in water
|
-- in water
|
||||||
biome_lib:register_generate_plant({
|
pl.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt",
|
"default:dirt",
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
@ -379,26 +379,24 @@ biome_lib:register_generate_plant({
|
|||||||
"sumpf:peat",
|
"sumpf:peat",
|
||||||
"sumpf:sumpf"
|
"sumpf:sumpf"
|
||||||
},
|
},
|
||||||
max_count = REEDMACE_IN_WATER_PER_MAPBLOCK,
|
noise_params = pl.generate_noise_params({max_count = REEDMACE_IN_WATER_PER_MAPBLOCK, rarity = 101 - REEDMACE_IN_WATER_RARITY}),
|
||||||
rarity = 101 - REEDMACE_IN_WATER_RARITY,
|
|
||||||
--rarity = 35,
|
--rarity = 35,
|
||||||
min_elevation = 0, -- a bit below sea level
|
min_elevation = 0, -- a bit below sea level
|
||||||
max_elevation = 0, -- ""
|
max_elevation = 0, -- ""
|
||||||
near_nodes = {"default:water_source","sumpf:dirtywater_source"},
|
near_nodes = {"default:water_source","sumpf:dirtywater_source"},
|
||||||
near_nodes_size = 1,
|
near_nodes_size = 1,
|
||||||
near_nodes_count = 1,
|
near_nodes_count = 1,
|
||||||
plantlife_limit = -0.9,
|
|
||||||
},
|
},
|
||||||
|
"dryplants:reedmace_in_water",
|
||||||
abstract_dryplants.grow_reedmace_water
|
abstract_dryplants.grow_reedmace_water
|
||||||
)
|
)
|
||||||
-- for oases & tropical beaches & tropical swamps
|
-- for oases & tropical beaches & tropical swamps
|
||||||
biome_lib:register_generate_plant({
|
pl.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:sand",
|
"default:sand",
|
||||||
"sumpf:sumpf"
|
"sumpf:sumpf"
|
||||||
},
|
},
|
||||||
max_count = REEDMACE_FOR_OASES_PER_MAPBLOCK,
|
noise_params = pl.generate_noise_params({max_count = REEDMACE_FOR_OASES_PER_MAPBLOCK, 101 - REEDMACE_FOR_OASES_RARITY}),
|
||||||
rarity = 101 - REEDMACE_FOR_OASES_RARITY,
|
|
||||||
--rarity = 10,
|
--rarity = 10,
|
||||||
neighbors = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
neighbors = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||||
ncount = 1,
|
ncount = 1,
|
||||||
@ -407,7 +405,7 @@ biome_lib:register_generate_plant({
|
|||||||
near_nodes_size = 2,
|
near_nodes_size = 2,
|
||||||
near_nodes_vertical = 1,
|
near_nodes_vertical = 1,
|
||||||
near_nodes_count = 1,
|
near_nodes_count = 1,
|
||||||
plantlife_limit = -0.9,
|
|
||||||
},
|
},
|
||||||
|
"dryplants:reemace_oases",
|
||||||
abstract_dryplants.grow_reedmace
|
abstract_dryplants.grow_reedmace
|
||||||
)
|
)
|
||||||
|
@ -87,7 +87,7 @@ end
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
if abstract_ferns.config.lady_ferns_near_tree == true then
|
if abstract_ferns.config.lady_ferns_near_tree == true then
|
||||||
biome_lib:register_generate_plant({ -- near trees (woodlands)
|
biome_lib.register_on_generate({ -- near trees (woodlands)
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
@ -116,7 +116,7 @@ if abstract_ferns.config.lady_ferns_near_tree == true then
|
|||||||
end
|
end
|
||||||
|
|
||||||
if abstract_ferns.config.lady_ferns_near_rock == true then
|
if abstract_ferns.config.lady_ferns_near_rock == true then
|
||||||
biome_lib:register_generate_plant({ -- near stone (mountains)
|
biome_lib.register_on_generate({ -- near stone (mountains)
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
@ -143,7 +143,7 @@ if abstract_ferns.config.lady_ferns_near_rock == true then
|
|||||||
end
|
end
|
||||||
|
|
||||||
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
|
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
|
||||||
biome_lib:register_generate_plant({ -- near ores (potential mining sites)
|
biome_lib.register_on_generate({ -- near ores (potential mining sites)
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
@ -183,7 +183,7 @@ if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a
|
|||||||
end
|
end
|
||||||
|
|
||||||
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
|
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
|
@ -13,6 +13,25 @@ assert(abstract_ferns.config.enable_giant_treefern == true)
|
|||||||
local S = minetest.get_translator("ferns")
|
local S = minetest.get_translator("ferns")
|
||||||
-- lot of code, lot to load
|
-- 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)
|
abstract_ferns.grow_giant_tree_fern = function(pos)
|
||||||
local pos_aux = {x = pos.x, y = pos.y + 1, z = pos.z}
|
local pos_aux = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||||
local name = minetest.get_node(pos_aux).name
|
local name = minetest.get_node(pos_aux).name
|
||||||
@ -162,6 +181,14 @@ minetest.register_node("ferns:tree_fern_leave_big", {
|
|||||||
},
|
},
|
||||||
drop = "",
|
drop = "",
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
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,
|
||||||
})
|
})
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
@ -173,6 +200,7 @@ minetest.register_node("ferns:tree_fern_leave_big_end", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
tiles = { "ferns_tree_fern_leave_big_end.png" },
|
tiles = { "ferns_tree_fern_leave_big_end.png" },
|
||||||
|
use_texture_alpha = "clip",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -205,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_top.png^ferns_tree_fern_leave_big_cross.png",
|
||||||
"ferns_fern_trunk_big.png"
|
"ferns_fern_trunk_big.png"
|
||||||
},
|
},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
-- {left, bottom, front, right, top, back }
|
-- {left, bottom, front, right, top, back }
|
||||||
@ -242,6 +271,7 @@ minetest.register_node("ferns:fern_trunk_big", {
|
|||||||
"ferns_fern_trunk_big_top.png",
|
"ferns_fern_trunk_big_top.png",
|
||||||
"ferns_fern_trunk_big.png"
|
"ferns_fern_trunk_big.png"
|
||||||
},
|
},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
|
fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
|
||||||
@ -271,7 +301,7 @@ minetest.register_node("ferns:sapling_giant_tree_fern", {
|
|||||||
tiles = {"ferns_sapling_tree_fern_giant.png"},
|
tiles = {"ferns_sapling_tree_fern_giant.png"},
|
||||||
inventory_image = "ferns_sapling_tree_fern_giant.png",
|
inventory_image = "ferns_sapling_tree_fern_giant.png",
|
||||||
walkable = false,
|
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(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -285,8 +315,10 @@ minetest.register_abm({
|
|||||||
interval = 1000,
|
interval = 1000,
|
||||||
chance = 4,
|
chance = 4,
|
||||||
action = function(pos, node, _, _)
|
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})
|
abstract_ferns.grow_giant_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
|
||||||
end
|
end
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
@ -295,7 +327,7 @@ minetest.register_abm({
|
|||||||
|
|
||||||
-- in jungles
|
-- in jungles
|
||||||
if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
|
if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||||
@ -321,7 +353,7 @@ end
|
|||||||
|
|
||||||
-- for oases & tropical beaches
|
-- for oases & tropical beaches
|
||||||
if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
|
if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:sand"--,
|
"default:sand"--,
|
||||||
--"default:desert_sand"
|
--"default:desert_sand"
|
||||||
|
@ -75,7 +75,7 @@ create_nodes()
|
|||||||
-- Spawning
|
-- Spawning
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
if abstract_ferns.config.enable_horsetails_spawning == true then
|
if abstract_ferns.config.enable_horsetails_spawning == true then
|
||||||
biome_lib:spawn_on_surfaces({
|
biome_lib.register_active_spawner({
|
||||||
spawn_delay = 1200,
|
spawn_delay = 1200,
|
||||||
spawn_plants = node_names,
|
spawn_plants = node_names,
|
||||||
spawn_chance = 400,
|
spawn_chance = 400,
|
||||||
@ -104,7 +104,7 @@ end
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
if abstract_ferns.config.enable_horsetails_on_grass == true then
|
if abstract_ferns.config.enable_horsetails_on_grass == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
|
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
|
||||||
@ -137,7 +137,7 @@ if abstract_ferns.config.enable_horsetails_on_grass == true then
|
|||||||
end
|
end
|
||||||
|
|
||||||
if abstract_ferns.config.enable_horsetails_on_stones == true then
|
if abstract_ferns.config.enable_horsetails_on_stones == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:gravel", -- roots go deep
|
"default:gravel", -- roots go deep
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
|
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)
|
@ -11,6 +11,25 @@ local S = minetest.get_translator("ferns")
|
|||||||
|
|
||||||
assert(abstract_ferns.config.enable_treefern == true)
|
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)
|
abstract_ferns.grow_tree_fern = function(pos)
|
||||||
|
|
||||||
local pos_aux = {x = pos.x, y = pos.y + 1, z = pos.z}
|
local pos_aux = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||||
@ -128,6 +147,7 @@ minetest.register_node("ferns:fern_trunk", {
|
|||||||
"ferns_fern_trunk_top.png",
|
"ferns_fern_trunk_top.png",
|
||||||
"ferns_fern_trunk.png"
|
"ferns_fern_trunk.png"
|
||||||
},
|
},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8},
|
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8},
|
||||||
@ -158,7 +178,7 @@ minetest.register_node("ferns:sapling_tree_fern", {
|
|||||||
tiles = {"ferns_sapling_tree_fern.png"},
|
tiles = {"ferns_sapling_tree_fern.png"},
|
||||||
inventory_image = "ferns_sapling_tree_fern.png",
|
inventory_image = "ferns_sapling_tree_fern.png",
|
||||||
walkable = false,
|
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(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -171,8 +191,10 @@ minetest.register_abm({
|
|||||||
interval = 1000,
|
interval = 1000,
|
||||||
chance = 4,
|
chance = 4,
|
||||||
action = function(pos, node, _, _)
|
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})
|
abstract_ferns.grow_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
|
||||||
end
|
end
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
@ -181,7 +203,7 @@ minetest.register_abm({
|
|||||||
|
|
||||||
-- in jungles
|
-- in jungles
|
||||||
if abstract_ferns.config.enable_treeferns_in_jungle == true then
|
if abstract_ferns.config.enable_treeferns_in_jungle == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||||
@ -210,7 +232,7 @@ end
|
|||||||
|
|
||||||
-- for oases & tropical beaches
|
-- for oases & tropical beaches
|
||||||
if abstract_ferns.config.enable_treeferns_in_oases == true then
|
if abstract_ferns.config.enable_treeferns_in_oases == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:sand"--,
|
"default:sand"--,
|
||||||
--"default:desert_sand"
|
--"default:desert_sand"
|
||||||
|
@ -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 = minetest.get_translator("flowers_plus")
|
|
||||||
|
|
||||||
-- 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("[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 +0,0 @@
|
|||||||
name = junglegrass
|
|
1
modpack.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
min_minetest_version = 5.2.0
|
@ -1,14 +1,13 @@
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
local title = "Mole Hills"
|
|
||||||
local version = "0.0.3"
|
|
||||||
local mname = "molehills"
|
|
||||||
-----------------------------------------------------------------------------------------------
|
|
||||||
-- Idea by Sokomine
|
-- Idea by Sokomine
|
||||||
-- Code & textures by Mossmanikin
|
-- Code & textures by Mossmanikin
|
||||||
|
|
||||||
abstract_molehills = {}
|
abstract_molehills = {}
|
||||||
|
|
||||||
dofile(minetest.get_modpath("molehills").."/molehills_settings.txt")
|
local molehills_rarity = tonumber(minetest.settings:get("molehills_rarity")) or 99.5
|
||||||
|
local molehills_rarity_fertility = tonumber(minetest.settings:get("molehills_rarity_fertility")) or 1
|
||||||
|
local molehills_fertility = tonumber(minetest.settings:get("molehills_fertility")) or -0.6
|
||||||
|
|
||||||
|
|
||||||
-- support for i18n
|
-- support for i18n
|
||||||
local S = minetest.get_translator("molehills")
|
local S = minetest.get_translator("molehills")
|
||||||
@ -27,6 +26,7 @@ minetest.register_node("molehills:molehill",{
|
|||||||
description = S("Mole Hill"),
|
description = S("Mole Hill"),
|
||||||
inventory_image = "molehills_side.png",
|
inventory_image = "molehills_side.png",
|
||||||
tiles = { "molehills_dirt.png" },
|
tiles = { "molehills_dirt.png" },
|
||||||
|
use_texture_alpha = "clip",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
selection_box = mh_cbox,
|
selection_box = mh_cbox,
|
||||||
collision_box = mh_cbox,
|
collision_box = mh_cbox,
|
||||||
@ -62,19 +62,14 @@ abstract_molehills.place_molehill = function(pos)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
pl.register_on_generate({
|
||||||
surface = {"default:dirt_with_grass"},
|
surface = {"default:dirt_with_grass"},
|
||||||
max_count = Molehills_Max_Count,
|
noise_params = pl.generate_noise_params({rarity = molehills_rarity, rarity_fertility = molehills_rarity_fertility}),
|
||||||
rarity = Molehills_Rarity,
|
|
||||||
min_elevation = 1,
|
min_elevation = 1,
|
||||||
max_elevation = 40,
|
max_elevation = 40,
|
||||||
avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"--[[,"air"]]},
|
avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"},
|
||||||
avoid_radius = 4,
|
avoid_radius = 4,
|
||||||
plantlife_limit = -0.3,
|
|
||||||
},
|
},
|
||||||
|
"molehills:molehills",
|
||||||
abstract_molehills.place_molehill
|
abstract_molehills.place_molehill
|
||||||
)
|
)
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------
|
|
||||||
print("[Mod] "..title.." ["..version.."] ["..mname.."]".."Loaded...")
|
|
||||||
-----------------------------------------------------------------------------------------------
|
|
||||||
|
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
|
@ -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 = 95 -- larger values make molehills more rare (100 means chance of 0 %)
|
|
||||||
|
|
8
molehills/settingtypes.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#Molehills rarity %
|
||||||
|
molehills_rarity (Molehills rarity %) float 99.5 0 100
|
||||||
|
|
||||||
|
#How much the rarity is reduced by fertility %
|
||||||
|
molehills_rarity_fertility (Molehills rarity fertility reduction %) float 1 0 100
|
||||||
|
|
||||||
|
#Molehills minimum fertility (-1 to +1)
|
||||||
|
molehills_fertility (Molehills minimum fertility) float -0.6 -1 1
|
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!
|
10
nature_classic/locale/nature_classic.txt
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.
|
||||||
|
# Jolesh, 2022.
|
||||||
|
#
|
||||||
|
|
||||||
|
Apple blossoms=Poma Floroj
|
||||||
|
[Nature Classic] loaded!=[Nature Classic] ŝarĝita!
|
169
pl_seaweed/init.lua
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
-- support for i18n
|
||||||
|
local S = minetest.get_translator("pl_seaweed")
|
||||||
|
|
||||||
|
pl_seaweed = {}
|
||||||
|
|
||||||
|
local seaweed_max_count = tonumber(minetest.settings:get("pl_seaweed_max_count")) or 320
|
||||||
|
local seaweed_rarity = tonumber(minetest.settings:get("pl_seaweed_rarity")) or 33
|
||||||
|
|
||||||
|
|
||||||
|
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"
|
||||||
|
},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
|
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 pl.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 pl.get_nodedef_field(top_node.name, "buildable_to") then
|
||||||
|
place_pos = top_pos
|
||||||
|
else
|
||||||
|
return
|
||||||
|
end
|
||||||
|
elseif pl.get_nodedef_field(above_node.name, "buildable_to") then
|
||||||
|
place_pos = pt.above
|
||||||
|
end
|
||||||
|
if not place_pos then return end -- something went wrong :P
|
||||||
|
|
||||||
|
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 pl.expect_infinite_stacks then
|
||||||
|
itemstack:take_item()
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
pl_seaweed.grow_seaweed = function(pos)
|
||||||
|
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||||
|
local seaweed = math.random(1,4)
|
||||||
|
local node_name = "flowers:seaweed"
|
||||||
|
if seaweed > 1 then
|
||||||
|
node_name = node_name .. "_" .. seaweed
|
||||||
|
end
|
||||||
|
minetest.swap_node(right_here, {name=node_name, param2=math.random(1,3)})
|
||||||
|
end
|
||||||
|
|
||||||
|
biome_lib.register_on_generate({
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
pl_seaweed.grow_seaweed
|
||||||
|
)
|
||||||
|
|
||||||
|
-- pl_seaweed at beaches
|
||||||
|
-- MM: not satisfied with it, but IMHO some beaches should have some algae
|
||||||
|
biome_lib.register_on_generate({
|
||||||
|
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
|
||||||
|
},
|
||||||
|
pl_seaweed.grow_seaweed
|
||||||
|
)
|
||||||
|
biome_lib.register_on_generate({
|
||||||
|
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
|
||||||
|
},
|
||||||
|
pl_seaweed.grow_seaweed
|
||||||
|
)
|
||||||
|
|
||||||
|
minetest.register_alias( "flowers:flower_seaweed" , "flowers:seaweed" )
|
||||||
|
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" )
|
11
pl_seaweed/locale/pl_seaweed.de.tr
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# textdomain: pl_seaweed
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Seaweed=Seetang
|
10
pl_seaweed/locale/pl_seaweed.fr.tr
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# textdomain: pl_seaweed
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Seaweed=Algues
|
10
pl_seaweed/locale/pl_seaweed.tr.tr
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# textdomain: pl_seaweed
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Seaweed=Deniz yosunu
|
11
pl_seaweed/locale/pl_seawood.eo.tr
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# textdomain: pl_seaweed
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Seaweed=Algo
|
10
pl_seaweed/locale/pl_seawood.es.tr
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# textdomain: pl_seaweed
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Seaweed=Algas marinas
|
11
pl_seaweed/locale/template.txt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# textdomain: pl_seaweed
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Seaweed=
|
@ -1,3 +1,3 @@
|
|||||||
name = flowers_plus
|
name = pl_seaweed
|
||||||
depends = biome_lib
|
depends = biome_lib
|
||||||
optional_depends = farming, flowers
|
optional_depends = farming, flowers
|
5
pl_seaweed/settingtypes.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#Seaweed maximum count
|
||||||
|
pl_seaweed_max_count (Seaweed maximum count) int 320 1 1000
|
||||||
|
|
||||||
|
#Seaweed rarity
|
||||||
|
pl_seaweed_rarity (Seaweed rarity) int 33 0 100
|
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 224 B |
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 226 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
56
pl_sunflowers/init.lua
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
-- support for i18n
|
||||||
|
local S = minetest.get_translator("pl_sunflowers")
|
||||||
|
|
||||||
|
local sunflowers_max_count = tonumber(minetest.settings:get("pl_sunflowers_max_count")) or 10
|
||||||
|
local sunflowers_rarity = tonumber(minetest.settings:get("pl_sunflowers_rarity")) or 25
|
||||||
|
|
||||||
|
|
||||||
|
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" },
|
||||||
|
use_texture_alpha = "clip",
|
||||||
|
walkable = false,
|
||||||
|
buildable_to = true,
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = { dig_immediate=3, flora=1, flammable=3, attached_node=1 },
|
||||||
|
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"}},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
biome_lib.register_on_generate({
|
||||||
|
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.1,
|
||||||
|
random_facedir = {0,3},
|
||||||
|
},
|
||||||
|
"flowers:sunflower"
|
||||||
|
)
|
||||||
|
|
||||||
|
minetest.register_alias("sunflower:sunflower", "flowers:sunflower")
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: flowers_plus
|
# textdomain: pl_sunflowers
|
||||||
|
|
||||||
# SOME DESCRIPTIVE TITLE.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
@ -8,6 +8,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Waterlily=Seerose
|
|
||||||
Seaweed=Seetang
|
|
||||||
Sunflower=Sonnenblume
|
Sunflower=Sonnenblume
|
11
pl_sunflowers/locale/pl_sunflowers.eo.tr
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# textdomain: pl_sunflowers
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Sunflower=Sunfloro
|
10
pl_sunflowers/locale/pl_sunflowers.es.tr
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# textdomain: pl_sunflowers
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Sunflower=Girasol
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: flowers_plus
|
# textdomain: pl_sunflowers
|
||||||
|
|
||||||
# SOME DESCRIPTIVE TITLE.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
@ -7,6 +7,4 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
Waterlily=Nénuphar
|
|
||||||
Seaweed=Algues
|
|
||||||
Sunflower=Tournesol
|
Sunflower=Tournesol
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: flowers_plus
|
# textdomain: pl_sunflowers
|
||||||
|
|
||||||
# SOME DESCRIPTIVE TITLE.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
@ -7,6 +7,4 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
Waterlily=Nilüfer
|
|
||||||
Seaweed=Deniz yosunu
|
|
||||||
Sunflower=Ayçiçeği
|
Sunflower=Ayçiçeği
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: flowers_plus
|
# textdomain: pl_sunflowers
|
||||||
|
|
||||||
# SOME DESCRIPTIVE TITLE.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
@ -8,6 +8,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Waterlily=
|
|
||||||
Seaweed=
|
|
||||||
Sunflower=
|
Sunflower=
|
3
pl_sunflowers/mod.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
name = pl_sunflowers
|
||||||
|
depends = biome_lib
|
||||||
|
optional_depends = farming, flowers
|
5
pl_sunflowers/settingtypes.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#Sunflowers maximum count
|
||||||
|
pl_sunflowers_max_count (Sunflowers maximum count) int 10 1 1000
|
||||||
|
|
||||||
|
#Sunflowers rarity
|
||||||
|
pl_sunflowers_rarity (Sunflowers rarity) int 25 0 100
|
Before Width: | Height: | Size: 811 B After Width: | Height: | Size: 811 B |
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 378 B |
165
pl_waterlilies/init.lua
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
-- support for i18n
|
||||||
|
local S = minetest.get_translator("pl_waterlilies")
|
||||||
|
|
||||||
|
pl_waterlilies = {}
|
||||||
|
|
||||||
|
local lilies_max_count = tonumber(minetest.settings:get("pl_waterlilies_max_count")) or 320
|
||||||
|
local lilies_rarity = tonumber(minetest.settings:get("pl_waterlilies_rarity")) or 33
|
||||||
|
|
||||||
|
|
||||||
|
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"
|
||||||
|
},
|
||||||
|
use_texture_alpha = "clip",
|
||||||
|
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
|
||||||
|
|
||||||
|
pl_waterlilies.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_on_generate({
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
pl_waterlilies.grow_waterlily
|
||||||
|
)
|
||||||
|
|
||||||
|
minetest.register_alias( "flowers:flower_waterlily", "flowers:waterlily")
|
||||||
|
minetest.register_alias( "flowers:flower_waterlily_225", "flowers:waterlily_225")
|
||||||
|
minetest.register_alias( "flowers:flower_waterlily_45", "flowers:waterlily_45")
|
||||||
|
minetest.register_alias( "flowers:flower_waterlily_675", "flowers:waterlily_675")
|
||||||
|
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" )
|
11
pl_waterlilies/locale/pl_waterlilies.de.tr
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# textdomain: pl_waterlilies
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Waterlily=Seerose
|
11
pl_waterlilies/locale/pl_waterlilies.eo.tr
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# textdomain: pl_waterlillies
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Waterlily=Akvolilio
|
@ -1,4 +1,4 @@
|
|||||||
# textdomain: flowers_plus
|
# textdomain: pl_waterlilies
|
||||||
|
|
||||||
# SOME DESCRIPTIVE TITLE.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
@ -8,5 +8,3 @@
|
|||||||
|
|
||||||
|
|
||||||
Waterlily=Lirio de agua
|
Waterlily=Lirio de agua
|
||||||
Seaweed=Algas marinas
|
|
||||||
Sunflower=Girasol
|
|
10
pl_waterlilies/locale/pl_waterlilies.fr.tr
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# textdomain: pl_waterlilies
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Waterlily=Nénuphar
|
10
pl_waterlilies/locale/pl_waterlilies.tr.tr
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# textdomain: pl_waterlilies
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Waterlily=Nilüfer
|
11
pl_waterlilies/locale/template.txt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# textdomain: pl_waterlillies
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Waterlily=
|