1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2025-07-21 09:10:29 +02:00

Version MFF.

This commit is contained in:
sys4-fr
2018-09-08 14:54:14 +02:00
parent 2e0277e558
commit f5ec948679
386 changed files with 244 additions and 240 deletions

2
trunks/crafting.lua Normal file → Executable file
View File

@ -35,7 +35,7 @@ minetest.register_craft({
})
minetest.register_craft({
output = "trunks:twig_1 4",
recipe = {{"bushes:bushbranches2a"}}
recipe = {{"bushes:bushbranches2"}}
})
minetest.register_craft({
output = "trunks:twig_1 4",

0
trunks/depends.txt Normal file → Executable file
View File

54
trunks/generating.lua Normal file → Executable file
View File

@ -15,7 +15,7 @@ end
abstract_trunks.place_twig = function(pos)
local twig_size = math.random(1,27)
local right_here = {x=pos.x , y=pos.y+1, z=pos.z }
local north = {x=pos.x , y=pos.y+1, z=pos.z+1}
local north_east = {x=pos.x+1, y=pos.y+1, z=pos.z+1}
@ -25,7 +25,7 @@ abstract_trunks.place_twig = function(pos)
local south_west = {x=pos.x-1, y=pos.y+1, z=pos.z-1}
local west = {x=pos.x-1, y=pos.y+1, z=pos.z }
local north_west = {x=pos.x-1, y=pos.y+1, z=pos.z+1}
local node_here = minetest.get_node(right_here)
local node_north = minetest.get_node(north)
local node_n_e = minetest.get_node(north_east)
@ -35,17 +35,17 @@ abstract_trunks.place_twig = function(pos)
local node_s_w = minetest.get_node(south_west)
local node_west = minetest.get_node(west)
local node_n_w = minetest.get_node(north_west)
-- small twigs
-- small twigs
if twig_size <= 16 then
minetest.set_node(right_here, {name="trunks:twig_"..math.random(1,4), param2=math.random(0,3)})
end
-- big twigs
if Big_Twigs == true then
-- big twig 1
-- big twig 1
if twig_size == 17 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1}).name].buildable_to
or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name].buildable_to) then
if minetest.registered_nodes[node_here.name].buildable_to then
minetest.set_node(right_here, {name="trunks:twig_5"})
end
@ -59,7 +59,7 @@ abstract_trunks.place_twig = function(pos)
elseif twig_size == 18 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to
or minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name].buildable_to) then
if minetest.registered_nodes[node_here.name].buildable_to then
minetest.set_node(right_here, {name="trunks:twig_5", param2=1})
end
@ -73,7 +73,7 @@ abstract_trunks.place_twig = function(pos)
elseif twig_size == 19 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to
or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name].buildable_to) then
if minetest.registered_nodes[node_here.name].buildable_to then
minetest.set_node(right_here, {name="trunks:twig_5", param2=2})
end
@ -87,7 +87,7 @@ abstract_trunks.place_twig = function(pos)
elseif twig_size == 20 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1}).name].buildable_to
or minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name].buildable_to) then
if minetest.registered_nodes[node_here.name].buildable_to then
minetest.set_node(right_here, {name="trunks:twig_5", param2=3})
end
@ -98,11 +98,11 @@ abstract_trunks.place_twig = function(pos)
minetest.set_node(north, {name="trunks:twig_8", param2=3})
end
end
-- big twig 2
-- big twig 2
elseif twig_size == 21 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name].buildable_to
or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1}).name].buildable_to) then
if minetest.registered_nodes[node_here.name].buildable_to then
minetest.set_node(right_here, {name="trunks:twig_9"})
end
@ -116,7 +116,7 @@ abstract_trunks.place_twig = function(pos)
elseif twig_size == 22 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name].buildable_to
or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to) then
if minetest.registered_nodes[node_here.name].buildable_to then
minetest.set_node(right_here, {name="trunks:twig_9", param2=1})
end
@ -130,7 +130,7 @@ abstract_trunks.place_twig = function(pos)
elseif twig_size == 23 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name].buildable_to
or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z-1}).name].buildable_to) then
if minetest.registered_nodes[node_here.name].buildable_to then
minetest.set_node(right_here, {name="trunks:twig_9", param2=2})
end
@ -144,7 +144,7 @@ abstract_trunks.place_twig = function(pos)
elseif twig_size == 24 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name].buildable_to
or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1}).name].buildable_to) then
if minetest.registered_nodes[node_here.name].buildable_to then
minetest.set_node(right_here, {name="trunks:twig_9", param2=3})
end
@ -227,7 +227,7 @@ for i in pairs(TRuNKS) do
local TRuNK = TRuNKS[i][2]
local NR = TRuNKS[i][3]
local trunkname = MoD..":"..TRuNK
if minetest.get_modpath(MoD) ~= nil
if minetest.get_modpath(MoD) ~= nil
and NR < 6 -- moretrees trunks allready have facedir
and minetest.registered_nodes[trunkname] then -- the node being called exists.
temptrunk = clone_node(trunkname)
@ -236,9 +236,9 @@ for i in pairs(TRuNKS) do
end
end
end
abstract_trunks.place_trunk = function(pos)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
local north = {x=pos.x, y=pos.y+1, z=pos.z+1}
local north2 = {x=pos.x, y=pos.y+1, z=pos.z+2}
@ -248,7 +248,7 @@ abstract_trunks.place_trunk = function(pos)
local west2 = {x=pos.x-2, y=pos.y+1, z=pos.z}
local east = {x=pos.x+1, y=pos.y+1, z=pos.z}
local east2 = {x=pos.x+2, y=pos.y+1, z=pos.z}
local node_here = minetest.get_node(right_here)
local node_north = minetest.get_node(north)
local node_north2 = minetest.get_node(north2)
@ -278,7 +278,7 @@ abstract_trunks.place_trunk = function(pos)
if minetest.registered_nodes[node_north.name].buildable_to then
minetest.set_node(north, {name=MoD..":"..TRuNK, param2=4})
end
if length >= 4 and minetest.registered_nodes[node_north2.name].buildable_to then
minetest.set_node(north2, {name=MoD..":"..TRuNK, param2=4})
end
@ -365,13 +365,13 @@ if Moss_on_ground == true then
abstract_trunks.grow_moss_on_ground = function(pos)
local on_ground = {x=pos.x, y=pos.y+1, z=pos.z}
local moss_type = math.random(1,21)
if moss_type == 1 then
minetest.set_node(on_ground, {name="trunks:moss_fungus", param2=math.random(0,3)})
else
minetest.set_node(on_ground, {name="trunks:moss", param2=math.random(0,3)})
end
end
biome_lib:register_generate_plant({
@ -406,14 +406,14 @@ abstract_trunks.grow_moss_on_trunk = function(pos)
local at_side_s = {x=pos.x, y=pos.y, z=pos.z-1}
local at_side_w = {x=pos.x-1, y=pos.y, z=pos.z}
local undrneath = {x=pos.x, y=pos.y-1, z=pos.z}
local node_here = minetest.get_node(on_ground)
local node_north = minetest.get_node(at_side_n)
local node_east = minetest.get_node(at_side_e)
local node_south = minetest.get_node(at_side_s)
local node_west = minetest.get_node(at_side_w)
local node_under = minetest.get_node(undrneath)
--if minetest.get_item_group(node_under.name, "tree") < 1 then
local moss_type = math.random(1,41)
if minetest.registered_nodes[node_here.name].buildable_to then -- instead of check_air = true,
@ -491,20 +491,20 @@ biome_lib:register_generate_plant({
end
-----------------------------------------------------------------------------------------------
-- RooTS
-- RooTS
-----------------------------------------------------------------------------------------------
if Roots == true then -- see settings.txt
abstract_trunks.grow_roots = function(pos)
local twig_size = math.random(1,27)
local right_here = {x=pos.x , y=pos.y , z=pos.z }
local below = {x=pos.x , y=pos.y-1, z=pos.z }
local north = {x=pos.x , y=pos.y , z=pos.z+1}
local east = {x=pos.x+1, y=pos.y , z=pos.z }
local south = {x=pos.x , y=pos.y , z=pos.z-1}
local west = {x=pos.x-1, y=pos.y , z=pos.z }
local node_here = minetest.get_node(right_here)
local node_below = minetest.get_node(below)
local node_north = minetest.get_node(north)
@ -515,8 +515,8 @@ abstract_trunks.grow_roots = function(pos)
for i in pairs(TRuNKS) do
local MoD = TRuNKS[i][1]
local TRuNK = TRuNKS[i][2]
if minetest.get_modpath(MoD) ~= nil
and node_here.name == MoD..":"..TRuNK
if minetest.get_modpath(MoD) ~= nil
and node_here.name == MoD..":"..TRuNK
and string.find(node_below.name, "dirt")
and node_here.param2 == 0 then
if minetest.registered_nodes[node_north.name].buildable_to then

2
trunks/init.lua Normal file → Executable file
View File

@ -13,5 +13,5 @@ dofile(minetest.get_modpath("trunks").."/nodes.lua")
dofile(minetest.get_modpath("trunks").."/crafting.lua")
-----------------------------------------------------------------------------------------------
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
minetest.log("action", "[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
-----------------------------------------------------------------------------------------------

20
trunks/nodes.lua Normal file → Executable file
View File

@ -17,7 +17,7 @@ for i in pairs(NoDe) do
inventory_image = "trunks_twig_"..NR..".png",
wield_image = "trunks_twig_"..NR..".png",
drawtype = "nodebox",
tiles = {
tiles = {
"trunks_twig_"..NR..".png",
"trunks_twig_"..NR..".png^[transformFY", -- mirror
"trunks_twig_6.png" -- empty
@ -214,7 +214,7 @@ if Auto_Roof_Corner == true then
interval = 1,
chance = 1,
action = function(pos)
local node_east = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z })
local node_west = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z })
local node_north = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1})
@ -227,7 +227,7 @@ if Auto_Roof_Corner == true then
then
minetest.set_node(pos, {name=corner, param2=0})
end
if ((node_north.name == roof and node_north.param2 == 1)
or (node_north.name == corner and node_north.param2 == 2))
and ((node_east.name == roof and node_east.param2 == 0)
@ -235,7 +235,7 @@ if Auto_Roof_Corner == true then
then
minetest.set_node(pos, {name=corner, param2=1})
end
if ((node_east.name == roof and node_east.param2 == 2)
or (node_east.name == corner and node_east.param2 == 3))
and ((node_south.name == roof and node_south.param2 == 1)
@ -243,7 +243,7 @@ if Auto_Roof_Corner == true then
then
minetest.set_node(pos, {name=corner, param2=2})
end
if ((node_south.name == roof and node_south.param2 == 3)
or (node_south.name == corner and node_south.param2 == 0))
and ((node_west.name == roof and node_west.param2 == 2)
@ -259,7 +259,7 @@ if Auto_Roof_Corner == true then
then
minetest.set_node(pos, {name=corner_2, param2=0})
end
if ((node_north.name == roof and node_north.param2 == 3)
or (node_north.name == corner_2 and node_north.param2 == 2))
and ((node_east.name == roof and node_east.param2 == 2)
@ -267,7 +267,7 @@ if Auto_Roof_Corner == true then
then
minetest.set_node(pos, {name=corner_2, param2=1})
end
if ((node_east.name == roof and node_east.param2 == 0)
or (node_east.name == corner_2 and node_east.param2 == 3))
and ((node_south.name == roof and node_south.param2 == 3)
@ -275,7 +275,7 @@ if Auto_Roof_Corner == true then
then
minetest.set_node(pos, {name=corner_2, param2=2})
end
if ((node_south.name == roof and node_south.param2 == 1)
or (node_south.name == corner_2 and node_south.param2 == 0))
and ((node_west.name == roof and node_west.param2 == 0)
@ -291,7 +291,7 @@ end
-- MM: The following stuff is just for testing purposes for now; no generating of roots.
-- I'm not satisfied with this; they should be either bigger or a different drawtype.
-----------------------------------------------------------------------------------------------
-- RooTS
-- RooTS
-----------------------------------------------------------------------------------------------
if Roots == true then -- see settings.txt
@ -347,7 +347,7 @@ for i in pairs(TRuNKS) do
selection_box = {type = "fixed", fixed = roots_cube},
node_box = {type = "fixed", fixed = roots_sheet},
groups = {
tree=1,
tree_root=1,
snappy=1,
choppy=2,
oddly_breakable_by_hand=1,

0
trunks/textures/credit_textures.txt Normal file → Executable file
View File

BIN
trunks/textures/old & unused/comboSticks.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 228 B

BIN
trunks/textures/old & unused/comboSticks_2.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 359 B

0
trunks/textures/old & unused/trunks_root_mask_old.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 135 B

BIN
trunks/textures/old & unused/trunks_twig_1e.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 131 B

0
trunks/textures/old & unused/trunks_twig_1n.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 147 B

0
trunks/textures/old & unused/trunks_twig_2n.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 142 B

BIN
trunks/textures/old & unused/trunks_twig_3n.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

After

Width:  |  Height:  |  Size: 131 B

0
trunks/textures/old & unused/trunks_twig_4n.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 152 B

BIN
trunks/textures/old & unused/trunks_twig_5-8.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 161 B

BIN
trunks/textures/old & unused/trunks_twig_9-12.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

After

Width:  |  Height:  |  Size: 197 B

BIN
trunks/textures/trunks_moss.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 192 B

BIN
trunks/textures/trunks_moss_fungus.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 B

After

Width:  |  Height:  |  Size: 221 B

0
trunks/textures/trunks_root_mask.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 191 B

After

Width:  |  Height:  |  Size: 191 B

BIN
trunks/textures/trunks_twig_1.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 131 B

0
trunks/textures/trunks_twig_10.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 149 B

After

Width:  |  Height:  |  Size: 149 B

0
trunks/textures/trunks_twig_11.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 122 B

0
trunks/textures/trunks_twig_12.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 115 B

After

Width:  |  Height:  |  Size: 115 B

0
trunks/textures/trunks_twig_13.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 105 B

0
trunks/textures/trunks_twig_2.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 141 B

0
trunks/textures/trunks_twig_3.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 136 B

0
trunks/textures/trunks_twig_4.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 126 B

After

Width:  |  Height:  |  Size: 126 B

0
trunks/textures/trunks_twig_5.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 110 B

0
trunks/textures/trunks_twig_6.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 74 B

After

Width:  |  Height:  |  Size: 74 B

0
trunks/textures/trunks_twig_7.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 104 B

After

Width:  |  Height:  |  Size: 104 B

0
trunks/textures/trunks_twig_8.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 118 B

After

Width:  |  Height:  |  Size: 118 B

0
trunks/textures/trunks_twig_9.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 110 B

0
trunks/textures/trunks_twigs.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 759 B

After

Width:  |  Height:  |  Size: 759 B

0
trunks/textures/trunks_twigs_corner.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 641 B

After

Width:  |  Height:  |  Size: 641 B

0
trunks/textures/trunks_twigs_top.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 471 B

0
trunks/trunks_settings.txt Normal file → Executable file
View File