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 = {}
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("3dmushrooms")
|
||||
|
||||
minetest.override_item("flowers:mushroom_fertile_brown", {
|
||||
drawtype = "mesh",
|
||||
mesh = "3dmushrooms.obj",
|
||||
@ -10,7 +13,8 @@ minetest.override_item("flowers:mushroom_fertile_brown", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
|
||||
},
|
||||
inventory_image = "3dmushrooms_brown_inv.png"
|
||||
inventory_image = "3dmushrooms_brown_inv.png",
|
||||
wield_image = "3dmushrooms_brown_inv.png"
|
||||
})
|
||||
|
||||
minetest.override_item("flowers:mushroom_brown", {
|
||||
@ -21,7 +25,8 @@ minetest.override_item("flowers:mushroom_brown", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
|
||||
},
|
||||
inventory_image = "3dmushrooms_brown_inv.png"
|
||||
inventory_image = "3dmushrooms_brown_inv.png",
|
||||
wield_image = "3dmushrooms_brown_inv.png"
|
||||
})
|
||||
|
||||
minetest.override_item("flowers:mushroom_fertile_red", {
|
||||
@ -32,7 +37,8 @@ minetest.override_item("flowers:mushroom_fertile_red", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
|
||||
},
|
||||
inventory_image = "3dmushrooms_red_inv.png"
|
||||
inventory_image = "3dmushrooms_red_inv.png",
|
||||
wield_image = "3dmushrooms_red_inv.png"
|
||||
})
|
||||
|
||||
minetest.override_item("flowers:mushroom_red", {
|
||||
@ -43,7 +49,8 @@ minetest.override_item("flowers:mushroom_red", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
|
||||
},
|
||||
inventory_image = "3dmushrooms_red_inv.png"
|
||||
inventory_image = "3dmushrooms_red_inv.png",
|
||||
wield_image = "3dmushrooms_red_inv.png"
|
||||
})
|
||||
|
||||
-- aliases to the default mushrooms
|
||||
@ -62,4 +69,4 @@ minetest.register_alias("mushroom:poison", "flowers:mushroom_red")
|
||||
|
||||
minetest.register_alias("mushroom:identifier", "default:mese_crystal_fragment")
|
||||
|
||||
print("[3D Mushrooms] loaded.")
|
||||
minetest.log("info", S("[3D Mushrooms] loaded."))
|
||||
|
8
3dmushrooms/locale/3dmushrooms.de.tr
Normal file
@ -0,0 +1,8 @@
|
||||
# textdomain: 3dmushrooms
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# reusityback, 2022.
|
||||
|
||||
[3D Mushrooms] loaded.=[3D Mushrooms] geladen.
|
8
3dmushrooms/locale/3dmushrooms.eo.tr
Normal file
@ -0,0 +1,8 @@
|
||||
# textdomain: 3dmushrooms
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Jolesh, 2022.
|
||||
|
||||
[3D Mushrooms] loaded.=[3D Mushrooms] ŝargis.
|
8
3dmushrooms/locale/template.txt
Normal file
@ -0,0 +1,8 @@
|
||||
# textdomain: 3dmushrooms
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
|
||||
[3D Mushrooms] loaded.=
|
@ -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 |
142
bushes/init.lua
@ -8,30 +8,37 @@
|
||||
|
||||
-- support for i18n
|
||||
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)"),
|
||||
drawtype="nodebox",
|
||||
tiles = {"bushes_youngtree2trunk.png"},
|
||||
drawtype="nodebox",
|
||||
tiles = {"bushes_youngtree2trunk.png"},
|
||||
inventory_image = "bushes_youngtree2trunk_inv.png",
|
||||
wield_image = "bushes_youngtree2trunk_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--{0.375000,-0.500000,-0.500000,0.500000,0.500000,-0.375000}, --NodeBox 1
|
||||
{-0.0612,-0.500000,-0.500000,0.0612,0.500000,-0.375000}, --NodeBox 1
|
||||
}
|
||||
},
|
||||
groups = {snappy=3,flammable=2},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
--{0.375000,-0.500000,-0.500000,0.500000,0.500000,-0.375000}, --NodeBox 1
|
||||
{-0.0612,-0.500000,-0.500000,0.0612,0.500000,-0.375000}, --NodeBox 1
|
||||
}
|
||||
},
|
||||
groups = {snappy=3,flammable=2,attached_node=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'default:stick'
|
||||
})
|
||||
|
||||
local BushBranchCenter = { {1,1}, {3,2} }
|
||||
local BushBranchCenter = { {1,1}, {3,2} }
|
||||
for i in pairs(BushBranchCenter) do
|
||||
local Num = BushBranchCenter[i][1]
|
||||
local TexNum = BushBranchCenter[i][2]
|
||||
@ -42,6 +49,7 @@ for i in pairs(BushBranchCenter) do
|
||||
"bushes_leaves_"..TexNum..".png",
|
||||
"bushes_branches_center_"..TexNum..".png"
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -55,13 +63,14 @@ for i in pairs(BushBranchCenter) do
|
||||
},
|
||||
inventory_image = "bushes_branches_center_"..TexNum..".png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
groups = {
|
||||
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
leaves=1
|
||||
leaves=1,
|
||||
attached_node=1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'default:stick 4'
|
||||
@ -80,16 +89,17 @@ for i in pairs(BushBranchSide) do
|
||||
--[[bottom]]"bushes_branches_center_"..TexNum..".png",
|
||||
--[[right]] "bushes_branches_left_"..TexNum..".png",
|
||||
--[[left]] "bushes_branches_right_"..TexNum..".png", -- MM: We could also mirror the previous here,
|
||||
--[[back]] "bushes_branches_center_"..TexNum..".png",-- unless U really want 'em 2 B different
|
||||
--[[back]] "bushes_branches_center_"..TexNum..".png",-- unless U really want 'em 2 B different
|
||||
--[[front]] "bushes_branches_right_"..TexNum..".png"
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
-- { left , bottom , front, right , top , back }
|
||||
{0.137748,-0.491944, 0.5 ,-0.125000,-0.179444,-0.007790}, --NodeBox 1
|
||||
{0.262748,-0.185995, 0.5 ,-0.237252, 0.126505,-0.260269}, --NodeBox 2
|
||||
{0.500000, 0.125000, 0.5 ,-0.500000, 0.500000,-0.500000}, --NodeBox 3
|
||||
-- { left , bottom , front, right , top , back }
|
||||
{0.137748,-0.491944, 0.5 ,-0.125000,-0.179444,-0.007790}, --NodeBox 1
|
||||
{0.262748,-0.185995, 0.5 ,-0.237252, 0.126505,-0.260269}, --NodeBox 2
|
||||
{0.500000, 0.125000, 0.5 ,-0.500000, 0.500000,-0.500000}, --NodeBox 3
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
@ -98,13 +108,14 @@ for i in pairs(BushBranchSide) do
|
||||
},
|
||||
inventory_image = "bushes_branches_right_"..TexNum..".png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
groups = {
|
||||
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
leaves=1
|
||||
leaves=1,
|
||||
attached_node=1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'default:stick 3'
|
||||
@ -118,11 +129,13 @@ for i in pairs(BushLeafNode) do
|
||||
description = S("Bush Leaves @1", Num),
|
||||
drawtype = "allfaces_optional",
|
||||
tiles = {"bushes_leaves_"..Num..".png"},
|
||||
use_texture_alpha = "clip",
|
||||
paramtype = "light",
|
||||
groups = { -- MM: Should we add leafdecay?
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
attached_node=1
|
||||
attached_node=1,
|
||||
leaves=1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
@ -158,9 +171,8 @@ abstract_bushes.grow_bush = function(pos)
|
||||
abstract_bushes.grow_bush_node(pos,5,leaf_type)
|
||||
end
|
||||
|
||||
|
||||
abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
||||
|
||||
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
||||
|
||||
@ -182,7 +194,7 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
||||
dir = 1
|
||||
end
|
||||
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
or minetest.get_node(right_here).name == "default:junglegrass" then
|
||||
minetest.swap_node(right_here, {name="bushes:bushbranches"..bush_branch_type , param2=dir})
|
||||
--minetest.chat_send_all("leaf_type: (" .. leaf_type .. ")")
|
||||
@ -197,64 +209,58 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
||||
end
|
||||
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({rarity = bushes_bush_rarity, rarity_fertility = bushes_bush_rarity_fertility}),
|
||||
min_elevation = 1, -- above sea level
|
||||
},
|
||||
max_count = 15, --10,15
|
||||
rarity = 101 - 4, --3,4
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_bushes.grow_bush
|
||||
"bushes:bushes",
|
||||
abstract_bushes.grow_bush
|
||||
)
|
||||
|
||||
abstract_bushes.grow_youngtree2 = function(pos)
|
||||
abstract_bushes.grow_youngtree2 = function(pos)
|
||||
local height = math.random(4,5)
|
||||
abstract_bushes.grow_youngtree_node2(pos,height)
|
||||
end
|
||||
|
||||
|
||||
abstract_bushes.grow_youngtree_node2 = function(pos, height)
|
||||
|
||||
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
||||
local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
|
||||
local three_above_right_here = {x=pos.x, y=pos.y+4, z=pos.z}
|
||||
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
or minetest.get_node(right_here).name == "default:junglegrass" then
|
||||
if height == 4 then
|
||||
local two_above_right_here_south = {x=pos.x, y=pos.y+3, z=pos.z-1}
|
||||
local three_above_right_here_south = {x=pos.x, y=pos.y+4, z=pos.z-1}
|
||||
minetest.swap_node(right_here, {name="bushes:youngtree2_bottom"})
|
||||
minetest.swap_node(above_right_here, {name="bushes:youngtree2_bottom"})
|
||||
minetest.swap_node(two_above_right_here, {name="bushes:bushbranches2" , param2=2})
|
||||
minetest.swap_node(two_above_right_here_south, {name="bushes:bushbranches2" , param2=0})
|
||||
minetest.swap_node(three_above_right_here, {name="bushes:BushLeaves1" })
|
||||
minetest.swap_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
|
||||
local two_above_right_here_south = {x=pos.x, y=pos.y+3, z=pos.z-1}
|
||||
local three_above_right_here_south = {x=pos.x, y=pos.y+4, z=pos.z-1}
|
||||
minetest.swap_node(right_here, {name="bushes:youngtree2_bottom"})
|
||||
minetest.swap_node(above_right_here, {name="bushes:youngtree2_bottom"})
|
||||
minetest.swap_node(two_above_right_here, {name="bushes:bushbranches2" , param2=2})
|
||||
minetest.swap_node(two_above_right_here_south, {name="bushes:bushbranches2" , param2=0})
|
||||
minetest.swap_node(three_above_right_here, {name="bushes:BushLeaves1" })
|
||||
minetest.swap_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({rarity = bushes_youngtrees_rarity, rarity_fertility = bushes_youngtrees_rarity_fertility}),
|
||||
min_elevation = 1, -- above sea level
|
||||
},
|
||||
max_count = 55, --10,15
|
||||
rarity = 101 - 4, --3,4
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_bushes.grow_youngtree2
|
||||
"bushes:youngtrees",
|
||||
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
|
||||
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..'/nodes.lua')
|
||||
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = 3600,
|
||||
spawn_plants = bushes_classic.spawn_list,
|
||||
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
|
||||
local amount
|
||||
if math.random(1,3) == 1 then
|
||||
if can_harvest and math.random(1,3) == 1 then
|
||||
amount = "2"
|
||||
else
|
||||
amount = "1"
|
||||
@ -173,6 +173,13 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
|
||||
texture_top = "bushes_bush_top.png"
|
||||
texture_bottom = "bushes_bush_bottom.png"
|
||||
end
|
||||
|
||||
local node_dig_prediction
|
||||
local node_placement_prediction
|
||||
if bush_name ~= "fruitless" then
|
||||
node_dig_prediction = "bushes:fruitless_bush"
|
||||
node_placement_prediction = "bushes:fruitless_bush"
|
||||
end
|
||||
|
||||
minetest.register_node(":bushes:" .. bush_name .. "_bush", {
|
||||
description = bushes_classic.bushes_descriptions[i][6],
|
||||
@ -185,6 +192,8 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
|
||||
groups = groups,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = "",
|
||||
node_dig_prediction = node_dig_prediction,
|
||||
node_placement_prediction = node_placement_prediction,
|
||||
after_dig_node = function( pos, oldnode, oldmetadata, digger )
|
||||
return plantlife_bushes.after_dig_node(pos, oldnode, oldmetadata, digger);
|
||||
end,
|
||||
|
@ -7,6 +7,8 @@ local mname = "cavestuff"
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("cavestuff")
|
||||
|
||||
cavestuff = {}
|
||||
|
||||
dofile(minetest.get_modpath("cavestuff").."/nodes.lua")
|
||||
dofile(minetest.get_modpath("cavestuff").."/mapgen.lua")
|
||||
|
||||
|
11
cavestuff/locale/cavestuff.de.tr
Normal file
@ -0,0 +1,11 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# reusityback, 2022.
|
||||
#
|
||||
|
||||
Pebble=Kieselstein
|
||||
Desert Pebble=Wüstenkiesel
|
||||
Stalactite=Stalaktit
|
11
cavestuff/locale/cavestuff.eo.tr
Normal file
@ -0,0 +1,11 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Jolesh, 2022.
|
||||
#
|
||||
|
||||
Pebble=Ŝtoneto
|
||||
Desert Pebble=Dezerta Ŝtoneto
|
||||
Stalactite=Stalaktito
|
@ -1,52 +1,65 @@
|
||||
--Map Generation Stuff
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
if maxp.y >= 2 and minp.y <= 0 then
|
||||
-- Generate pebbles
|
||||
local perlin1 = minetest.get_perlin(329, 3, 0.6, 100)
|
||||
-- Assume X and Z lengths are equal
|
||||
local divlen = 16
|
||||
local divs = (maxp.x-minp.x)/divlen+1;
|
||||
for divx=0,divs-1 do
|
||||
for divz=0,divs-1 do
|
||||
local x0 = minp.x + math.floor((divx+0)*divlen)
|
||||
local z0 = minp.z + math.floor((divz+0)*divlen)
|
||||
local x1 = minp.x + math.floor((divx+1)*divlen)
|
||||
local z1 = minp.z + math.floor((divz+1)*divlen)
|
||||
-- Determine pebble amount from perlin noise
|
||||
local pebble_amount = math.floor(perlin1:get2d({x=x0, y=z0}) ^ 2 * 2)
|
||||
-- Find random positions for pebbles based on this random
|
||||
local pr = PseudoRandom(seed+1)
|
||||
for i=0,pebble_amount do
|
||||
local x = pr:next(x0, x1)
|
||||
local z = pr:next(z0, z1)
|
||||
-- Find ground level (0...15)
|
||||
local ground_y = nil
|
||||
for y=30,0,-1 do
|
||||
if minetest.get_node({x=x,y=y,z=z}).name ~= "air" then
|
||||
ground_y = y
|
||||
break
|
||||
end
|
||||
end
|
||||
minetest.register_decoration({
|
||||
decoration = {
|
||||
"cavestuff:pebble_1",
|
||||
"cavestuff:pebble_2"
|
||||
},
|
||||
place_on = {
|
||||
"default:dirt_with_grass",
|
||||
"default:gravel",
|
||||
"default:stone",
|
||||
"default:permafrost_with_stones"
|
||||
},
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.0078125,
|
||||
spread = {
|
||||
y = 100,
|
||||
z = 100,
|
||||
x = 100
|
||||
},
|
||||
seed = 0,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
flags = "absvalue",
|
||||
lacunarity = 2
|
||||
},
|
||||
param2 = 0,
|
||||
flags = "all_floors",
|
||||
deco_type = "simple",
|
||||
param2_max = 3,
|
||||
y_min = -16,
|
||||
y_max = 48
|
||||
})
|
||||
|
||||
if ground_y then
|
||||
local p = {x=x,y=ground_y+1,z=z}
|
||||
local nn = minetest.get_node(p).name
|
||||
-- Check if the node can be replaced
|
||||
if minetest.registered_nodes[nn] and
|
||||
minetest.registered_nodes[nn].buildable_to then
|
||||
nn = minetest.get_node({x=x,y=ground_y,z=z}).name
|
||||
-- If desert sand, add dry shrub
|
||||
if nn == "default:dirt_with_grass" then
|
||||
minetest.swap_node(p,{name="cavestuff:pebble_"..pr:next(1,2), param2=math.random(0,3)})
|
||||
elseif nn == "default:desert_sand" then
|
||||
minetest.swap_node(p,{name="cavestuff:desert_pebble_"..pr:next(1,2), param2=math.random(0,3)})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
minetest.register_decoration({
|
||||
decoration = {
|
||||
"cavestuff:desert_pebble_1",
|
||||
"cavestuff:desert_pebble_2"
|
||||
},
|
||||
place_on = {
|
||||
"default:desert_sand",
|
||||
"default:desert_stone"
|
||||
},
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.0078125,
|
||||
spread = {
|
||||
y = 100,
|
||||
z = 100,
|
||||
x = 100
|
||||
},
|
||||
seed = 0,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
flags = "absvalue",
|
||||
lacunarity = 2
|
||||
},
|
||||
param2 = 0,
|
||||
flags = "all_floors",
|
||||
deco_type = "simple",
|
||||
param2_max = 3,
|
||||
y_min = -16,
|
||||
y_max = 48
|
||||
})
|
||||
|
@ -1,2 +1,2 @@
|
||||
name = cavestuff
|
||||
depends = default
|
||||
depends = default,biome_lib
|
||||
|
@ -12,65 +12,65 @@ minetest.register_node("cavestuff:pebble_1",{
|
||||
description = S("Pebble"),
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
groups = {cracky=3, stone=1, attached_node=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:pebble_"..math.random(1,2))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("cavestuff:pebble_1 "..itemstack:get_count()-(1-ret:get_count()))
|
||||
end,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("cavestuff:pebble_2",{
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
drop = "cavestuff:pebble_1",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, not_in_creative_inventory=1},
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("cavestuff:desert_pebble_1",{
|
||||
description = S("Desert Pebble"),
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1},
|
||||
groups = {cracky=3, stone=1, attached_node=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:desert_pebble_"..math.random(1,2))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("cavestuff:desert_pebble_1 "..itemstack:get_count()-(1-ret:get_count()))
|
||||
end,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("cavestuff:desert_pebble_2",{
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
drop = "cavestuff:desert_pebble_1",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, not_in_creative_inventory=1},
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--Staclactites
|
||||
@ -85,19 +85,34 @@ minetest.register_node("cavestuff:stalactite_1",{
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.187500,0.425000,-0.150003,0.162500,0.500000,0.162500},
|
||||
{-0.112500,0.162500,-0.100000,0.087500,0.475000,0.087500},
|
||||
{-0.062500,-0.275000,-0.062500,0.062500,0.500000,0.062500},
|
||||
{-0.037500,-0.837500,0.037500,0.037500,0.500000,-0.025000},
|
||||
{-0.187500,-0.425000,-0.150003,0.162500,-0.500000,0.162500},
|
||||
{-0.112500,-0.162500,-0.100000,0.087500,-0.475000,0.087500},
|
||||
{-0.062500,0.275000,-0.062500,0.062500,-0.500000,0.062500},
|
||||
{-0.037500,0.837500,0.037500,0.037500,-0.500000,-0.025000},
|
||||
}
|
||||
},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pt = pointed_thing
|
||||
if minetest.get_node(pt.under).name=="default:stone"
|
||||
and minetest.get_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}).name=="air"
|
||||
and minetest.get_node({x=pt.under.x, y=pt.under.y-2, z=pt.under.z}).name=="air" then
|
||||
minetest.swap_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}, {name="cavestuff:stalactite_"..math.random(1,3)})
|
||||
local dir = vector.subtract(pointed_thing.above, pointed_thing.under)
|
||||
local base = pointed_thing.under
|
||||
local place = vector.add(base, dir)
|
||||
local above = vector.add(place, dir)
|
||||
|
||||
if not placer then return end
|
||||
local playername = placer:get_player_name()
|
||||
if minetest.is_protected(place, playername)
|
||||
or minetest.is_protected(above, playername) then
|
||||
minetest.record_protection_violation(place, playername)
|
||||
return
|
||||
end
|
||||
|
||||
if minetest.get_node(base).name == "default:stone"
|
||||
and minetest.get_node(place).name == "air"
|
||||
and minetest.get_node(above).name == "air"
|
||||
then
|
||||
minetest.swap_node(place, {
|
||||
name = "cavestuff:stalactite_"..math.random(1,3),
|
||||
param2 = minetest.dir_to_wallmounted(vector.multiply(dir, -1))
|
||||
})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
@ -116,10 +131,10 @@ minetest.register_node("cavestuff:stalactite_2",{
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.187500,0.387500,-0.150003,0.162500,0.500000,0.162500},
|
||||
{-0.112500,0.112500,-0.100000,0.087500,0.475000,0.087500},
|
||||
{-0.062500,-0.675000,-0.062500,0.062500,0.500000,0.062500},
|
||||
{-0.037500,-0.975000,0.037500,0.037500,0.500000,-0.025000},
|
||||
{-0.187500,-0.387500,-0.150003,0.162500,-0.500000,0.162500},
|
||||
{-0.112500,-0.112500,-0.100000,0.087500,-0.475000,0.087500},
|
||||
{-0.062500,0.675000,-0.062500,0.062500,-0.500000,0.062500},
|
||||
{-0.037500,0.975000,0.037500,0.037500,-0.500000,-0.025000},
|
||||
}
|
||||
},
|
||||
})
|
||||
@ -132,14 +147,14 @@ minetest.register_node("cavestuff:stalactite_3",{
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.187500,0.387500,-0.150003,0.162500,0.500000,0.162500},
|
||||
{-0.112500,0.037500,-0.100000,0.087500,0.475000,0.087500},
|
||||
{-0.062500,-0.437500,-0.062500,0.062500,0.500000,0.062500},
|
||||
{-0.037500,-1.237500,0.037500,0.037500,0.500000,-0.025000},
|
||||
}
|
||||
},
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.187500,-0.387500,-0.150003,0.162500,-0.500000,0.162500},
|
||||
{-0.112500,-0.037500,-0.100000,0.087500,-0.475000,0.087500},
|
||||
{-0.062500,0.437500,-0.062500,0.062500,-0.500000,0.062500},
|
||||
{-0.037500,1.237500,0.037500,0.037500,-0.500000,-0.025000},
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
--Stalagmites
|
||||
|
@ -130,6 +130,7 @@ minetest.register_node("dryplants:grass", {
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
tiles = {"dryplants_grass.png"},
|
||||
use_texture_alpha = "clip",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
@ -161,6 +162,7 @@ minetest.register_node("dryplants:hay", {
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
tiles = {"dryplants_hay.png"},
|
||||
use_texture_alpha = "clip",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
|
@ -92,44 +92,42 @@ minetest.register_node("dryplants:juncus_02", {
|
||||
-- GENERATE SMALL JUNCUS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- near water or swamp
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
--"default:sand",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
--"default:sand",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({max_count = JUNCUS_NEAR_WATER_PER_MAPBLOCK, rarity = 101 - JUNCUS_NEAR_WATER_RARITY}),
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
},
|
||||
max_count = JUNCUS_NEAR_WATER_PER_MAPBLOCK,
|
||||
rarity = 101 - JUNCUS_NEAR_WATER_RARITY,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_dryplants.grow_juncus
|
||||
"dryplants:juncus_near_water",
|
||||
abstract_dryplants.grow_juncus
|
||||
)
|
||||
-- at dunes/beach
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
--"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
"default:sand",
|
||||
--"stoneage:grass_with_silex",
|
||||
--"sumpf:peat",
|
||||
--"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
--"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
"default:sand",
|
||||
--"stoneage:grass_with_silex",
|
||||
--"sumpf:peat",
|
||||
--"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({max_count = JUNCUS_AT_BEACH_PER_MAPBLOCK, rarity = 101 - JUNCUS_AT_BEACH_RARITY}),
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:dirt_with_grass"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
},
|
||||
max_count = JUNCUS_AT_BEACH_PER_MAPBLOCK,
|
||||
rarity = 101 - JUNCUS_AT_BEACH_RARITY,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:dirt_with_grass"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_dryplants.grow_juncus
|
||||
"dryplants:junces_at_beach",
|
||||
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"})
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
},
|
||||
max_count = 4800,
|
||||
rarity = 25,
|
||||
"default:dirt_with_grass",
|
||||
},
|
||||
noise_params = pl.generate_noise_params({max_count = 4800, rarity = 25}),
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
"dryplants:grass",
|
||||
abstract_dryplants.grow_grass_variation
|
||||
)
|
||||
|
@ -7,26 +7,23 @@
|
||||
-- Looked at code from: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
abstract_dryplants.grow_grass = function(pos)
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local grass_size = math.random(1,5)
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
or minetest.get_node(right_here).name == "default:junglegrass" then
|
||||
minetest.swap_node(right_here, {name="default:grass_"..grass_size})
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
minetest.register_decoration({
|
||||
decoration = {
|
||||
"default:grass_1",
|
||||
"default:grass_2",
|
||||
"default:grass_3",
|
||||
"default:grass_4",
|
||||
"default:grass_5"
|
||||
},
|
||||
place_on = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
max_count = TALL_GRASS_PER_MAPBLOCK,
|
||||
rarity = 101 - TALL_GRASS_RARITY,
|
||||
min_elevation = 1, -- above sea level
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_dryplants.grow_grass
|
||||
)
|
||||
noise_params = pl.generate_noise_params({max_count = TALL_GRASS_PER_MAPBLOCK, rarity = 101 - TALL_GRASS_RARITY}),
|
||||
flags = "all_floors",
|
||||
deco_type = "simple",
|
||||
y_min = 1,
|
||||
y_max = 48
|
||||
})
|
@ -264,7 +264,8 @@ minetest.register_node("dryplants:reedmace_sapling", {
|
||||
groups = {
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
attached_node=1
|
||||
attached_node=1,
|
||||
sapling=1,
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
@ -327,7 +328,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- SPAWN REEDMACE
|
||||
-----------------------------------------------------------------------------------------------
|
||||
--[[biome_lib:spawn_on_surfaces({
|
||||
--[[biome_lib.register_active_spawner({
|
||||
spawn_delay = 1200,
|
||||
spawn_plants = {"dryplants:reedmace_sapling"},
|
||||
spawn_chance = 400,
|
||||
@ -348,66 +349,63 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
||||
-- GENERATE REEDMACE
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- near water or swamp
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:desert_sand",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:desert_sand",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({max_count = REEDMACE_NEAR_WATER_PER_MAPBLOCK, rarity = 101 - REEDMACE_NEAR_WATER_RARITY}),
|
||||
--rarity = 60,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
},
|
||||
max_count = REEDMACE_NEAR_WATER_PER_MAPBLOCK,
|
||||
rarity = 101 - REEDMACE_NEAR_WATER_RARITY,
|
||||
--rarity = 60,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_dryplants.grow_reedmace
|
||||
"dryplants:reedmace_near_water",
|
||||
abstract_dryplants.grow_reedmace
|
||||
)
|
||||
-- in water
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt",
|
||||
"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
--"stoneage:grass_with_silex",
|
||||
"stoneage:sand_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt",
|
||||
"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
--"stoneage:grass_with_silex",
|
||||
"stoneage:sand_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({max_count = REEDMACE_IN_WATER_PER_MAPBLOCK, rarity = 101 - REEDMACE_IN_WATER_RARITY}),
|
||||
--rarity = 35,
|
||||
min_elevation = 0, -- a bit below sea level
|
||||
max_elevation = 0, -- ""
|
||||
near_nodes = {"default:water_source","sumpf:dirtywater_source"},
|
||||
near_nodes_size = 1,
|
||||
near_nodes_count = 1,
|
||||
},
|
||||
max_count = REEDMACE_IN_WATER_PER_MAPBLOCK,
|
||||
rarity = 101 - REEDMACE_IN_WATER_RARITY,
|
||||
--rarity = 35,
|
||||
min_elevation = 0, -- a bit below sea level
|
||||
max_elevation = 0, -- ""
|
||||
near_nodes = {"default:water_source","sumpf:dirtywater_source"},
|
||||
near_nodes_size = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_dryplants.grow_reedmace_water
|
||||
"dryplants:reedmace_in_water",
|
||||
abstract_dryplants.grow_reedmace_water
|
||||
)
|
||||
-- for oases & tropical beaches & tropical swamps
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {
|
||||
"default:sand",
|
||||
"sumpf:sumpf"
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:sand",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
noise_params = pl.generate_noise_params({max_count = REEDMACE_FOR_OASES_PER_MAPBLOCK, 101 - REEDMACE_FOR_OASES_RARITY}),
|
||||
--rarity = 10,
|
||||
neighbors = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||
ncount = 1,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:desert_sand","sumpf:sumpf"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
},
|
||||
max_count = REEDMACE_FOR_OASES_PER_MAPBLOCK,
|
||||
rarity = 101 - REEDMACE_FOR_OASES_RARITY,
|
||||
--rarity = 10,
|
||||
neighbors = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
|
||||
ncount = 1,
|
||||
min_elevation = 1, -- above sea level
|
||||
near_nodes = {"default:desert_sand","sumpf:sumpf"},
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_dryplants.grow_reedmace
|
||||
"dryplants:reemace_oases",
|
||||
abstract_dryplants.grow_reedmace
|
||||
)
|
||||
|
@ -87,7 +87,7 @@ end
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_tree == true then
|
||||
biome_lib:register_generate_plant({ -- near trees (woodlands)
|
||||
biome_lib.register_on_generate({ -- near trees (woodlands)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
@ -116,7 +116,7 @@ if abstract_ferns.config.lady_ferns_near_tree == true then
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_rock == true then
|
||||
biome_lib:register_generate_plant({ -- near stone (mountains)
|
||||
biome_lib.register_on_generate({ -- near stone (mountains)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
@ -143,7 +143,7 @@ if abstract_ferns.config.lady_ferns_near_rock == true then
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
|
||||
biome_lib:register_generate_plant({ -- near ores (potential mining sites)
|
||||
biome_lib.register_on_generate({ -- near ores (potential mining sites)
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
@ -183,7 +183,7 @@ if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a
|
||||
end
|
||||
|
||||
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:mossycobble",
|
||||
|
@ -13,6 +13,25 @@ assert(abstract_ferns.config.enable_giant_treefern == true)
|
||||
local S = minetest.get_translator("ferns")
|
||||
-- lot of code, lot to load
|
||||
|
||||
function abstract_ferns.can_grow_giant_tree_fern(pos)
|
||||
local node_name = minetest.get_node(pos).name
|
||||
if node_name ~= "air" and node_name ~= "ferns:sapling_giant_tree_fern" and node_name ~= "default:junglegrass" then
|
||||
return false
|
||||
end
|
||||
|
||||
local below_name = minetest.get_node(vector.new(pos.x, pos.y - 1, pos.z)).name
|
||||
if minetest.get_item_group(below_name, "soil") == 0 and minetest.get_item_group(below_name, "sand") == 0 then
|
||||
return false
|
||||
end
|
||||
|
||||
local light = minetest.get_node_light(pos, 0.5)
|
||||
if light <= 8 then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
abstract_ferns.grow_giant_tree_fern = function(pos)
|
||||
local pos_aux = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local name = minetest.get_node(pos_aux).name
|
||||
@ -162,6 +181,14 @@ minetest.register_node("ferns:tree_fern_leave_big", {
|
||||
},
|
||||
drop = "",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_destruct = function(pos,oldnode)
|
||||
for _, d in pairs({{x=-1,z=0},{x=1,z=0},{x=0,z=-1},{x=0,z=1}}) do
|
||||
local node = minetest.get_node({x=pos.x+d.x,y=pos.y+1,z=pos.z+d.z})
|
||||
if node.name == "ferns:tree_fern_leave_big" then
|
||||
minetest.dig_node({x=pos.x+d.x,y=pos.y+1,z=pos.z+d.z})
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
@ -173,6 +200,7 @@ minetest.register_node("ferns:tree_fern_leave_big_end", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = { "ferns_tree_fern_leave_big_end.png" },
|
||||
use_texture_alpha = "clip",
|
||||
walkable = false,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
@ -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.png"
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
-- {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.png"
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
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"},
|
||||
inventory_image = "ferns_sapling_tree_fern_giant.png",
|
||||
walkable = false,
|
||||
groups = {snappy=3,flammable=2,flora=1,attached_node=1},
|
||||
groups = {snappy=3,flammable=2,flora=1,attached_node=1,sapling=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
@ -285,7 +315,9 @@ minetest.register_abm({
|
||||
interval = 1000,
|
||||
chance = 4,
|
||||
action = function(pos, node, _, _)
|
||||
abstract_ferns.grow_giant_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
|
||||
if abstract_ferns.can_grow_giant_tree_fern(pos) then
|
||||
abstract_ferns.grow_giant_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
@ -295,7 +327,7 @@ minetest.register_abm({
|
||||
|
||||
-- in jungles
|
||||
if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||
@ -321,7 +353,7 @@ end
|
||||
|
||||
-- for oases & tropical beaches
|
||||
if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:sand"--,
|
||||
--"default:desert_sand"
|
||||
|
@ -75,7 +75,7 @@ create_nodes()
|
||||
-- Spawning
|
||||
-----------------------------------------------------------------------------------------------
|
||||
if abstract_ferns.config.enable_horsetails_spawning == true then
|
||||
biome_lib:spawn_on_surfaces({
|
||||
biome_lib.register_active_spawner({
|
||||
spawn_delay = 1200,
|
||||
spawn_plants = node_names,
|
||||
spawn_chance = 400,
|
||||
@ -104,7 +104,7 @@ end
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
if abstract_ferns.config.enable_horsetails_on_grass == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
|
||||
@ -137,7 +137,7 @@ if abstract_ferns.config.enable_horsetails_on_grass == true then
|
||||
end
|
||||
|
||||
if abstract_ferns.config.enable_horsetails_on_stones == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:gravel", -- roots go deep
|
||||
"default:mossycobble",
|
||||
|
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)
|
||||
|
||||
function abstract_ferns.can_grow_tree_fern(pos)
|
||||
local node_name = minetest.get_node(pos).name
|
||||
if node_name ~= "air" and node_name ~= "ferns:sapling_tree_fern" and node_name ~= "default:junglegrass" then
|
||||
return false
|
||||
end
|
||||
|
||||
local below_name = minetest.get_node(vector.new(pos.x, pos.y - 1, pos.z)).name
|
||||
if minetest.get_item_group(below_name, "soil") == 0 and minetest.get_item_group(below_name, "sand") == 0 then
|
||||
return false
|
||||
end
|
||||
|
||||
local light = minetest.get_node_light(pos, 0.5)
|
||||
if light <= 8 then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
abstract_ferns.grow_tree_fern = function(pos)
|
||||
|
||||
local pos_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.png"
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
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"},
|
||||
inventory_image = "ferns_sapling_tree_fern.png",
|
||||
walkable = false,
|
||||
groups = {snappy=3,flammable=2,flora=1,attached_node=1},
|
||||
groups = {snappy=3,flammable=2,flora=1,attached_node=1,sapling=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
@ -171,7 +191,9 @@ minetest.register_abm({
|
||||
interval = 1000,
|
||||
chance = 4,
|
||||
action = function(pos, node, _, _)
|
||||
abstract_ferns.grow_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
|
||||
if abstract_ferns.can_grow_tree_fern(pos) then
|
||||
abstract_ferns.grow_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
@ -181,7 +203,7 @@ minetest.register_abm({
|
||||
|
||||
-- in jungles
|
||||
if abstract_ferns.config.enable_treeferns_in_jungle == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||
@ -210,7 +232,7 @@ end
|
||||
|
||||
-- for oases & tropical beaches
|
||||
if abstract_ferns.config.enable_treeferns_in_oases == true then
|
||||
biome_lib:register_generate_plant({
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
"default:sand"--,
|
||||
--"default:desert_sand"
|
||||
|
@ -1,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
|
||||
-- Code & textures by Mossmanikin
|
||||
|
||||
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
|
||||
local S = minetest.get_translator("molehills")
|
||||
@ -27,6 +26,7 @@ minetest.register_node("molehills:molehill",{
|
||||
description = S("Mole Hill"),
|
||||
inventory_image = "molehills_side.png",
|
||||
tiles = { "molehills_dirt.png" },
|
||||
use_texture_alpha = "clip",
|
||||
paramtype = "light",
|
||||
selection_box = mh_cbox,
|
||||
collision_box = mh_cbox,
|
||||
@ -49,11 +49,11 @@ minetest.register_craft({ -- molehills --> dirt
|
||||
-- GeNeRaTiNG
|
||||
-----------------------------------------------------------------------------------------------
|
||||
abstract_molehills.place_molehill = function(pos)
|
||||
local right_here = {x=pos.x , y=pos.y+1, z=pos.z }
|
||||
if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z }).name ~= "air"
|
||||
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z }).name ~= "air"
|
||||
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z+1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z-1}).name ~= "air"
|
||||
local right_here = {x=pos.x , y=pos.y+1, z=pos.z }
|
||||
if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z }).name ~= "air"
|
||||
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z }).name ~= "air"
|
||||
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z+1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z-1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z+1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z-1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z+1}).name ~= "air"
|
||||
@ -62,19 +62,14 @@ abstract_molehills.place_molehill = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib:register_generate_plant({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Molehills_Max_Count,
|
||||
rarity = Molehills_Rarity,
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"--[[,"air"]]},
|
||||
avoid_radius = 4,
|
||||
plantlife_limit = -0.3,
|
||||
},
|
||||
abstract_molehills.place_molehill
|
||||
pl.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
noise_params = pl.generate_noise_params({rarity = molehills_rarity, rarity_fertility = molehills_rarity_fertility}),
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"},
|
||||
avoid_radius = 4,
|
||||
},
|
||||
"molehills:molehills",
|
||||
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
|
||||
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.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
@ -8,6 +8,4 @@
|
||||
|
||||
|
||||
|
||||
Waterlily=Seerose
|
||||
Seaweed=Seetang
|
||||
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.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
@ -7,6 +7,4 @@
|
||||
#
|
||||
|
||||
|
||||
Waterlily=Nénuphar
|
||||
Seaweed=Algues
|
||||
Sunflower=Tournesol
|
@ -1,4 +1,4 @@
|
||||
# textdomain: flowers_plus
|
||||
# textdomain: pl_sunflowers
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
@ -7,6 +7,4 @@
|
||||
#
|
||||
|
||||
|
||||
Waterlily=Nilüfer
|
||||
Seaweed=Deniz yosunu
|
||||
Sunflower=Ayçiçeği
|
@ -1,4 +1,4 @@
|
||||
# textdomain: flowers_plus
|
||||
# textdomain: pl_sunflowers
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
@ -8,6 +8,4 @@
|
||||
|
||||
|
||||
|
||||
Waterlily=
|
||||
Seaweed=
|
||||
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.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
@ -8,5 +8,3 @@
|
||||
|
||||
|
||||
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=
|