mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-06-28 06:11:47 +02:00
Removed all whitespaces (using new script)
This commit is contained in:
@ -4,15 +4,15 @@
|
||||
-- bush leaf textures are cc-by-sa 3.0. from VannessaE's moretrees mod. (Leaf texture created by RealBadAngel or VanessaE)
|
||||
-- Branch textures created by Neuromancer.
|
||||
-- Licence for Code and Non-Bush leaf code is WTFPL.
|
||||
|
||||
abstract_bushes = {}
|
||||
|
||||
abstract_bushes = {}
|
||||
|
||||
minetest.register_node("bushes:youngtree2_bottom", {
|
||||
description = "Young Tree 2 (bottom)",
|
||||
description = "Young Tree 2 (bottom)",
|
||||
drawtype="nodebox",
|
||||
tiles = {"bushes_youngtree2trunk.png"},
|
||||
inventory_image = "bushes_youngtree2trunk_inv.png",
|
||||
wield_image = "bushes_youngtree2trunk_inv.png",
|
||||
wield_image = "bushes_youngtree2trunk_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
@ -27,7 +27,7 @@ node_box = {
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'default:stick'
|
||||
})
|
||||
|
||||
|
||||
local BushBranchCenter = { {1,1}, {3,2} }
|
||||
for i in pairs(BushBranchCenter) do
|
||||
local Num = BushBranchCenter[i][1]
|
||||
@ -56,8 +56,8 @@ for i in pairs(BushBranchCenter) do
|
||||
sunlight_propagates = true,
|
||||
groups = {
|
||||
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
leaves=1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
@ -77,8 +77,8 @@ for i in pairs(BushBranchSide) do
|
||||
--[[bottom]]"bushes_branches_center_"..TexNum..".png",
|
||||
--[[right]] "bushes_branches_left_"..TexNum..".png",
|
||||
--[[left]] "bushes_branches_right_"..TexNum..".png", -- MM: We could also mirror the previous here,
|
||||
--[[back]] "bushes_branches_center_"..TexNum..".png",-- unless U really want 'em 2 B different
|
||||
--[[front]] "bushes_branches_right_"..TexNum..".png"
|
||||
--[[back]] "bushes_branches_center_"..TexNum..".png",-- unless U really want 'em 2 B different
|
||||
--[[front]] "bushes_branches_right_"..TexNum..".png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
@ -99,8 +99,8 @@ for i in pairs(BushBranchSide) do
|
||||
sunlight_propagates = true,
|
||||
groups = {
|
||||
-- tree=1, -- MM: disabled because some recipes use group:tree for trunks
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
leaves=1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
@ -110,23 +110,23 @@ end
|
||||
|
||||
local BushLeafNode = { {1}, {2}}
|
||||
for i in pairs(BushLeafNode) do
|
||||
local Num = BushLeafNode[i][1]
|
||||
local Num = BushLeafNode[i][1]
|
||||
minetest.register_node("bushes:BushLeaves"..Num, {
|
||||
description = "Bush Leaves "..Num,
|
||||
drawtype = "allfaces_optional",
|
||||
tiles = {"bushes_leaves_"..Num..".png"},
|
||||
paramtype = "light",
|
||||
groups = { -- MM: Should we add leafdecay?
|
||||
groups = { -- MM: Should we add leafdecay?
|
||||
snappy=3,
|
||||
flammable=2,
|
||||
attached_node=1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
abstract_bushes.grow_bush = function(pos)
|
||||
local leaf_type = math.random(1,2)
|
||||
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
|
||||
@ -144,25 +144,25 @@ abstract_bushes.grow_bush = function(pos)
|
||||
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
|
||||
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
|
||||
|
||||
abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
||||
|
||||
|
||||
|
||||
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
||||
|
||||
|
||||
local bush_branch_type = 2
|
||||
|
||||
|
||||
-- MM: I'm not sure if it's slower now than before...
|
||||
if dir ~= 5 and leaf_type == 1 then
|
||||
bush_branch_type = 2
|
||||
@ -178,7 +178,7 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
||||
bush_branch_type = 3
|
||||
dir = 1
|
||||
end
|
||||
|
||||
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
or minetest.get_node(right_here).name == "default:junglegrass" then
|
||||
minetest.set_node(right_here, {name="bushes:bushbranches"..bush_branch_type , param2=dir})
|
||||
@ -196,7 +196,7 @@ end
|
||||
|
||||
plantslib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
@ -207,21 +207,21 @@ plantslib:register_generate_plant({
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_bushes.grow_bush
|
||||
)
|
||||
)
|
||||
|
||||
abstract_bushes.grow_youngtree2 = function(pos)
|
||||
local height = math.random(4,5)
|
||||
local height = math.random(4,5)
|
||||
abstract_bushes.grow_youngtree_node2(pos,height)
|
||||
end
|
||||
|
||||
abstract_bushes.grow_youngtree_node2 = function(pos, height)
|
||||
|
||||
|
||||
|
||||
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
||||
local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
|
||||
local three_above_right_here = {x=pos.x, y=pos.y+4, z=pos.z}
|
||||
|
||||
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
or minetest.get_node(right_here).name == "default:junglegrass" then
|
||||
if height == 4 then
|
||||
@ -234,14 +234,14 @@ abstract_bushes.grow_youngtree_node2 = function(pos, height)
|
||||
minetest.set_node(three_above_right_here, {name="bushes:BushLeaves1" })
|
||||
minetest.set_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
plantslib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
@ -252,6 +252,6 @@ plantslib:register_generate_plant({
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_bushes.grow_youngtree2
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
--http://dev.minetest.net/Node_Drawtypes
|
||||
|
@ -16,7 +16,7 @@ minetest.register_craft({
|
||||
if minetest.get_modpath("farming") and farming.mod == "redo" then
|
||||
--[[ We really have nothing to do to use farming:sugar in the recipes
|
||||
because they use the generic group group:food_sugar
|
||||
which is added to the groups list of farming:sugar by the mod "food".
|
||||
which is added to the groups list of farming:sugar by the mod "food".
|
||||
--]]
|
||||
|
||||
--Temporary alias to replace existing bushes:sugar in the world
|
||||
|
@ -11,7 +11,7 @@ plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
-- find out which bush type we are dealing with
|
||||
local bush_name = ""
|
||||
local can_harvest = false
|
||||
|
||||
|
||||
if oldnode.name == "bushes:fruitless_bush" then
|
||||
-- this bush has not grown fruits yet (but will eventually)
|
||||
bush_name = oldmetadata.fields.bush_type
|
||||
|
@ -28,7 +28,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if ground_y then
|
||||
local p = {x=x,y=ground_y+1,z=z}
|
||||
local nn = minetest.get_node(p).name
|
||||
@ -44,7 +44,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -88,10 +88,10 @@ minetest.register_node("cavestuff:stalactite_1",{
|
||||
{-0.037500,-0.837500,0.037500,0.037500,0.500000,-0.025000},
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pt = pointed_thing
|
||||
if minetest.get_node(pt.under).name=="default:stone"
|
||||
if minetest.get_node(pt.under).name=="default:stone"
|
||||
and minetest.get_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}).name=="air"
|
||||
and minetest.get_node({x=pt.under.x, y=pt.under.y-2, z=pt.under.z}).name=="air" then
|
||||
minetest.set_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}, {name="cavestuff:stalactite_"..math.random(1,3)})
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: plants_lib
|
||||
-- Looked at code from: default
|
||||
-- Looked at code from: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
abstract_dryplants.grow_juncus = function(pos)
|
||||
@ -86,7 +86,7 @@ minetest.register_node("dryplants:juncus_02", {
|
||||
-- near water or swamp
|
||||
plantslib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
--"default:sand",
|
||||
"stoneage:grass_with_silex",
|
||||
@ -107,7 +107,7 @@ plantslib:register_generate_plant({
|
||||
-- at dunes/beach
|
||||
plantslib:register_generate_plant({
|
||||
surface = {
|
||||
--"default:dirt_with_grass",
|
||||
--"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
"default:sand",
|
||||
--"stoneage:grass_with_silex",
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: plants_lib
|
||||
-- Looked at code from: default
|
||||
-- Looked at code from: default
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
abstract_dryplants.grow_grass_variation = function(pos)
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: plants_lib
|
||||
-- Looked at code from: default, trees
|
||||
-- Looked at code from: default, trees
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-- NOTES (from wikipedia, some of this might get implemented)
|
||||
@ -70,7 +70,7 @@ abstract_dryplants.grow_reedmace_water = function(pos)
|
||||
minetest.set_node(pos_02, {name="dryplants:reedmace_height_3_spikes"})
|
||||
else
|
||||
minetest.set_node(pos_02, {name="dryplants:reedmace_height_3"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -212,8 +212,8 @@ minetest.register_node("dryplants:reedmace", {
|
||||
after_destruct = function(pos,oldnode)
|
||||
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
if node.name == "dryplants:reedmace_top"
|
||||
or node.name == "dryplants:reedmace_spikes" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
or node.name == "dryplants:reedmace_spikes" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
minetest.add_item(pos,"dryplants:reedmace_sapling")
|
||||
end
|
||||
end,
|
||||
@ -241,10 +241,10 @@ minetest.register_node("dryplants:reedmace_bottom", {
|
||||
},
|
||||
after_destruct = function(pos,oldnode)
|
||||
local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
if node.name == "dryplants:reedmace"
|
||||
if node.name == "dryplants:reedmace"
|
||||
or node.name == "dryplants:reedmace_top"
|
||||
or node.name == "dryplants:reedmace_spikes" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
or node.name == "dryplants:reedmace_spikes" then
|
||||
minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
|
||||
minetest.add_item(pos,"dryplants:reedmace_sapling")
|
||||
end
|
||||
end,
|
||||
@ -348,7 +348,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
||||
-- near water or swamp
|
||||
plantslib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_grass",
|
||||
"default:desert_sand",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
@ -370,7 +370,7 @@ plantslib:register_generate_plant({
|
||||
plantslib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt",
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_grass",
|
||||
--"default:desert_sand",
|
||||
--"stoneage:grass_with_silex",
|
||||
"stoneage:sand_with_silex",
|
||||
|
@ -5,7 +5,7 @@
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: plants_lib
|
||||
-- Looked at code from: 4seasons, default
|
||||
-- Supports: vines
|
||||
-- Supports: vines
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
assert(abstract_ferns.config.enable_giant_treefern == true)
|
||||
@ -21,7 +21,7 @@ abstract_ferns.grow_giant_tree_fern = function(pos)
|
||||
end
|
||||
|
||||
local size = math.random(12,16) -- min of range must be >= 4
|
||||
|
||||
|
||||
local leafchecks = {
|
||||
{
|
||||
direction = 3,
|
||||
@ -238,8 +238,8 @@ minetest.register_node("ferns:fern_trunk_big", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
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})
|
||||
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,
|
||||
|
@ -6,7 +6,7 @@
|
||||
-- Contains code from: plants_lib
|
||||
-- Looked at code from: default, flowers, trees
|
||||
-- Dependencies: plants_lib
|
||||
-- Supports: dryplants, stoneage, sumpf
|
||||
-- Supports: dryplants, stoneage, sumpf
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
assert(abstract_ferns.config.enable_horsetails == true)
|
||||
|
@ -4,7 +4,7 @@ local version = "0.2.0"
|
||||
local mname = "ferns" -- former "archaeplantae"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- (by Mossmanikin)
|
||||
-- License (everything): WTFPL
|
||||
-- License (everything): WTFPL
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
abstract_ferns = {}
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- In case you don't wanna have errors:
|
||||
|
||||
-- Only change what's behind a "=" (or "--").
|
||||
-- Only change what's behind a "=" (or "--").
|
||||
-- Don't use caps (behind a "=").
|
||||
|
||||
-- If there's a "false" (behind a "=") you can change it to "true" (and the other way around).
|
||||
|
@ -4,7 +4,7 @@
|
||||
-- by Mossmanikin
|
||||
-- License (everything): WTFPL
|
||||
-- Contains code from: plants_lib
|
||||
-- Looked at code from: default , trees
|
||||
-- Looked at code from: default , trees
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
assert(abstract_ferns.config.enable_treefern == true)
|
||||
@ -17,10 +17,10 @@ abstract_ferns.grow_tree_fern = function(pos)
|
||||
and minetest.get_node(pos_01).name ~= "default:junglegrass" then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local size = math.random(1, 5)
|
||||
local crown = ({ "ferns:tree_fern_leaves", "ferns:tree_fern_leaves_02" })[math.random(1, 2)]
|
||||
|
||||
|
||||
local i = 1
|
||||
while (i < size-1) do
|
||||
if minetest.get_node({x = pos.x, y = pos.y + i + 1, z = pos.z}).name ~= "air" then
|
||||
@ -117,8 +117,8 @@ minetest.register_node("ferns:fern_trunk", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
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})
|
||||
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,
|
||||
|
@ -42,7 +42,7 @@ for i in ipairs(lilies_list) do
|
||||
minetest.register_node(":flowers:waterlily"..deg1, {
|
||||
description = S("Waterlily"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
tiles = {
|
||||
"flowers_waterlily"..deg2..".png",
|
||||
"flowers_waterlily"..deg2..".png^[transformFY"
|
||||
},
|
||||
@ -79,7 +79,7 @@ for i in ipairs(lilies_list) do
|
||||
if plantslib: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"
|
||||
elseif top_node.name ~= "default:water_source"
|
||||
and plantslib:get_nodedef_field(top_node.name, "buildable_to") then
|
||||
place_pos = top_pos
|
||||
else
|
||||
@ -138,11 +138,11 @@ for i in ipairs(algae_list) do
|
||||
num = "_"..algae_list[i][1]
|
||||
algae_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
|
||||
end
|
||||
|
||||
|
||||
minetest.register_node(":flowers:seaweed"..num, {
|
||||
description = S("Seaweed"),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
tiles = {
|
||||
"flowers_seaweed"..num..".png",
|
||||
"flowers_seaweed"..num..".png^[transformFY"
|
||||
},
|
||||
@ -161,9 +161,9 @@ for i in ipairs(algae_list) do
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
|
||||
},
|
||||
},
|
||||
buildable_to = true,
|
||||
|
||||
|
||||
liquids_pointable = true,
|
||||
drop = "flowers:seaweed",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
@ -179,7 +179,7 @@ for i in ipairs(algae_list) do
|
||||
if plantslib: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"
|
||||
elseif top_node.name ~= "default:water_source"
|
||||
and plantslib:get_nodedef_field(top_node.name, "buildable_to") then
|
||||
place_pos = top_pos
|
||||
else
|
||||
@ -240,7 +240,7 @@ for i in ipairs(flowers_list) do
|
||||
local flowerdesc = flowers_list[i][1]
|
||||
local flower = flowers_list[i][2]
|
||||
local craftwith = flowers_list[i][3]
|
||||
|
||||
|
||||
minetest.register_node(":flowers:potted_"..flower, {
|
||||
description = S("Potted "..flowerdesc),
|
||||
drawtype = "mesh",
|
||||
@ -254,7 +254,7 @@ for i in ipairs(flowers_list) do
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.2, -0.5, -0.2, 0.2, 0.4, 0.2 },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
@ -336,7 +336,7 @@ flowers_plus.grow_waterlily = function(pos)
|
||||
if lilies_list[i][1] ~= nil then
|
||||
ext = "_"..lilies_list[i][1]
|
||||
end
|
||||
|
||||
|
||||
if chance == num then
|
||||
minetest.set_node(right_here, {name="flowers:waterlily"..ext, param2=math.random(0,3)})
|
||||
end
|
||||
@ -529,7 +529,7 @@ minetest.register_craft( {
|
||||
-- cotton wads -> string (can be crafted into wool blocks)
|
||||
-- potted cotton plants -> potted white dandelions
|
||||
|
||||
minetest.register_alias("flowers:cotton_plant", "farming:cotton_8")
|
||||
minetest.register_alias("flowers:cotton_plant", "farming:cotton_8")
|
||||
minetest.register_alias("flowers:flower_cotton", "farming:cotton_8")
|
||||
minetest.register_alias("flowers:flower_cotton_pot", "flowers:potted_dandelion_white")
|
||||
minetest.register_alias("flowers:potted_cotton_plant", "flowers:potted_dandelion_white")
|
||||
|
@ -36,7 +36,7 @@ minetest.register_craftitem("mushroom:poison",{
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "mushroom:identifier",
|
||||
recipe = {
|
||||
recipe = {
|
||||
{ "", "default:torch", "" },
|
||||
{ "default:steel_ingot", "default:mese_crystal_fragment", "default:steel_ingot" },
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ minetest.register_abm({
|
||||
chance = 300, -- Modif MFF
|
||||
action = function(pos, node)
|
||||
local top_pos = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
if minetest.get_node(top_pos).name == "air" and minetest.get_node_light(top_pos, nil) < 8
|
||||
if minetest.get_node(top_pos).name == "air" and minetest.get_node_light(top_pos, nil) < 8
|
||||
and minetest.find_node_near(pos, 1, trees_list)
|
||||
and minetest.find_node_near(pos, 3, "default:water_source") then
|
||||
if math.random(0, 1) == 0 then
|
||||
@ -194,7 +194,7 @@ minetest.register_abm({
|
||||
chance = 300, -- Modif MFF
|
||||
action = function(pos, node)
|
||||
local top_pos = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
if minetest.get_node(top_pos).name == "air" and minetest.get_node_light(top_pos, nil) < 8
|
||||
if minetest.get_node(top_pos).name == "air" and minetest.get_node_light(top_pos, nil) < 8
|
||||
and minetest.find_node_near(pos, 1, {"default:water_source"}) then
|
||||
if math.random(0,1) == 0 then
|
||||
minetest.set_node(top_pos, {name="mushroom:brown_natural"})
|
||||
@ -219,7 +219,7 @@ minetest.register_abm({
|
||||
local soil_pos = {x=pos.x, y=pos.y-1, z=pos.z}
|
||||
local soil = minetest.get_node(soil_pos)
|
||||
local woodsoil_str = "woodsoils:.+_with_leaves_?"
|
||||
if minetest.get_node_light(pos, nil) < 8
|
||||
if minetest.get_node_light(pos, nil) < 8
|
||||
and minetest.find_node_near(pos, 1, trees_list) then
|
||||
local spread_x = math.random(-1, 1)
|
||||
local spread_z = math.random(-1, 1)
|
||||
@ -228,10 +228,10 @@ minetest.register_abm({
|
||||
if minetest.get_node(newpos).name == "air"
|
||||
and (newsoil.name == "default:dirt_with_grass"
|
||||
or newsoil.name == "default:dirt"
|
||||
or string.match(newsoil.name, woodsoil_str))
|
||||
or string.match(newsoil.name, woodsoil_str))
|
||||
and minetest.find_node_near(newpos, 3, "default:water_source") then
|
||||
minetest.set_node(newpos, {name=node.name})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
@ -44,7 +44,7 @@ end
|
||||
function nature:grow_node(pos, nodename)
|
||||
if pos ~= nil then
|
||||
local light_enough = (minetest.get_node_light(pos, nil) or 0)
|
||||
>= nature.minimum_growth_light
|
||||
>= nature.minimum_growth_light
|
||||
|
||||
if is_not_young(pos) and light_enough then
|
||||
minetest.remove_node(pos)
|
||||
|
@ -125,7 +125,7 @@ end
|
||||
|
||||
function plantslib:register_generate_plant(biomedef, nodes_or_function_or_model)
|
||||
|
||||
-- if calling code passes an undefined node for a surface or
|
||||
-- if calling code passes an undefined node for a surface or
|
||||
-- as a node to be spawned, don't register an action for it.
|
||||
|
||||
if type(nodes_or_function_or_model) == "string"
|
||||
@ -140,7 +140,7 @@ function plantslib:register_generate_plant(biomedef, nodes_or_function_or_model)
|
||||
plantslib:dbg("Warning: Registered function call using deprecated string method: "..dump(nodes_or_function_or_model))
|
||||
end
|
||||
|
||||
if biomedef.check_air == false then
|
||||
if biomedef.check_air == false then
|
||||
plantslib:dbg("Register no-air-check mapgen hook: "..dump(nodes_or_function_or_model))
|
||||
plantslib.actionslist_no_aircheck[#plantslib.actionslist_no_aircheck + 1] = { biomedef, nodes_or_function_or_model }
|
||||
local s = biomedef.surface
|
||||
@ -216,7 +216,7 @@ function plantslib:populate_surfaces(biome, nodes_or_function_or_model, snodes,
|
||||
else
|
||||
if string.find(biome_surfaces_string, "group:") then
|
||||
for j = 1, #biome.surface do
|
||||
if string.find(biome.surface[j], "^group:")
|
||||
if string.find(biome.surface[j], "^group:")
|
||||
and minetest.get_item_group(dest_node.name, biome.surface[j]) then
|
||||
surface_ok = true
|
||||
break
|
||||
@ -495,13 +495,13 @@ function plantslib:spawn_on_surfaces(sd,sp,sr,sc,ss,sa)
|
||||
chance = biome.spawn_chance,
|
||||
neighbors = biome.neighbors,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local p_top = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||
local p_top = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||
local n_top = minetest.get_node(p_top)
|
||||
local perlin_fertile_area = minetest.get_perlin(biome.seed_diff, perlin_octaves, perlin_persistence, perlin_scale)
|
||||
local noise1 = perlin_fertile_area:get2d({x=p_top.x, y=p_top.z})
|
||||
local noise2 = plantslib.perlin_temperature:get2d({x=p_top.x, y=p_top.z})
|
||||
local noise3 = plantslib.perlin_humidity:get2d({x=p_top.x+150, y=p_top.z+50})
|
||||
if noise1 > biome.plantlife_limit
|
||||
if noise1 > biome.plantlife_limit
|
||||
and noise2 <= biome.temp_min
|
||||
and noise2 >= biome.temp_max
|
||||
and noise3 <= biome.humidity_min
|
||||
@ -544,7 +544,7 @@ function plantslib:spawn_on_surfaces(sd,sp,sr,sc,ss,sa)
|
||||
|
||||
elseif biome.spawn_on_side then
|
||||
local onside = plantslib:find_open_side(pos)
|
||||
if onside then
|
||||
if onside then
|
||||
minetest.set_node(onside.newpos, { name = plant_to_spawn, param2 = onside.facedir })
|
||||
end
|
||||
elseif biome.spawn_on_bottom then
|
||||
@ -650,7 +650,7 @@ function plantslib:find_adjacent_wall(pos, verticals, randomflag)
|
||||
local verts = dump(verticals)
|
||||
if randomflag then
|
||||
local walltab = {}
|
||||
|
||||
|
||||
if string.find(verts, minetest.get_node({ x=pos.x-1, y=pos.y, z=pos.z }).name) then walltab[#walltab + 1] = 3 end
|
||||
if string.find(verts, minetest.get_node({ x=pos.x+1, y=pos.y, z=pos.z }).name) then walltab[#walltab + 1] = 2 end
|
||||
if string.find(verts, minetest.get_node({ x=pos.x , y=pos.y, z=pos.z-1 }).name) then walltab[#walltab + 1] = 5 end
|
||||
|
@ -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
|
||||
@ -202,11 +202,11 @@ local TRuNKS = {
|
||||
-- MoD TRuNK NR
|
||||
{"default", "tree", 1},
|
||||
{"default", "jungletree", 2},
|
||||
|
||||
|
||||
{"trees", "tree_conifer", 3},
|
||||
{"trees", "tree_mangrove", 4},
|
||||
{"trees", "tree_palm", 5},
|
||||
|
||||
|
||||
{"moretrees", "apple_tree_trunk", 6},
|
||||
{"moretrees", "beech_trunk", 7},
|
||||
{"moretrees", "birch_trunk", 8},
|
||||
@ -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
|
||||
|
||||
plantslib: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 @@ plantslib: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
|
||||
|
@ -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
|
||||
|
||||
@ -303,11 +303,11 @@ local TRuNKS = {
|
||||
-- MoD TRuNK
|
||||
{"default", "tree" },
|
||||
{"default", "jungletree" },
|
||||
|
||||
|
||||
{"trees", "tree_conifer" },
|
||||
{"trees", "tree_mangrove" },
|
||||
{"trees", "tree_palm" },
|
||||
|
||||
|
||||
{"moretrees", "apple_tree_trunk" },
|
||||
{"moretrees", "beech_trunk" },
|
||||
{"moretrees", "birch_trunk" },
|
||||
@ -326,9 +326,9 @@ for i in pairs(TRuNKS) do
|
||||
local MoD = TRuNKS[i][1]
|
||||
local TRuNK = TRuNKS[i][2]
|
||||
if minetest.get_modpath(MoD) ~= nil then
|
||||
|
||||
|
||||
local des = minetest.registered_nodes[MoD..":"..TRuNK].description
|
||||
|
||||
|
||||
minetest.register_node("trunks:"..TRuNK.."root", {
|
||||
description = des.." Root",
|
||||
paramtype = "light",
|
||||
@ -350,12 +350,12 @@ for i in pairs(TRuNKS) do
|
||||
choppy=2,
|
||||
oddly_breakable_by_hand=1,
|
||||
flammable=2--,
|
||||
--not_in_creative_inventory=1 -- atm in inv for testing
|
||||
--not_in_creative_inventory=1 -- atm in inv for testing
|
||||
},
|
||||
--drop = "trunks:twig_1", -- not sure about this yet
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -123,7 +123,7 @@ vines.dig_vine = function( pos, node_name, user )
|
||||
--only dig give the vine if shears are used
|
||||
if not user then return false end
|
||||
local wielded = user:get_wielded_item()
|
||||
if 'vines:shears' == wielded:get_name() then
|
||||
if 'vines:shears' == wielded:get_name() then
|
||||
local inv = user:get_inventory()
|
||||
if inv then
|
||||
inv:add_item("main", ItemStack( node_name ))
|
||||
|
@ -26,7 +26,7 @@ local RaDiuS = {
|
||||
}
|
||||
-- e = + , n = +
|
||||
abstract_woodsoils.place_soil = function(pos)
|
||||
|
||||
|
||||
if minetest.get_item_group(minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name, "soil") > 0
|
||||
or minetest.get_item_group(minetest.get_node({x=pos.x,y=pos.y-2,z=pos.z}).name, "soil") > 0 then
|
||||
for i in pairs(RaDiuS) do
|
||||
|
@ -10,14 +10,14 @@ dofile(minetest.get_modpath("woodsoils").."/nodes.lua")
|
||||
dofile(minetest.get_modpath("woodsoils").."/generating.lua")
|
||||
|
||||
-- felt like playing a bit :D
|
||||
--[[print(" _____ __")
|
||||
--[[print(" _____ __")
|
||||
print("_/ ____\\___________ ____ _______/ |_")
|
||||
print("\\ __\\/ _ \\_ __ \\_/ __ \\ / ___/\\ __\\")
|
||||
print(" | | ( <_> ) | \\/\\ ___/ \\___ \\ | |")
|
||||
print(" |__| \\____/|__| \\___ >____ > |__|")
|
||||
print(" | | ( <_> ) | \\/\\ ___/ \\___ \\ | |")
|
||||
print(" |__| \\____/|__| \\___ >____ > |__|")
|
||||
print(" \\/ \\/")
|
||||
|
||||
print(" .__.__")
|
||||
print(" .__.__")
|
||||
print(" __________ |__| | ______")
|
||||
print(" / ___/ _ \\| | | / ___/")
|
||||
print(" \\___ ( <_> ) | |__\\___ \\")
|
||||
|
@ -3,8 +3,8 @@
|
||||
minetest.register_node("woodsoils:dirt_with_leaves_1", {
|
||||
description = "Forest Soil 1",
|
||||
tiles = {
|
||||
"default_dirt.png^woodsoils_ground_cover.png",
|
||||
"default_dirt.png",
|
||||
"default_dirt.png^woodsoils_ground_cover.png",
|
||||
"default_dirt.png",
|
||||
"default_dirt.png^woodsoils_ground_cover_side.png"},
|
||||
is_ground_content = true,
|
||||
groups = {
|
||||
@ -21,8 +21,8 @@ minetest.register_node("woodsoils:dirt_with_leaves_1", {
|
||||
minetest.register_node("woodsoils:dirt_with_leaves_2", {
|
||||
description = "Forest Soil 2",
|
||||
tiles = {
|
||||
"woodsoils_ground.png",
|
||||
"default_dirt.png",
|
||||
"woodsoils_ground.png",
|
||||
"default_dirt.png",
|
||||
"default_dirt.png^woodsoils_ground_side.png"},
|
||||
is_ground_content = true,
|
||||
groups = {
|
||||
@ -39,8 +39,8 @@ minetest.register_node("woodsoils:dirt_with_leaves_2", {
|
||||
minetest.register_node("woodsoils:grass_with_leaves_1", {
|
||||
description = "Forest Soil 3",
|
||||
tiles = {
|
||||
"default_grass.png^woodsoils_ground_cover2.png",
|
||||
"default_dirt.png",
|
||||
"default_grass.png^woodsoils_ground_cover2.png",
|
||||
"default_dirt.png",
|
||||
"default_dirt.png^default_grass_side.png^woodsoils_ground_cover_side2.png"},
|
||||
is_ground_content = true,
|
||||
groups = {
|
||||
@ -57,8 +57,8 @@ minetest.register_node("woodsoils:grass_with_leaves_1", {
|
||||
minetest.register_node("woodsoils:grass_with_leaves_2", {
|
||||
description = "Forest Soil 4",
|
||||
tiles = {
|
||||
"default_grass.png^woodsoils_ground_cover.png",
|
||||
"default_dirt.png",
|
||||
"default_grass.png^woodsoils_ground_cover.png",
|
||||
"default_dirt.png",
|
||||
"default_dirt.png^default_grass_side.png^woodsoils_ground_cover_side.png"},
|
||||
is_ground_content = true,
|
||||
groups = {
|
||||
|
@ -1,7 +1,7 @@
|
||||
abstract_youngtrees = {}
|
||||
abstract_youngtrees = {}
|
||||
|
||||
minetest.register_node("youngtrees:bamboo", {
|
||||
description = "Young Bamboo Tree",
|
||||
description = "Young Bamboo Tree",
|
||||
drawtype="nodebox",
|
||||
tiles = {"bamboo.png"},
|
||||
paramtype = "light",
|
||||
@ -21,11 +21,11 @@ minetest.register_node("youngtrees:bamboo", {
|
||||
})
|
||||
|
||||
minetest.register_node("youngtrees:youngtree2_middle",{
|
||||
description = "Young Tree 2 (middle)",
|
||||
description = "Young Tree 2 (middle)",
|
||||
drawtype="nodebox",
|
||||
tiles = {"youngtree2branch.png"},
|
||||
inventory_image = "youngtree2branch.png",
|
||||
wield_image = "youngtree2branch.png",
|
||||
wield_image = "youngtree2branch.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
@ -60,7 +60,7 @@ minetest.register_node("youngtrees:youngtree_top", {
|
||||
drop = 'trunks:twig_1'
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("youngtrees:youngtree_middle", {
|
||||
description = "Young Tree (middle)",
|
||||
drawtype = "plantlike",
|
||||
@ -80,7 +80,7 @@ minetest.register_node("youngtrees:youngtree_middle", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
minetest.register_node("youngtrees:youngtree_bottom", {
|
||||
description = "Young Tree (bottom)",
|
||||
drawtype = "plantlike",
|
||||
@ -98,19 +98,19 @@ minetest.register_node("youngtrees:youngtree_bottom", {
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = 'trunks:twig_1'
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
abstract_youngtrees.grow_youngtree = function(pos)
|
||||
local height = math.random(1,3)
|
||||
local height = math.random(1,3)
|
||||
abstract_youngtrees.grow_youngtree_node(pos,height)
|
||||
end
|
||||
|
||||
abstract_youngtrees.grow_youngtree_node = function(pos, height)
|
||||
|
||||
|
||||
|
||||
|
||||
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
|
||||
|
||||
|
||||
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
|
||||
or minetest.get_node(right_here).name == "default:junglegrass" then
|
||||
if height == 1 then
|
||||
@ -119,20 +119,20 @@ abstract_youngtrees.grow_youngtree_node = function(pos, height)
|
||||
if height == 2 then
|
||||
minetest.set_node(right_here, {name="youngtrees:youngtree_bottom"})
|
||||
minetest.set_node(above_right_here, {name="youngtrees:youngtree_top"})
|
||||
end
|
||||
end
|
||||
if height == 3 then
|
||||
local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
|
||||
minetest.set_node(right_here, {name="youngtrees:youngtree_bottom"})
|
||||
minetest.set_node(above_right_here, {name="youngtrees:youngtree_middle"})
|
||||
minetest.set_node(two_above_right_here, {name="youngtrees:youngtree_top"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
plantslib:register_generate_plant({
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_grass",
|
||||
"stoneage:grass_with_silex",
|
||||
"sumpf:peat",
|
||||
"sumpf:sumpf"
|
||||
@ -143,4 +143,4 @@ plantslib:register_generate_plant({
|
||||
plantlife_limit = -0.9,
|
||||
},
|
||||
abstract_youngtrees.grow_youngtree
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user