Compare commits
22 Commits
183c043066
...
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 |
@ -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.=
|
@ -6,19 +6,15 @@
|
||||
-- (Leaf texture created by RealBadAngel or VanessaE)
|
||||
-- Branch textures created by Neuromancer.
|
||||
|
||||
local random = math.random
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("bushes")
|
||||
abstract_bushes = {}
|
||||
|
||||
local bushes_bush_rarity = tonumber(minetest.settings:get("bushes_bush_rarity")) or 99.9
|
||||
local bushes_bush_rarity_fertility = tonumber(minetest.settings:get("bushes_bush_rarity_fertility")) or 1.5
|
||||
local bushes_bush_fertility = tonumber(minetest.settings:get("bushes_bush_fertility")) or -1
|
||||
|
||||
local bushes_youngtrees_rarity = tonumber(minetest.settings:get("bushes_youngtrees_rarity")) or 100
|
||||
local bushes_youngtrees_rarity_fertility = tonumber(minetest.settings:get("bushes_youngtrees_rarity_fertility")) or 0.6
|
||||
local bushes_youngtrees_fertility = tonumber(minetest.settings:get("bushes_youngtrees_fertility")) or -0.5
|
||||
|
||||
|
||||
minetest.register_node("bushes:youngtree2_bottom", {
|
||||
@ -53,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 = {
|
||||
@ -95,6 +92,7 @@ for i in pairs(BushBranchSide) do
|
||||
--[[back]] "bushes_branches_center_"..TexNum..".png",-- unless U really want 'em 2 B different
|
||||
--[[front]] "bushes_branches_right_"..TexNum..".png"
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -131,33 +129,46 @@ 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(),
|
||||
})
|
||||
end
|
||||
|
||||
abstract_bushes.grow_bush = function(pos)
|
||||
local leaf_type = random(1,2)
|
||||
for _, pos_dir in ipairs({
|
||||
{ pos = {x=pos.x+1, y=pos.y+random(0,1), z=pos.z},
|
||||
dir = 3},
|
||||
{ pos = {x=pos.x-1, y=pos.y+random(0,1), z=pos.z},
|
||||
dir = 1},
|
||||
{ pos = {x=pos.x, y=pos.y+random(0,1), z=pos.z+1},
|
||||
dir = 2},
|
||||
{ pos = {x=pos.x, y=pos.y+random(0,1), z=pos.z-1},
|
||||
dir = 0}
|
||||
}) do
|
||||
if random(1,10) > 5 then
|
||||
abstract_bushes.grow_bush_node(pos_dir.pos, pos_dir.dir, leaf_type)
|
||||
local leaf_type = math.random(1,2)
|
||||
local bush_side_height = math.random(0,1)
|
||||
local chance_of_bush_node_right = math.random(1,10)
|
||||
if chance_of_bush_node_right> 5 then
|
||||
local right_pos = {x=pos.x+1, y=pos.y+bush_side_height, z=pos.z}
|
||||
abstract_bushes.grow_bush_node(right_pos,3,leaf_type)
|
||||
end
|
||||
end
|
||||
abstract_bushes.grow_bush_node(pos,5,leaf_type)
|
||||
local chance_of_bush_node_left = math.random(1,10)
|
||||
if chance_of_bush_node_left> 5 then
|
||||
bush_side_height = math.random(0,1)
|
||||
local left_pos = {x=pos.x-1, y=pos.y+bush_side_height, z=pos.z}
|
||||
abstract_bushes.grow_bush_node(left_pos,1,leaf_type)
|
||||
end
|
||||
local chance_of_bush_node_front = math.random(1,10)
|
||||
if chance_of_bush_node_front> 5 then
|
||||
bush_side_height = math.random(0,1)
|
||||
local front_pos = {x=pos.x, y=pos.y+bush_side_height, z=pos.z+1}
|
||||
abstract_bushes.grow_bush_node(front_pos,2,leaf_type)
|
||||
end
|
||||
local chance_of_bush_node_back = math.random(1,10)
|
||||
if chance_of_bush_node_back> 5 then
|
||||
bush_side_height = math.random(0,1)
|
||||
local back_pos = {x=pos.x, y=pos.y+bush_side_height, z=pos.z-1}
|
||||
abstract_bushes.grow_bush_node(back_pos,0,leaf_type)
|
||||
end
|
||||
|
||||
abstract_bushes.grow_bush_node(pos,5,leaf_type)
|
||||
end
|
||||
|
||||
|
||||
@ -188,31 +199,33 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
||||
minetest.swap_node(right_here, {name="bushes:bushbranches"..bush_branch_type , param2=dir})
|
||||
--minetest.chat_send_all("leaf_type: (" .. leaf_type .. ")")
|
||||
minetest.swap_node(above_right_here, {name="bushes:BushLeaves"..leaf_type})
|
||||
if random(1,10) > 5 then
|
||||
local chance_of_high_leaves = math.random(1,10)
|
||||
if chance_of_high_leaves> 5 then
|
||||
local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
|
||||
--minetest.chat_send_all("leaf_type: (" .. leaf_type .. ")")
|
||||
minetest.swap_node({x=pos.x, y=pos.y+3, z=pos.z}, {name="bushes:BushLeaves"..leaf_type})
|
||||
minetest.swap_node(two_above_right_here, {name="bushes:BushLeaves"..leaf_type})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
biome_lib.register_on_generate({
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
rarity = bushes_bush_rarity,
|
||||
rarity_fertility = bushes_bush_rarity_fertility,
|
||||
plantlife_limit = bushes_bush_fertility,
|
||||
noise_params = pl.generate_noise_params({rarity = bushes_bush_rarity, rarity_fertility = bushes_bush_rarity_fertility}),
|
||||
min_elevation = 1, -- above sea level
|
||||
},
|
||||
"bushes:bushes",
|
||||
abstract_bushes.grow_bush
|
||||
)
|
||||
|
||||
abstract_bushes.grow_youngtree2 = function(pos)
|
||||
abstract_bushes.grow_youngtree_node2(pos, random(4,5))
|
||||
local height = math.random(4,5)
|
||||
abstract_bushes.grow_youngtree_node2(pos,height)
|
||||
end
|
||||
|
||||
|
||||
@ -238,19 +251,16 @@ abstract_bushes.grow_youngtree_node2 = function(pos, height)
|
||||
end
|
||||
|
||||
|
||||
biome_lib.register_on_generate({
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
rarity = bushes_youngtrees_rarity,
|
||||
rarity_fertility = bushes_youngtrees_rarity_fertility,
|
||||
plantlife_limit = bushes_youngtrees_fertility,
|
||||
noise_params = pl.generate_noise_params({rarity = bushes_youngtrees_rarity, rarity_fertility = bushes_youngtrees_rarity_fertility}),
|
||||
min_elevation = 1, -- above sea level
|
||||
},
|
||||
"bushes:youngtrees",
|
||||
abstract_bushes.grow_youngtree2
|
||||
)
|
||||
|
||||
minetest.log("action", "[bushes] loaded.")
|
||||
|
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
|
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
|
@ -4,8 +4,6 @@ local S = minetest.get_translator("bushes_classic")
|
||||
plantlife_bushes = {}
|
||||
|
||||
-- TODO: add support for nodebreakers? those dig like mese picks
|
||||
local random = math.random
|
||||
|
||||
plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
if not (digger and pos and oldnode) then
|
||||
return
|
||||
@ -65,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 random(1,3) == 1 then
|
||||
if can_harvest and math.random(1,3) == 1 then
|
||||
amount = "2"
|
||||
else
|
||||
amount = "1"
|
||||
@ -77,7 +75,7 @@ plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
elseif groupcaps.choppy then
|
||||
|
||||
-- the amount of sticks may vary
|
||||
local amount = random(4, 20)
|
||||
local amount = math.random(4, 20)
|
||||
-- return some sticks
|
||||
harvested = "default:stick " .. amount
|
||||
|
||||
@ -138,7 +136,7 @@ minetest.register_abm({
|
||||
local dirt = minetest.get_node(dirtpos)
|
||||
local is_soil = minetest.get_item_group(dirt.name, "soil") or minetest.get_item_group(dirt.name, "potting_soil")
|
||||
|
||||
if is_soil and (dirt.name == "farming:soil_wet" or random(1,3) == 1) then
|
||||
if is_soil and (dirt.name == "farming:soil_wet" or math.random(1,3) == 1) then
|
||||
minetest.swap_node( pos, {name = "bushes:" .. bush_name .. "_bush"})
|
||||
end
|
||||
end
|
||||
@ -175,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],
|
||||
@ -187,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,
|
||||
|
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,39 +1,65 @@
|
||||
--Map Generation Stuff
|
||||
|
||||
biome_lib.register_on_generate(
|
||||
{
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:gravel",
|
||||
"default:stone",
|
||||
"default:permafrost_with_stones"
|
||||
},
|
||||
max_count = 50,
|
||||
rarity = 0,
|
||||
plantlife_limit = -1,
|
||||
check_air = true,
|
||||
random_facedir = {0, 3}
|
||||
},
|
||||
{
|
||||
minetest.register_decoration({
|
||||
decoration = {
|
||||
"cavestuff:pebble_1",
|
||||
"cavestuff:pebble_2"
|
||||
}
|
||||
)
|
||||
|
||||
biome_lib.register_on_generate(
|
||||
{
|
||||
surface = {
|
||||
"default:desert_sand",
|
||||
"default:desert_stone"
|
||||
},
|
||||
max_count = 50,
|
||||
rarity = 0,
|
||||
plantlife_limit = -1,
|
||||
check_air = true,
|
||||
random_facedir = {0, 3}
|
||||
},
|
||||
{
|
||||
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
|
||||
})
|
||||
|
||||
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,8 +1,6 @@
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("cavestuff")
|
||||
|
||||
local random = math.random
|
||||
|
||||
--Rocks
|
||||
|
||||
local cbox = {
|
||||
@ -22,7 +20,7 @@ minetest.register_node("cavestuff:pebble_1",{
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:pebble_"..random(1,2))
|
||||
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,
|
||||
@ -55,7 +53,7 @@ minetest.register_node("cavestuff:desert_pebble_1",{
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:desert_pebble_"..random(1,2))
|
||||
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,
|
||||
|
@ -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",
|
||||
|
@ -11,11 +11,8 @@
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("dryplants")
|
||||
|
||||
local random = math.random
|
||||
local sqrt = math.sqrt
|
||||
|
||||
abstract_dryplants.grow_juncus = function(pos)
|
||||
local juncus_type = random(2,3)
|
||||
local juncus_type = math.random(2,3)
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
or minetest.get_node(right_here).name == "default:junglegrass" then
|
||||
@ -30,7 +27,7 @@ end
|
||||
minetest.register_node("dryplants:juncus", {
|
||||
description = S("Juncus"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = sqrt(8),
|
||||
visual_scale = math.sqrt(8),
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_juncus_03.png"},
|
||||
inventory_image = "dryplants_juncus_inv.png",
|
||||
@ -56,7 +53,7 @@ minetest.register_node("dryplants:juncus", {
|
||||
return
|
||||
end
|
||||
local pos = pointed_thing.under
|
||||
local juncus_type = random(2,3)
|
||||
local juncus_type = math.random(2,3)
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
if juncus_type == 2 then
|
||||
minetest.swap_node(right_here, {name="dryplants:juncus_02"})
|
||||
@ -72,7 +69,7 @@ minetest.register_node("dryplants:juncus", {
|
||||
minetest.register_node("dryplants:juncus_02", {
|
||||
description = S("Juncus"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = sqrt(8),
|
||||
visual_scale = math.sqrt(8),
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_juncus_02.png"},
|
||||
walkable = false,
|
||||
@ -95,44 +92,42 @@ minetest.register_node("dryplants:juncus_02", {
|
||||
-- GENERATE SMALL JUNCUS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- near water or swamp
|
||||
biome_lib.register_on_generate({
|
||||
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_on_generate({
|
||||
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
|
@ -8,17 +8,17 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
abstract_dryplants.grow_grass_variation = function(pos)
|
||||
minetest.swap_node(pos, {name="dryplants:grass_short"})
|
||||
local right_here = {x=pos.x, y=pos.y, z=pos.z}
|
||||
minetest.swap_node(right_here, {name="dryplants:grass_short"})
|
||||
end
|
||||
|
||||
biome_lib.register_on_generate({
|
||||
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,24 +7,23 @@
|
||||
-- Looked at code from: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
biome_lib.register_on_generate(
|
||||
{
|
||||
surface = {
|
||||
"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,
|
||||
check_air = true,
|
||||
},
|
||||
{ "default:grass_1",
|
||||
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"
|
||||
},
|
||||
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
|
||||
})
|
@ -20,16 +20,13 @@
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("dryplants")
|
||||
|
||||
local random = math.random
|
||||
local sqrt = math.sqrt
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- REEDMACE SHAPES
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
abstract_dryplants.grow_reedmace = function(pos)
|
||||
local size = random(1,3)
|
||||
local spikes = random(1,3)
|
||||
local size = math.random(1,3)
|
||||
local spikes = math.random(1,3)
|
||||
local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local pos_02 = {x = pos.x, y = pos.y + 2, z = pos.z}
|
||||
local pos_03 = {x = pos.x, y = pos.y + 3, z = pos.z}
|
||||
@ -54,8 +51,8 @@ abstract_dryplants.grow_reedmace = function(pos)
|
||||
end
|
||||
|
||||
abstract_dryplants.grow_reedmace_water = function(pos)
|
||||
local size = random(1,3)
|
||||
local spikes = random(1,3)
|
||||
local size = math.random(1,3)
|
||||
local spikes = math.random(1,3)
|
||||
local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local pos_02 = {x = pos.x, y = pos.y + 2, z = pos.z}
|
||||
local pos_03 = {x = pos.x, y = pos.y + 3, z = pos.z}
|
||||
@ -130,7 +127,7 @@ minetest.register_node("dryplants:reedmace_top", {
|
||||
minetest.register_node("dryplants:reedmace_height_2", {
|
||||
description = S("Reedmace, height: 2"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = sqrt(8),
|
||||
visual_scale = math.sqrt(8),
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_reedmace_height_2.png"},
|
||||
inventory_image = "dryplants_reedmace_top.png",
|
||||
@ -153,7 +150,7 @@ minetest.register_node("dryplants:reedmace_height_2", {
|
||||
minetest.register_node("dryplants:reedmace_height_3", {
|
||||
description = S("Reedmace, height: 3"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = sqrt(8),
|
||||
visual_scale = math.sqrt(8),
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_reedmace_height_3.png"},
|
||||
inventory_image = "dryplants_reedmace_top.png",
|
||||
@ -176,7 +173,7 @@ minetest.register_node("dryplants:reedmace_height_3", {
|
||||
minetest.register_node("dryplants:reedmace_height_3_spikes", {
|
||||
description = S("Reedmace, height: 3 & Spikes"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = sqrt(8),
|
||||
visual_scale = math.sqrt(8),
|
||||
paramtype = "light",
|
||||
tiles = {"dryplants_reedmace_height_3_spikes.png"},
|
||||
inventory_image = "dryplants_reedmace_top.png",
|
||||
@ -352,66 +349,63 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
||||
-- GENERATE REEDMACE
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- near water or swamp
|
||||
biome_lib.register_on_generate({
|
||||
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_on_generate({
|
||||
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_on_generate({
|
||||
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
|
||||
)
|
||||
|
@ -48,5 +48,5 @@ HAY_DRYING_TIME = 3600 -- seconds
|
||||
REED_WILL_DRY = false -- wet reed nodes will become dry reed nodes
|
||||
REED_DRYING_TIME = 3600 -- seconds
|
||||
|
||||
AUTO_ROOF_CORNER = false
|
||||
AUTO_ROOF_CORNER = true
|
||||
|
||||
|
@ -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
|
||||
@ -181,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",
|
||||
@ -213,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 }
|
||||
@ -250,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},
|
||||
@ -260,16 +282,13 @@ minetest.register_node("ferns:fern_trunk_big", {
|
||||
},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_dig_node = function(pos, node, metadata, digger)
|
||||
if digger == nil then return end
|
||||
local np = {x=pos.x,y=pos.y+1,z=pos.z}
|
||||
local nn = minetest.get_node(np)
|
||||
if nn.name == "ferns:fern_trunk_big" or
|
||||
nn.name == "ferns:fern_trunk_big_top"
|
||||
then
|
||||
minetest.node_dig(np, nn, digger)
|
||||
end
|
||||
end,
|
||||
after_destruct = function(pos,oldnode)
|
||||
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
if node.name == "ferns:fern_trunk_big" or node.name == "ferns:fern_trunk_big_top" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
minetest.add_item(pos,"ferns:fern_trunk_big")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
@ -296,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
|
||||
})
|
||||
|
||||
|
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,7 +11,24 @@ local S = minetest.get_translator("ferns")
|
||||
|
||||
assert(abstract_ferns.config.enable_treefern == true)
|
||||
|
||||
local random = math.random
|
||||
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)
|
||||
|
||||
@ -22,12 +39,12 @@ abstract_ferns.grow_tree_fern = function(pos)
|
||||
return
|
||||
end
|
||||
|
||||
local size = random(1, 4) + random(1, 4)
|
||||
local size = math.random(1, 4) + math.random(1, 4)
|
||||
if (size > 5) then
|
||||
size = 10 - size
|
||||
end
|
||||
size = size + 1
|
||||
local crown = ({ "ferns:tree_fern_leaves", "ferns:tree_fern_leaves_02" })[random(1, 2)]
|
||||
local crown = ({ "ferns:tree_fern_leaves", "ferns:tree_fern_leaves_02" })[math.random(1, 2)]
|
||||
|
||||
local i = 1
|
||||
local brk = false
|
||||
@ -130,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},
|
||||
@ -140,9 +158,13 @@ minetest.register_node("ferns:fern_trunk", {
|
||||
},
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_dig_node = function(pos, node, metadata, digger)
|
||||
default.dig_up(pos, node, digger)
|
||||
end,
|
||||
after_destruct = function(pos,oldnode)
|
||||
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
if node.name == "ferns:fern_trunk" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
minetest.add_item(pos,"ferns:fern_trunk")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
@ -169,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
|
||||
})
|
||||
|
||||
|
@ -26,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,
|
||||
@ -61,15 +62,14 @@ abstract_molehills.place_molehill = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib.register_on_generate({
|
||||
pl.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
rarity = molehills_rarity,
|
||||
rarity_fertility = molehills_rarity_fertility,
|
||||
plantlife_limit = molehills_fertility,
|
||||
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"--[[,"air"]]},
|
||||
avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"},
|
||||
avoid_radius = 4,
|
||||
},
|
||||
"molehills:molehills",
|
||||
abstract_molehills.place_molehill
|
||||
)
|
||||
|
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
|
@ -2,8 +2,6 @@
|
||||
local S = minetest.get_translator("nature_classic")
|
||||
-- Blossoms and such
|
||||
|
||||
local random = math.random
|
||||
|
||||
local function spawn_apple_under(pos)
|
||||
local below = {
|
||||
x = pos.x,
|
||||
@ -48,7 +46,7 @@ minetest.register_abm({
|
||||
chance = nature.leaves_blossom_chance,
|
||||
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
if random(nature.leaves_blossom_chance) == 1 then
|
||||
if math.random(nature.leaves_blossom_chance) == 1 then
|
||||
nature.enqueue_node(pos, node, nature.blossom_node)
|
||||
end
|
||||
end
|
||||
@ -63,7 +61,7 @@ minetest.register_abm({
|
||||
chance = nature.blossom_leaves_chance,
|
||||
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
if random(nature.blossom_leaves_chance) == 1 then
|
||||
if math.random(nature.blossom_leaves_chance) == 1 then
|
||||
nature.enqueue_node(pos, node, nature.blossom_leaves)
|
||||
end
|
||||
end
|
||||
@ -78,7 +76,7 @@ minetest.register_abm({
|
||||
chance = nature.apple_chance,
|
||||
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
if random(4) == 1 and nature.dtime < 0.2 and not minetest.find_node_near(pos, nature.apple_spread, { "default:apple" }) then
|
||||
if math.random(4) == 1 and nature.dtime < 0.2 and not minetest.find_node_near(pos, nature.apple_spread, { "default:apple" }) then
|
||||
spawn_apple_under(pos)
|
||||
end
|
||||
end
|
||||
|
@ -47,4 +47,4 @@ dofile(minetest.get_modpath(current_mod_name) .. "/config.lua")
|
||||
dofile(minetest.get_modpath(current_mod_name) .. "/global_function.lua")
|
||||
dofile(minetest.get_modpath(current_mod_name) .. "/blossom.lua")
|
||||
|
||||
minetest.log("action", S("[Nature Classic] loaded!"))
|
||||
minetest.log("info", S("[Nature Classic] loaded!"))
|
||||
|
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!
|
@ -25,6 +25,7 @@ for i in ipairs(algae_list) do
|
||||
"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,
|
||||
@ -55,16 +56,16 @@ for i in ipairs(algae_list) do
|
||||
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 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 biome_lib.get_nodedef_field(top_node.name, "buildable_to") then
|
||||
and pl.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
|
||||
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
|
||||
@ -91,7 +92,7 @@ for i in ipairs(algae_list) do
|
||||
minetest.swap_node(place_pos, {name = "flowers:seaweed", param2 = fdir})
|
||||
end
|
||||
|
||||
if not biome_lib.expect_infinite_stacks then
|
||||
if not pl.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
|
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
|
@ -23,6 +23,7 @@ minetest.register_node(":flowers:sunflower", {
|
||||
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,
|
||||
|
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
|
@ -36,6 +36,7 @@ for i in ipairs(lilies_list) do
|
||||
"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,
|
||||
|
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
|
167
plantlife_lib/init.lua
Normal file
@ -0,0 +1,167 @@
|
||||
pl = {}
|
||||
local deco = {}
|
||||
|
||||
dofile(minetest.get_modpath("plantlife_lib") .. DIR_DELIM .. "util.lua")
|
||||
|
||||
function pl.get_def_from_id(id)
|
||||
for i, _ in ipairs(deco) do
|
||||
if deco[i][1].id and deco[i][1].id == id then
|
||||
return deco[i]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function pl.register_on_generate(def, plantname, func)
|
||||
local deco_def = {
|
||||
name = plantname,
|
||||
deco_type = "simple",
|
||||
place_on = def.place_on or def.surface,
|
||||
sidelen = 16,
|
||||
fill_ratio = def.fill_ratio or 0.02,
|
||||
noise_params = def.noise_params,
|
||||
y_min = def.min_elevation,
|
||||
y_max = def.max_elevation,
|
||||
flags = def.flags,
|
||||
decoration = "air", -- spawn the decoration later
|
||||
}
|
||||
-- handle avoid_nodes (no engine support :\)
|
||||
if def.avoid_nodes then
|
||||
deco_def.avoid_nodes = def.avoid_nodes
|
||||
if def.avoid_radius then
|
||||
deco_def.avoid_radius = def.avoid_radius
|
||||
end
|
||||
end
|
||||
-- handle near_nodes (we can't use the engine function for that)
|
||||
if def.near_nodes then
|
||||
deco_def.near_nodes = def.near_nodes
|
||||
if def.near_nodes_size then
|
||||
deco_def.near_nodes_size = def.near_nodes_size
|
||||
if def.near_nodes_vertical then
|
||||
deco_def.near_nodes_vertical = def.near_nodes_vertical
|
||||
end
|
||||
end
|
||||
deco_def.near_nodes_count = def.near_nodes_count or 1
|
||||
end
|
||||
-- handle ncount/neighbors
|
||||
if def.ncount and def.neighbors then
|
||||
deco_def.ncount = def.ncount
|
||||
deco_def.neighbors = def.neighbors
|
||||
end
|
||||
-- save def
|
||||
local next = #deco + 1
|
||||
deco[next] = {}
|
||||
deco[next][1] = deco_def
|
||||
deco[next][2] = func or nil
|
||||
minetest.register_decoration(deco_def)
|
||||
-- print(dump(deco))
|
||||
end
|
||||
|
||||
local ids = {}
|
||||
minetest.register_on_mods_loaded(function()
|
||||
-- print(dump(deco))
|
||||
for k, v in ipairs(deco) do
|
||||
local id = minetest.get_decoration_id(deco[k][1].name)
|
||||
deco[k][1].id = id
|
||||
table.insert(ids, id)
|
||||
end
|
||||
print(dump2(ids))
|
||||
minetest.set_gen_notify("decoration", ids)
|
||||
-- print(dump(deco))
|
||||
end)
|
||||
|
||||
local function place_handler(t)
|
||||
local def = pl.get_def_from_id(t.id)
|
||||
|
||||
-- ncount/neighbors handler
|
||||
if def.ncount and
|
||||
#minetest.find_nodes_in_area(
|
||||
{x = t.pos.x-1, y = t.pos.y, z = t.pos.z-1},
|
||||
{x = t.pos.x+1, y = t.pos.y, z = t.pos.z+1},
|
||||
def.neighbors
|
||||
) <= def.ncount then
|
||||
print("return due ncount")
|
||||
return -- Not enough similar biome nodes around
|
||||
end
|
||||
|
||||
-- near nodes handler
|
||||
if def.near_nodes and
|
||||
#minetest.find_nodes_in_area(
|
||||
{x = t.pos.x-def.near_nodes_size, y = t.pos.y-def.near_nodes_vertical, z = t.pos.z-def.near_nodes_size},
|
||||
{x = t.pos.x+def.near_nodes_size, y = t.pos.y+def.near_nodes_vertical, z = t.pos.z+def.near_nodes_size},
|
||||
def.near_nodes
|
||||
) < def.near_nodes_count then
|
||||
return -- Long distance neighbors do not match
|
||||
end
|
||||
|
||||
-- avoid nodes handler
|
||||
if def.avoid_nodes and def.avoid_radius then
|
||||
local p_top = {x = t.pos.x, y = t.pos.y + 1, z = t.pos.z}
|
||||
if minetest.find_node_near(p_top, def.avoid_radius + math.random(-1.5,2), def.avoid_nodes) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- run spawn function
|
||||
local spawn_func = def[2]
|
||||
spawn_func(t.pos)
|
||||
|
||||
-- some fun
|
||||
local player = minetest.get_player_by_name("Niklp")
|
||||
-- player:set_pos(t.pos)
|
||||
t.pos.y = t.pos.y + 3
|
||||
minetest.add_particle({
|
||||
pos = t.pos,
|
||||
expirationtime = 15,
|
||||
playername = player:get_player_name(),
|
||||
glow = minetest.LIGHT_MAX,
|
||||
texture = "default_mese_crystal.png",
|
||||
size = 15,
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
local t0 = minetest.get_us_time()
|
||||
local g = minetest.get_mapgen_object("gennotify")
|
||||
local locations = {}
|
||||
for _, id in ipairs(ids) do
|
||||
local deco_locations = g["decoration#" .. id] or {}
|
||||
-- print("dl: " .. dump2(deco_locations))
|
||||
for k, pos in pairs(deco_locations) do
|
||||
-- print(id)
|
||||
local next = #locations + 1
|
||||
locations[next] = {}
|
||||
locations[next].pos = pos
|
||||
locations[next].id = id
|
||||
-- dbg() ^ - This must be ID!
|
||||
end
|
||||
end
|
||||
if #locations == 0 then return end
|
||||
-- print("locations: " .. dump2(locations))
|
||||
for _, t in ipairs(locations) do
|
||||
place_handler(t)
|
||||
end
|
||||
local t1 = minetest.get_us_time()
|
||||
print((t1 - t0) / 1000 .. " ms")
|
||||
end)
|
||||
|
||||
--[[ Example plant
|
||||
{
|
||||
{
|
||||
y_min = 1,
|
||||
decoration = "air",
|
||||
deco_type = "simple",
|
||||
id = 45,
|
||||
name = "bushes:bushes_1",
|
||||
place_on = {
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.001
|
||||
},
|
||||
^ - decoration def; object ID
|
||||
<function>
|
||||
}, ^ - spawn function
|
||||
]]--
|
2
plantlife_lib/mod.conf
Normal file
@ -0,0 +1,2 @@
|
||||
name = plantlife_lib
|
||||
optional_depends = dbg
|
42
plantlife_lib/util.lua
Normal file
@ -0,0 +1,42 @@
|
||||
-- Biome lib util functions
|
||||
|
||||
function pl.get_nodedef_field(nodename, fieldname)
|
||||
if not minetest.registered_nodes[nodename] then
|
||||
return nil
|
||||
end
|
||||
return minetest.registered_nodes[nodename][fieldname]
|
||||
end
|
||||
|
||||
if minetest.get_modpath("unified_inventory") or not minetest.settings:get_bool("creative_mode") then
|
||||
pl.expect_infinite_stacks = false
|
||||
else
|
||||
pl.expect_infinite_stacks = true
|
||||
end
|
||||
|
||||
-- Noise param helper
|
||||
local function set_defaults(biome)
|
||||
biome.seed_diff = biome.seed_diff or 0
|
||||
biome.rarity = biome.rarity or 50
|
||||
biome.rarity_fertility = biome.rarity_fertility or 0
|
||||
biome.max_count = biome.max_count or 125
|
||||
|
||||
return biome
|
||||
end
|
||||
|
||||
function pl.generate_noise_params(b)
|
||||
local biome = set_defaults(b)
|
||||
local r = (100-biome.rarity)/100
|
||||
local mc = math.min(biome.max_count, 6400)/6400
|
||||
|
||||
local noise_params = {
|
||||
octaves = biome_lib.fertile_perlin_octaves,
|
||||
persist = biome_lib.fertile_perlin_persistence * (100/biome_lib.fertile_perlin_scale),
|
||||
scale = math.min(r, mc),
|
||||
seed = biome.seed_diff,
|
||||
offset = 0,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
lacunarity = 2,
|
||||
flags = "absvalue"
|
||||
}
|
||||
return noise_params
|
||||
end
|
12
poisonivy/locale/poisonivy.eo.tr
Normal file
@ -0,0 +1,12 @@
|
||||
# textdomain: poisonivy
|
||||
|
||||
# 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.
|
||||
#
|
||||
|
||||
Poison ivy (seedling)=Venena hedero (plantido)
|
||||
Poison ivy (sproutling)=Venena hedero (ĝermanta)
|
||||
Poison ivy (climbing plant)=Venena hedero (grimpplanto)
|
||||
[Poison Ivy] Loaded.=[Poison Ivy] ŝarĝita.
|
@ -35,11 +35,11 @@ minetest.register_craft({
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "trunks:twig_1 4",
|
||||
recipe = {{"bushes:bushbranches2"}}
|
||||
recipe = {{"bushes:bushbranches3"}}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "trunks:twig_1 4",
|
||||
recipe = {{"bushes:bushbranches3"}}
|
||||
recipe = {{"bushes:bushbranches4"}}
|
||||
})
|
||||
end
|
||||
minetest.register_craft({ -- twigs block --> twigs
|
||||
|
@ -31,8 +31,6 @@ abstract_trunks.place_twig = function(pos)
|
||||
end
|
||||
-- big twigs
|
||||
if Big_Twigs == true then
|
||||
local n1, n2
|
||||
local r1, r2
|
||||
-- big twig 1
|
||||
if twig_size == 17 then
|
||||
if not (check_node_buildable_to({x=pos.x+1,y=pos.y,z=pos.z+1})
|
||||
@ -47,89 +45,6 @@ abstract_trunks.place_twig = function(pos)
|
||||
if check_node_buildable_to(east) then
|
||||
minetest.swap_node(east, {name="trunks:twig_8"})
|
||||
end
|
||||
elseif twig_size == 20 then
|
||||
n1 = minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1})
|
||||
n2 = minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1})
|
||||
r1 = n1 and minetest.registered_nodes[n1.name]
|
||||
r2 = n2 and minetest.registered_nodes[n2.name]
|
||||
if not (r1 and r1.buildable_to or r2 and r2.buildable_to) then
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_5", param2=3})
|
||||
end
|
||||
if minetest.registered_nodes[node_n_w.name].buildable_to then
|
||||
minetest.swap_node(north_west, {name="trunks:twig_7", param2=3})
|
||||
end
|
||||
if minetest.registered_nodes[node_north.name].buildable_to then
|
||||
minetest.swap_node(north, {name="trunks:twig_8", param2=3})
|
||||
end
|
||||
end
|
||||
-- big twig 2
|
||||
elseif twig_size == 21 then
|
||||
n1 = minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1})
|
||||
n2 = minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1})
|
||||
r1 = n1 and minetest.registered_nodes[n1.name]
|
||||
r2 = n2 and minetest.registered_nodes[n2.name]
|
||||
if not (r1 and r1.buildable_to or r2 and r2.buildable_to) then
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_9"})
|
||||
end
|
||||
if minetest.registered_nodes[node_north.name].buildable_to then
|
||||
minetest.swap_node(north, {name="trunks:twig_10"})
|
||||
end
|
||||
if minetest.registered_nodes[node_n_e.name].buildable_to then
|
||||
minetest.swap_node(north_east, {name="trunks:twig_11"})
|
||||
end
|
||||
end
|
||||
elseif twig_size == 22 then
|
||||
n1 = minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z})
|
||||
n2 = minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1})
|
||||
r1 = n1 and minetest.registered_nodes[n1.name]
|
||||
r2 = n2 and minetest.registered_nodes[n2.name]
|
||||
if not (r1 and r1.buildable_to or r2 and r2.buildable_to) then
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_9", param2=1})
|
||||
end
|
||||
if minetest.registered_nodes[node_east.name].buildable_to then
|
||||
minetest.swap_node(east, {name="trunks:twig_10", param2=1})
|
||||
end
|
||||
if minetest.registered_nodes[node_s_e.name].buildable_to then
|
||||
minetest.swap_node(south_east, {name="trunks:twig_11", param2=1})
|
||||
end
|
||||
end
|
||||
elseif twig_size == 23 then
|
||||
n1 = minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1})
|
||||
n2 = minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z-1})
|
||||
r1 = n1 and minetest.registered_nodes[n1.name]
|
||||
r2 = n2 and minetest.registered_nodes[n2.name]
|
||||
if not (r1 and r1.buildable_to or r2 and r2.buildable_to) then
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_9", param2=2})
|
||||
end
|
||||
if minetest.registered_nodes[node_south.name].buildable_to then
|
||||
minetest.swap_node(south, {name="trunks:twig_10", param2=2})
|
||||
end
|
||||
if minetest.registered_nodes[node_s_w.name].buildable_to then
|
||||
minetest.swap_node(south_west, {name="trunks:twig_11", param2=2})
|
||||
end
|
||||
end
|
||||
elseif twig_size == 24 then
|
||||
n1 = minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z})
|
||||
n2 = minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1})
|
||||
r1 = n1 and minetest.registered_nodes[n1.name]
|
||||
r2 = n2 and minetest.registered_nodes[n2.name]
|
||||
if not (r1 and r1.buildable_to or r2 and r2.buildable_to) then
|
||||
if minetest.registered_nodes[node_here.name].buildable_to then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_9", param2=3})
|
||||
end
|
||||
if minetest.registered_nodes[node_west.name].buildable_to then
|
||||
minetest.swap_node(west, {name="trunks:twig_10", param2=3})
|
||||
end
|
||||
if minetest.registered_nodes[node_n_w.name].buildable_to then
|
||||
minetest.swap_node(north_west, {name="trunks:twig_11", param2=3})
|
||||
end
|
||||
end
|
||||
elseif twig_size <= 25 then
|
||||
minetest.swap_node(right_here, {name="trunks:twig_"..math.random(12,13), param2=math.random(0,3)})
|
||||
end
|
||||
elseif twig_size == 18 then
|
||||
if not (check_node_buildable_to({x=pos.x+1,y=pos.y,z=pos.z-1})
|
||||
@ -237,35 +152,33 @@ abstract_trunks.place_twig = function(pos)
|
||||
end
|
||||
|
||||
if Twigs_on_ground == true then
|
||||
biome_lib.register_on_generate({
|
||||
pl.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Twigs_on_ground_Max_Count,
|
||||
rarity = Twigs_on_ground_Rarity,
|
||||
noise_params = pl.generate_noise_params({max_count = Twigs_on_ground_Max_Count, rarity = Twigs_on_ground_Rarity}),
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
near_nodes = {"group:tree","ferns:fern_03","ferns:fern_02","ferns:fern_01"},
|
||||
near_nodes_size = 3,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
"trunks:on_grass",
|
||||
abstract_trunks.place_twig
|
||||
)
|
||||
end
|
||||
|
||||
if Twigs_on_water == true then
|
||||
biome_lib.register_on_generate({
|
||||
pl.register_on_generate({
|
||||
surface = {"default:water_source"},
|
||||
max_count = Twigs_on_water_Max_Count,
|
||||
rarity = Twigs_on_water_Rarity,
|
||||
noise_params = pl.generate_noise_params({max_count = Twigs_on_water_Max_Count, rarity = Twigs_on_water_Rarity}),
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
near_nodes = {"group:tree"},
|
||||
near_nodes_size = 3,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
"trunks:on_water",
|
||||
abstract_trunks.place_twig
|
||||
)
|
||||
end
|
||||
@ -407,10 +320,9 @@ abstract_trunks.place_trunk = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib.register_on_generate({
|
||||
pl.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Trunks_Max_Count, -- 320,
|
||||
rarity = Trunks_Rarity, -- 99,
|
||||
noise_params = pl.generate_noise_params({max_count = Trunks_Max_Count, rarity = Trunks_Rarity}),
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
avoid_nodes = {"group:tree"},
|
||||
@ -419,8 +331,8 @@ biome_lib.register_on_generate({
|
||||
near_nodes_size = 3,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
"trunks:on_grass_2",
|
||||
abstract_trunks.place_trunk
|
||||
)
|
||||
|
||||
@ -441,10 +353,9 @@ abstract_trunks.grow_moss_on_ground = function(pos)
|
||||
|
||||
end
|
||||
|
||||
biome_lib.register_on_generate({
|
||||
pl.register_on_generate({
|
||||
surface = {"default:dirt_with_grass"},
|
||||
max_count = Moss_on_ground_Max_Count,
|
||||
rarity = Moss_on_ground_Rarity,
|
||||
noise_params = pl.generate_noise_params({max_count = Moss_on_ground_Max_Count, rarity = Moss_on_ground_Rarity}),
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
near_nodes = {
|
||||
@ -456,8 +367,8 @@ biome_lib.register_on_generate({
|
||||
near_nodes_size = 2,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
"trunks:on_grass_3",
|
||||
abstract_trunks.grow_moss_on_ground
|
||||
)
|
||||
end
|
||||
@ -522,8 +433,8 @@ abstract_trunks.grow_moss_on_trunk = function(pos)
|
||||
--end
|
||||
end
|
||||
|
||||
biome_lib.register_on_generate({
|
||||
surface = {
|
||||
pl.register_on_generate({
|
||||
surface = {
|
||||
"default:tree",
|
||||
"default:jungletree",
|
||||
"default:pine_tree",
|
||||
@ -543,14 +454,12 @@ biome_lib.register_on_generate({
|
||||
"moretrees:willow_trunk",
|
||||
"default:mossycobble"
|
||||
},
|
||||
max_count = Moss_on_trunk_Max_Count,
|
||||
rarity = Moss_on_trunk_Rarity,
|
||||
noise_params = pl.generate_noise_params({max_count = Moss_on_trunk_Max_Count, rarity = Moss_on_trunk_Rarity}),
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
plantlife_limit = -0.9,
|
||||
check_air = false,
|
||||
},
|
||||
"abstract_trunks.grow_moss_on_trunk"
|
||||
"trunks:moss_on_trunk",
|
||||
abstract_trunks.grow_moss_on_trunk
|
||||
)
|
||||
end
|
||||
|
||||
@ -595,20 +504,18 @@ abstract_trunks.grow_roots = function(pos)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib.register_on_generate({
|
||||
pl.register_on_generate({
|
||||
surface = {"group:tree"},
|
||||
max_count = 1000,
|
||||
rarity = 1,
|
||||
noise_params = pl.generate_noise_params({max_count = 1000, rarity = 1,}),
|
||||
min_elevation = 1,
|
||||
max_elevation = 40,
|
||||
near_nodes = {"default:dirt_with_grass"},
|
||||
near_nodes_size = 1,
|
||||
near_nodes_vertical = 1,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -1,
|
||||
check_air = false,
|
||||
},
|
||||
"abstract_trunks.grow_roots"
|
||||
"trunks:grow_roots",
|
||||
abstract_trunks.grow_roots
|
||||
)
|
||||
|
||||
end
|
||||
|
17
trunks/locale/trunks.de.tr
Normal file
@ -0,0 +1,17 @@
|
||||
# textdomain: trunks
|
||||
|
||||
# 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.
|
||||
#
|
||||
|
||||
Twig=Zweig
|
||||
Moss=Moos
|
||||
Moss with Fungus=Moos mit Pilz
|
||||
Twigs Block=Zweigblock
|
||||
Twigs Slab=Zweigstufe
|
||||
Twigs Roof=Zweigdach
|
||||
Twigs Roof Corner 1=Zweigdachwinkel 1
|
||||
Twigs Roof Corner 2=Zweigdachwinkel 2
|
||||
@1 Root=Wurzel von @1
|
17
trunks/locale/trunks.eo.tr
Normal file
@ -0,0 +1,17 @@
|
||||
# textdomain: trunks
|
||||
|
||||
# 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.
|
||||
#
|
||||
|
||||
Twig=Branĉeto
|
||||
Moss=Musko
|
||||
Moss with Fungus=Musko kun Fungo
|
||||
Twigs Block=Bloko de Branĉetoj
|
||||
Twigs Slab=Slabo
|
||||
Twigs Roof=Tegmento
|
||||
Twigs Roof Corner 1=Tegmentangulo 1 de Branĉetoj
|
||||
Twigs Roof Corner 2=Tegmentangulo 2 de Branĉetoj
|
||||
@1 Root=@1 Radiko
|
@ -1,8 +1,6 @@
|
||||
-- Code by Mossmanikin & Neuromancer
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("trunks")
|
||||
|
||||
local random = math.random
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- TWiGS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
@ -26,6 +24,7 @@ for i in pairs(NoDe) do
|
||||
"trunks_twig_"..NR..".png^[transformFY", -- mirror
|
||||
"trunks_twig_6.png" -- empty
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
@ -67,6 +66,7 @@ end
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- MoSS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-- wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
|
||||
-- wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
|
||||
-- wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
|
||||
@ -89,6 +89,7 @@ for r = 0, 3 do
|
||||
description = S("Moss"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {"trunks_moss.png"..xform},
|
||||
use_texture_alpha = "clip",
|
||||
inventory_image = "trunks_moss.png",
|
||||
wield_image = "trunks_moss.png",
|
||||
paramtype = "light",
|
||||
@ -111,6 +112,7 @@ for r = 0, 3 do
|
||||
tiles = {"trunks_moss_fungus.png"..xform},
|
||||
inventory_image = "trunks_moss_fungus.png",
|
||||
wield_image = "trunks_moss_fungus.png",
|
||||
use_texture_alpha = "clip",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
@ -377,6 +379,7 @@ for i in pairs(TRuNKS) do
|
||||
--[[back]] MoD.."_"..TRuNK..".png",
|
||||
--[[front]] MoD.."_"..TRuNK..".png"
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
drawtype = "nodebox",
|
||||
selection_box = {type = "fixed", fixed = roots_cube},
|
||||
node_box = {type = "fixed", fixed = roots_sheet},
|
||||
|
@ -64,7 +64,7 @@ Moss_on_trunk_Max_Count = 640 -- absolute maximum number in an area of 80x80x80
|
||||
Moss_on_trunk_Rarity = 24 -- larger values makes moss more rare (100 means chance of 0 %)
|
||||
|
||||
|
||||
Auto_Roof_Corner = false -- behavior is similar (not the same!) to the one of minecraft stairs
|
||||
Auto_Roof_Corner = true -- behavior is similar (not the same!) to the one of minecraft stairs
|
||||
|
||||
|
||||
Roots = true
|
||||
Roots = true
|
@ -1,6 +1,6 @@
|
||||
# Vines Mod by Bas80 (Edited by TenPlus1)
|
||||
|
||||
### License: MIT for code, CC for textures
|
||||
### License: MIT for code, CC0 for textures
|
||||
|
||||
## Features
|
||||
- Rope block for spawning rope that slowly drops into the deep.
|
||||
|
@ -36,8 +36,6 @@ end
|
||||
|
||||
-- FUNCTIONS
|
||||
|
||||
local random = math.random
|
||||
|
||||
local function on_dig(pos, node, player)
|
||||
local vine_name_end = node.name:gsub("_middle", "_end")
|
||||
local drop_item = "vines:vines"
|
||||
@ -45,9 +43,19 @@ local function on_dig(pos, node, player)
|
||||
drop_item = vine_name_end
|
||||
end
|
||||
|
||||
local wielded_item = player and player:get_wielded_item()
|
||||
local wielded_item = minetest.is_player(player) and player:get_wielded_item()
|
||||
if wielded_item then
|
||||
wielded_item:add_wear(1)
|
||||
local node_def = minetest.registered_nodes[node.name]
|
||||
local dig_params = minetest.get_dig_params(
|
||||
node_def.groups,
|
||||
wielded_item:get_tool_capabilities(),
|
||||
wielded_item:get_wear()
|
||||
)
|
||||
if dig_params.wear then
|
||||
wielded_item:add_wear(dig_params.wear)
|
||||
player:set_wielded_item(wielded_item)
|
||||
end
|
||||
|
||||
if wielded_item:get_name() == 'vines:shears' then
|
||||
drop_item = vine_name_end
|
||||
end
|
||||
@ -118,7 +126,7 @@ vines.register_vine = function( name, defs, biome )
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
buildable_to = false,
|
||||
tiles = {vine_image_end},
|
||||
tiles = {vine_image_end .. (drawtype == "plantlike" and "^[transformR180" or "")},
|
||||
drawtype = drawtype,
|
||||
inventory_image = vine_image_end,
|
||||
groups = groups,
|
||||
@ -128,7 +136,7 @@ vines.register_vine = function( name, defs, biome )
|
||||
on_construct = function(pos)
|
||||
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(random(growth_min, growth_max))
|
||||
timer:start(math.random(growth_min, growth_max))
|
||||
end,
|
||||
|
||||
on_timer = function(pos)
|
||||
@ -138,7 +146,7 @@ vines.register_vine = function( name, defs, biome )
|
||||
local bottom_node = minetest.get_node( bottom )
|
||||
if bottom_node.name == "air" then
|
||||
|
||||
if random(defs.average_length) ~= 1 then
|
||||
if math.random(defs.average_length) ~= 1 then
|
||||
|
||||
minetest.swap_node(pos, {
|
||||
name = vine_name_middle, param2 = node.param2})
|
||||
@ -148,7 +156,7 @@ vines.register_vine = function( name, defs, biome )
|
||||
|
||||
local timer = minetest.get_node_timer(bottom_node)
|
||||
|
||||
timer:start(random(growth_min, growth_max))
|
||||
timer:start(math.random(growth_min, growth_max))
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
14
vines/locale/vines.de.tr
Normal file
@ -0,0 +1,14 @@
|
||||
# textdomain: vines
|
||||
|
||||
# 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.
|
||||
#
|
||||
Vines=Ranken
|
||||
Matured=Gereifte
|
||||
Rope=Seil
|
||||
Shears=Schere
|
||||
Roots=Wurzeln
|
||||
Jungle Vines=Dschungelranken
|
||||
Willow Vines=Weidenranken
|
14
vines/locale/vines.eo.tr
Normal file
@ -0,0 +1,14 @@
|
||||
# textdomain: vines
|
||||
|
||||
# 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.
|
||||
#
|
||||
Vines=Vitoj
|
||||
Matured=Maturita
|
||||
Rope=Ŝnuro
|
||||
Shears=Tondiloj
|
||||
Roots=Radikoj
|
||||
Jungle Vines=Ĝangalaj Vitoj
|
||||
Willow Vines=Salikaj Vitoj
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 277 B |
Before Width: | Height: | Size: 481 B After Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 334 B |
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 210 B |
Before Width: | Height: | Size: 118 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 194 B After Width: | Height: | Size: 430 B |
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 516 B |
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 528 B |
Before Width: | Height: | Size: 364 B After Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 413 B |
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 252 B |
Before Width: | Height: | Size: 196 B After Width: | Height: | Size: 284 B |
12
woodsoils/locale/woodsoils.de.tr
Normal file
@ -0,0 +1,12 @@
|
||||
# textdomain: woodsoils
|
||||
|
||||
# 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.
|
||||
#
|
||||
|
||||
Forest Soil 1=Waldboden 1
|
||||
Forest Soil 2=Waldboden 2
|
||||
Forest Soil 3=Waldboden 3
|
||||
Forest Soil 4=Waldboden 4
|
12
woodsoils/locale/woodsoils.eo.tr
Normal file
@ -0,0 +1,12 @@
|
||||
# textdomain: woodsoils
|
||||
|
||||
# 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.
|
||||
#
|
||||
|
||||
Forest Soil 1=Arbara Grundo 1
|
||||
Forest Soil 2=Arbara Grundo 2
|
||||
Forest Soil 3=Arbara Grundo 3
|
||||
Forest Soil 4=Arbara Grundo 4
|
@ -1,8 +1,5 @@
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("youngtrees")
|
||||
|
||||
local random = math.random
|
||||
|
||||
abstract_youngtrees = {}
|
||||
|
||||
local youngtrees_youngtrees_rarity = tonumber(minetest.settings:get("youngtrees_youngtrees_rarity")) or 100
|
||||
@ -34,6 +31,7 @@ minetest.register_node("youngtrees:youngtree2_middle",{
|
||||
description = S("Young Tree 2 (middle)"),
|
||||
drawtype="nodebox",
|
||||
tiles = {"youngtree2branch.png"},
|
||||
use_texture_alpha = "clip",
|
||||
inventory_image = "youngtree2branch.png",
|
||||
wield_image = "youngtree2branch.png",
|
||||
paramtype = "light",
|
||||
@ -108,7 +106,8 @@ minetest.register_node("youngtrees:youngtree_bottom", {
|
||||
|
||||
|
||||
abstract_youngtrees.grow_youngtree = function(pos)
|
||||
abstract_youngtrees.grow_youngtree_node(pos, random(1,3))
|
||||
local height = math.random(1,3)
|
||||
abstract_youngtrees.grow_youngtree_node(pos,height)
|
||||
end
|
||||
|
||||
|
||||
@ -149,5 +148,3 @@ biome_lib.register_on_generate({
|
||||
},
|
||||
abstract_youngtrees.grow_youngtree
|
||||
)
|
||||
|
||||
minetest.log("action", "[youngtrees] loaded.")
|
||||
|
13
youngtrees/locale/youngtrees.de.tr
Normal file
@ -0,0 +1,13 @@
|
||||
# textdomain: youngtrees
|
||||
|
||||
# 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.
|
||||
#
|
||||
|
||||
Young Bamboo Tree=Junger Bambus
|
||||
Young Tree 2 (middle)=Strauch 2 (Mitte)
|
||||
Young Tree (top)=Strauch (Spitze)
|
||||
Young Tree (middle)=Strauch (Mitte)
|
||||
Young Tree (bottom)=Strauch (Ansatz)
|
13
youngtrees/locale/youngtrees.eo.tr
Normal file
@ -0,0 +1,13 @@
|
||||
# textdomain: youngtrees
|
||||
|
||||
# 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 Bamboo Tree=Juna Bambuarbo
|
||||
Young Tree 2 (middle)=Juna Arbo 2 (mezo)
|
||||
Young Tree (top)=Juna Arbo (supro)
|
||||
Young Tree (middle)=Juna Arbo (mezo)
|
||||
Young Tree (bottom)=Juna Arbo (malsupro)
|