add readme.md

...and some change to plantlife that I can't remember what for ;)
master
Vanessa Dannenberg 2018-05-11 10:08:51 -04:00
parent 335d9a3edd
commit af2fedcf99
29 changed files with 1661 additions and 1459 deletions

View File

@ -1,6 +1,6 @@
-----------------------------------------------------------------------------------------------
local title = "Along the Shore"
local version = "0.0.4"
local version = "0.0.4"
local mname = "along_shore"
-----------------------------------------------------------------------------------------------

View File

@ -4,17 +4,17 @@
-- 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.
-- support for i18n
local S = plantlife_i18n.gettext
abstract_bushes = {}
abstract_bushes = {}
minetest.register_node("bushes:youngtree2_bottom", {
description = S("Young Tree 2 (bottom)"),
drawtype="nodebox",
tiles = {"bushes_youngtree2trunk.png"},
inventory_image = "bushes_youngtree2trunk_inv.png",
wield_image = "bushes_youngtree2trunk_inv.png",
inventory_image = "bushes_youngtree2trunk_inv.png",
wield_image = "bushes_youngtree2trunk_inv.png",
paramtype = "light",
walkable = false,
is_ground_content = true,
@ -29,11 +29,11 @@ node_box = {
sounds = default.node_sound_leaves_defaults(),
drop = 'default:stick'
})
local BushBranchCenter = { {1,1}, {3,2} }
local BushBranchCenter = { {1,1}, {3,2} }
for i in pairs(BushBranchCenter) do
local Num = BushBranchCenter[i][1]
local TexNum = BushBranchCenter[i][2]
local Num = BushBranchCenter[i][1]
local TexNum = BushBranchCenter[i][2]
minetest.register_node("bushes:bushbranches"..Num, {
description = S("Bush Branches @1", Num),
drawtype = "nodebox",
@ -58,8 +58,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(),
@ -67,20 +67,20 @@ for i in pairs(BushBranchCenter) do
})
end
local BushBranchSide = { {2,1}, {4,2} }
local BushBranchSide = { {2,1}, {4,2} }
for i in pairs(BushBranchSide) do
local Num = BushBranchSide[i][1]
local TexNum = BushBranchSide[i][2]
local Num = BushBranchSide[i][1]
local TexNum = BushBranchSide[i][2]
minetest.register_node("bushes:bushbranches"..Num, {
description = S("Bush Branches @1", Num),
drawtype = "nodebox",
tiles = {
--[[top]] "bushes_leaves_"..TexNum..".png",
--[[top]] "bushes_leaves_"..TexNum..".png",
--[[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",
@ -101,8 +101,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,25 +110,25 @@ for i in pairs(BushBranchSide) do
})
end
local BushLeafNode = { {1}, {2}}
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 = S("Bush Leaves @1", 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
@ -146,25 +146,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
@ -180,7 +180,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})
@ -198,7 +198,7 @@ end
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
"default:dirt_with_grass",
"stoneage:grass_with_silex",
"sumpf:peat",
"sumpf:sumpf"
@ -209,21 +209,21 @@ biome_lib: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
@ -236,14 +236,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
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
"default:dirt_with_grass",
"stoneage:grass_with_silex",
"sumpf:peat",
"sumpf:sumpf"
@ -254,6 +254,6 @@ biome_lib:register_generate_plant({
plantlife_limit = -0.9,
},
abstract_bushes.grow_youngtree2
)
)
--http://dev.minetest.net/Node_Drawtypes

View File

@ -1,6 +1,6 @@
-----------------------------------------------------------------------------------------------
local title = "Cave Stuff"
local version = "0.0.3"
local version = "0.0.3"
local mname = "cavestuff"
-----------------------------------------------------------------------------------------------

View File

@ -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

View File

@ -1,360 +1,360 @@
-----------------------------------------------------------------------------------------------
-- Dry Plants - Recipes 0.1.0 -- Short Grass -> Dirt
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): WTFPL
-- Looked at code from: darkage, default, farming, sickle, stairs
-- Dependencies: default, farming
-- Supports: flint, stoneage, sumpf
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-- Short Grass
-----------------------------------------------------------------------------------------------
minetest.register_craft({
output = "default:dirt",
recipe = {
{"dryplants:grass_short"},
}
})
-----------------------------------------------------------------------------------------------
-- Cut Grass
-----------------------------------------------------------------------------------------------
-- grass recipes (remove roots)
minetest.register_craft({
output = "dryplants:grass",
recipe = {
{"default:grass_1"},
}
})
minetest.register_craft({
output = "dryplants:grass",
recipe = {
{"default:junglegrass"},
}
})
if minetest.get_modpath("sumpf") ~= nil then
minetest.register_craft({
output = "dryplants:grass",
recipe = {
{"sumpf:gras"},
}
})
end
-----------------------------------------------------------------------------------------------
-- Sickle
-----------------------------------------------------------------------------------------------
minetest.register_craft({
output = "dryplants:sickle",
recipe = {
{"group:stone",""},
{"", "default:stick"},
{"default:stick",""}
}
})
if minetest.get_modpath("flint") ~= nil then
minetest.register_craft({
output = "dryplants:sickle",
recipe = {
{"flint:flintstone",""},
{"", "default:stick"},
{"default:stick",""}
}
})
end
if minetest.get_modpath("stoneage") ~= nil then
minetest.register_craft({
output = "dryplants:sickle",
recipe = {
{"stoneage:silex",""},
{"", "default:stick"},
{"default:stick",""}
}
})
end
-----------------------------------------------------------------------------------------------
-- Hay
-----------------------------------------------------------------------------------------------
--cooking
minetest.register_craft({
type = "cooking",
output = "dryplants:hay",
recipe = "dryplants:grass",
cooktime = 2,
})
minetest.register_craft({
type = "fuel",
recipe = "dryplants:hay",
burntime = 1,
})
-----------------------------------------------------------------------------------------------
-- Wet Reed
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- papyrus -> wetreed
output = "dryplants:wetreed 2",
recipe = {
{"default:papyrus","default:papyrus"},
{"default:papyrus","default:papyrus"},
}
})
minetest.register_craft({ -- reedmace_sapling -> wetreed
output = "dryplants:wetreed 2",
recipe = {
{"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
{"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
}
})
minetest.register_craft({ -- reedmace_top -> wetreed
output = "dryplants:wetreed 2",
recipe = {
{"dryplants:reedmace_top","dryplants:reedmace_top"},
{"dryplants:reedmace_top","dryplants:reedmace_top"},
}
})
minetest.register_craft({ -- reedmace -> wetreed
output = "dryplants:wetreed 2",
recipe = {
{"dryplants:reedmace","dryplants:reedmace"},
{"dryplants:reedmace","dryplants:reedmace"},
}
})
minetest.register_craft({ -- reedmace_bottom -> wetreed
output = "dryplants:wetreed 2",
recipe = {
{"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
{"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
}
})
local ReeD = {
{"wetreed"},
{"reed"}
}
for i in pairs(ReeD) do
local reed = "dryplants:"..ReeD[i][1]
local slab = reed.."_slab"
local roof = reed.."_roof"
local corner = roof.."_corner"
local corner_2 = corner.."_2"
-----------------------------------------------------------------------------------------------
-- Block
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- slab -> block
output = reed,
recipe = {
{slab},
{slab},
}
})
minetest.register_craft({ -- roof -> block
output = reed,
recipe = {
{roof},
{roof},
}
})
minetest.register_craft({ -- corner -> block
type = "shapeless",
output = reed.." 3",
recipe = {corner,corner,corner,corner,corner,corner,corner,corner}, -- 8x
})
minetest.register_craft({ -- corner_2 -> block
type = "shapeless",
output = reed.." 3",
recipe = {corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2}, -- 8x
})
-----------------------------------------------------------------------------------------------
-- Slab
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- block -> slab
output = slab.." 6",
recipe = {
{reed,reed,reed},
}
})
minetest.register_craft({ -- roof -> slab
output = slab,
recipe = {
{roof},
}
})
minetest.register_craft({ -- corner -> slab
output = slab.." 3",
recipe = {
{corner,corner},
{corner,corner},
}
})
minetest.register_craft({ -- corner_2 -> slab
output = slab.." 3",
recipe = {
{corner_2,corner_2},
{corner_2,corner_2},
}
})
-----------------------------------------------------------------------------------------------
-- Roof
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- block -> roof
output = roof.." 4",
recipe = {
{reed,""},
{"",reed},
}
})
minetest.register_craft({ -- block -> roof
output = roof.." 4",
recipe = {
{"",reed},
{reed,""},
}
})
minetest.register_craft({ -- slab -> roof
output = roof,
recipe = {
{slab},
}
})
-----------------------------------------------------------------------------------------------
-- Roof Corner
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- block -> corner
output = corner.." 8",
recipe = {
{"",reed,""},
{reed,"",reed},
}
})
minetest.register_craft({ -- corner_2 -> corner
output = corner,
recipe = {
{corner_2},
}
})
-----------------------------------------------------------------------------------------------
-- Roof Corner 2
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- block -> corner_2
output = corner_2.." 8",
recipe = {
{reed,"",reed},
{"",reed,""},
}
})
minetest.register_craft({ -- corner -> corner_2
output = corner_2,
recipe = {
{corner},
}
})
end
-----------------------------------------------------------------------------------------------
-- Reed
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- hay -> reed
output = "dryplants:reed 2",
recipe = {
{"dryplants:hay","dryplants:hay"},
{"dryplants:hay","dryplants:hay"},
}
})
--cooking
minetest.register_craft({ -- wetreed -> reed
type = "cooking",
output = "dryplants:reed",
recipe = "dryplants:wetreed",
cooktime = 2,
})
--fuel
minetest.register_craft({
type = "fuel",
recipe = "dryplants:reed",
burntime = 4,
})
-----------------------------------------------------------------------------------------------
-- Reed Slab
-----------------------------------------------------------------------------------------------
--cooking
minetest.register_craft({ -- wetreed_slab -> reed_slab
type = "cooking",
output = "dryplants:reed_slab",
recipe = "dryplants:wetreed_slab",
cooktime = 1,
})
--fuel
minetest.register_craft({
type = "fuel",
recipe = "dryplants:reed_slab",
burntime = 2,
})
-----------------------------------------------------------------------------------------------
-- Reed Roof
-----------------------------------------------------------------------------------------------
--cooking
minetest.register_craft({ -- wetreed_roof -> reed_roof
type = "cooking",
output = "dryplants:reed_roof",
recipe = "dryplants:wetreed_roof",
cooktime = 1,
})
--fuel
minetest.register_craft({
type = "fuel",
recipe = "dryplants:reed_roof",
burntime = 2,
})
-----------------------------------------------------------------------------------------------
-- Reed Roof Corner
-----------------------------------------------------------------------------------------------
--cooking
minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
type = "cooking",
output = "dryplants:reed_roof_corner",
recipe = "dryplants:wetreed_roof_corner",
cooktime = 1,
})
--fuel
minetest.register_craft({
type = "fuel",
recipe = "dryplants:reed_roof_corner",
burntime = 2,
})
-----------------------------------------------------------------------------------------------
-- Wet Reed Roof Corner 2
-----------------------------------------------------------------------------------------------
--cooking
minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
type = "cooking",
output = "dryplants:reed_roof_corner_2",
recipe = "dryplants:wetreed_roof_corner_2",
cooktime = 1,
})
--fuel
minetest.register_craft({
type = "fuel",
recipe = "dryplants:reed_roof_corner_2",
burntime = 2,
})
-----------------------------------------------------------------------------------------------
-- Dandelion Leave
-----------------------------------------------------------------------------------------------
--[[minetest.register_craftitem("dryplants:dandelion_leave", {
description = "Dandelion Leave",
inventory_image = "dryplants_dandelion_leave.png",
on_use = minetest.item_eat(1),
})
minetest.register_craft({
type = "shapeless",
output = "dryplants:dandelion_leave 4",
recipe = {"flowers:dandelion_yellow"},
replacements = {
{"flowers:dandelion_yellow", "dye:yellow"}
},
-----------------------------------------------------------------------------------------------
-- Dry Plants - Recipes 0.1.0 -- Short Grass -> Dirt
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): WTFPL
-- Looked at code from: darkage, default, farming, sickle, stairs
-- Dependencies: default, farming
-- Supports: flint, stoneage, sumpf
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-- Short Grass
-----------------------------------------------------------------------------------------------
minetest.register_craft({
output = "default:dirt",
recipe = {
{"dryplants:grass_short"},
}
})
-----------------------------------------------------------------------------------------------
-- Cut Grass
-----------------------------------------------------------------------------------------------
-- grass recipes (remove roots)
minetest.register_craft({
output = "dryplants:grass",
recipe = {
{"default:grass_1"},
}
})
minetest.register_craft({
output = "dryplants:grass",
recipe = {
{"default:junglegrass"},
}
})
if minetest.get_modpath("sumpf") ~= nil then
minetest.register_craft({
output = "dryplants:grass",
recipe = {
{"sumpf:gras"},
}
})
end
-----------------------------------------------------------------------------------------------
-- Sickle
-----------------------------------------------------------------------------------------------
minetest.register_craft({
output = "dryplants:sickle",
recipe = {
{"group:stone",""},
{"", "default:stick"},
{"default:stick",""}
}
})
if minetest.get_modpath("flint") ~= nil then
minetest.register_craft({
output = "dryplants:sickle",
recipe = {
{"flint:flintstone",""},
{"", "default:stick"},
{"default:stick",""}
}
})
end
if minetest.get_modpath("stoneage") ~= nil then
minetest.register_craft({
output = "dryplants:sickle",
recipe = {
{"stoneage:silex",""},
{"", "default:stick"},
{"default:stick",""}
}
})
end
-----------------------------------------------------------------------------------------------
-- Hay
-----------------------------------------------------------------------------------------------
--cooking
minetest.register_craft({
type = "cooking",
output = "dryplants:hay",
recipe = "dryplants:grass",
cooktime = 2,
})
minetest.register_craft({
type = "fuel",
recipe = "dryplants:hay",
burntime = 1,
})
-----------------------------------------------------------------------------------------------
-- Wet Reed
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- papyrus -> wetreed
output = "dryplants:wetreed 2",
recipe = {
{"default:papyrus","default:papyrus"},
{"default:papyrus","default:papyrus"},
}
})
minetest.register_craft({ -- reedmace_sapling -> wetreed
output = "dryplants:wetreed 2",
recipe = {
{"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
{"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
}
})
minetest.register_craft({ -- reedmace_top -> wetreed
output = "dryplants:wetreed 2",
recipe = {
{"dryplants:reedmace_top","dryplants:reedmace_top"},
{"dryplants:reedmace_top","dryplants:reedmace_top"},
}
})
minetest.register_craft({ -- reedmace -> wetreed
output = "dryplants:wetreed 2",
recipe = {
{"dryplants:reedmace","dryplants:reedmace"},
{"dryplants:reedmace","dryplants:reedmace"},
}
})
minetest.register_craft({ -- reedmace_bottom -> wetreed
output = "dryplants:wetreed 2",
recipe = {
{"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
{"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
}
})
local ReeD = {
{"wetreed"},
{"reed"}
}
for i in pairs(ReeD) do
local reed = "dryplants:"..ReeD[i][1]
local slab = reed.."_slab"
local roof = reed.."_roof"
local corner = roof.."_corner"
local corner_2 = corner.."_2"
-----------------------------------------------------------------------------------------------
-- Block
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- slab -> block
output = reed,
recipe = {
{slab},
{slab},
}
})
minetest.register_craft({ -- roof -> block
output = reed,
recipe = {
{roof},
{roof},
}
})
minetest.register_craft({ -- corner -> block
type = "shapeless",
output = reed.." 3",
recipe = {corner,corner,corner,corner,corner,corner,corner,corner}, -- 8x
})
minetest.register_craft({ -- corner_2 -> block
type = "shapeless",
output = reed.." 3",
recipe = {corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2}, -- 8x
})
-----------------------------------------------------------------------------------------------
-- Slab
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- block -> slab
output = slab.." 6",
recipe = {
{reed,reed,reed},
}
})
minetest.register_craft({ -- roof -> slab
output = slab,
recipe = {
{roof},
}
})
minetest.register_craft({ -- corner -> slab
output = slab.." 3",
recipe = {
{corner,corner},
{corner,corner},
}
})
minetest.register_craft({ -- corner_2 -> slab
output = slab.." 3",
recipe = {
{corner_2,corner_2},
{corner_2,corner_2},
}
})
-----------------------------------------------------------------------------------------------
-- Roof
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- block -> roof
output = roof.." 4",
recipe = {
{reed,""},
{"",reed},
}
})
minetest.register_craft({ -- block -> roof
output = roof.." 4",
recipe = {
{"",reed},
{reed,""},
}
})
minetest.register_craft({ -- slab -> roof
output = roof,
recipe = {
{slab},
}
})
-----------------------------------------------------------------------------------------------
-- Roof Corner
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- block -> corner
output = corner.." 8",
recipe = {
{"",reed,""},
{reed,"",reed},
}
})
minetest.register_craft({ -- corner_2 -> corner
output = corner,
recipe = {
{corner_2},
}
})
-----------------------------------------------------------------------------------------------
-- Roof Corner 2
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- block -> corner_2
output = corner_2.." 8",
recipe = {
{reed,"",reed},
{"",reed,""},
}
})
minetest.register_craft({ -- corner -> corner_2
output = corner_2,
recipe = {
{corner},
}
})
end
-----------------------------------------------------------------------------------------------
-- Reed
-----------------------------------------------------------------------------------------------
minetest.register_craft({ -- hay -> reed
output = "dryplants:reed 2",
recipe = {
{"dryplants:hay","dryplants:hay"},
{"dryplants:hay","dryplants:hay"},
}
})
--cooking
minetest.register_craft({ -- wetreed -> reed
type = "cooking",
output = "dryplants:reed",
recipe = "dryplants:wetreed",
cooktime = 2,
})
--fuel
minetest.register_craft({
type = "fuel",
recipe = "dryplants:reed",
burntime = 4,
})
-----------------------------------------------------------------------------------------------
-- Reed Slab
-----------------------------------------------------------------------------------------------
--cooking
minetest.register_craft({ -- wetreed_slab -> reed_slab
type = "cooking",
output = "dryplants:reed_slab",
recipe = "dryplants:wetreed_slab",
cooktime = 1,
})
--fuel
minetest.register_craft({
type = "fuel",
recipe = "dryplants:reed_slab",
burntime = 2,
})
-----------------------------------------------------------------------------------------------
-- Reed Roof
-----------------------------------------------------------------------------------------------
--cooking
minetest.register_craft({ -- wetreed_roof -> reed_roof
type = "cooking",
output = "dryplants:reed_roof",
recipe = "dryplants:wetreed_roof",
cooktime = 1,
})
--fuel
minetest.register_craft({
type = "fuel",
recipe = "dryplants:reed_roof",
burntime = 2,
})
-----------------------------------------------------------------------------------------------
-- Reed Roof Corner
-----------------------------------------------------------------------------------------------
--cooking
minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
type = "cooking",
output = "dryplants:reed_roof_corner",
recipe = "dryplants:wetreed_roof_corner",
cooktime = 1,
})
--fuel
minetest.register_craft({
type = "fuel",
recipe = "dryplants:reed_roof_corner",
burntime = 2,
})
-----------------------------------------------------------------------------------------------
-- Wet Reed Roof Corner 2
-----------------------------------------------------------------------------------------------
--cooking
minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
type = "cooking",
output = "dryplants:reed_roof_corner_2",
recipe = "dryplants:wetreed_roof_corner_2",
cooktime = 1,
})
--fuel
minetest.register_craft({
type = "fuel",
recipe = "dryplants:reed_roof_corner_2",
burntime = 2,
})
-----------------------------------------------------------------------------------------------
-- Dandelion Leave
-----------------------------------------------------------------------------------------------
--[[minetest.register_craftitem("dryplants:dandelion_leave", {
description = "Dandelion Leave",
inventory_image = "dryplants_dandelion_leave.png",
on_use = minetest.item_eat(1),
})
minetest.register_craft({
type = "shapeless",
output = "dryplants:dandelion_leave 4",
recipe = {"flowers:dandelion_yellow"},
replacements = {
{"flowers:dandelion_yellow", "dye:yellow"}
},
})]]

View File

@ -1,206 +1,206 @@
-----------------------------------------------------------------------------------------------
local title = "Grasses" -- former "Dry plants"
local version = "0.1.5"
local mname = "dryplants"
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- textures & ideas partly by Neuromancer
-- License (everything): WTFPL
-- Contains code from: default, farming
-- Looked at code from: darkage, sickle, stairs
-- Dependencies: default, farming, biome_lib
-- Supports:
-----------------------------------------------------------------------------------------------
abstract_dryplants = {}
-- support for i18n
local S = plantlife_i18n.gettext
dofile(minetest.get_modpath("dryplants").."/crafting.lua")
dofile(minetest.get_modpath("dryplants").."/settings.txt")
dofile(minetest.get_modpath("dryplants").."/reed.lua")
if REEDMACE_GENERATES == true then
dofile(minetest.get_modpath("dryplants").."/reedmace.lua")
end
if SMALL_JUNCUS_GENERATES == true then
dofile(minetest.get_modpath("dryplants").."/juncus.lua")
end
if EXTRA_TALL_GRASS_GENERATES == true then
dofile(minetest.get_modpath("dryplants").."/moregrass.lua")
end
--dofile(minetest.get_modpath("dryplants").."/meadowvariation.lua")
-----------------------------------------------------------------------------------------------
-- Sickle
-----------------------------------------------------------------------------------------------
local function sickle_can_break(pos, deff, player)
local def = ItemStack({name=deff.name}):get_definition()
if not def.diggable or (def.can_dig and not def.can_dig(pos,player)) then
minetest.log("info", player:get_player_name() .. " tried to sickle "
.. def.name .. " which is not diggable "
.. minetest.pos_to_string(pos))
return
end
if minetest.is_protected(pos, player:get_player_name()) then
minetest.log("action", player:get_player_name()
.. " tried to sickle " .. def.name
.. " at protected position "
.. minetest.pos_to_string(pos))
minetest.record_protection_violation(pos, player:get_player_name())
return
end
return true
end
-- turns nodes with group flora=1 & flower=0 into cut grass
local function sickle_on_use(itemstack, user, pointed_thing, uses)
local pt = pointed_thing
-- check if pointing at a node
if not pt then
return
end
if pt.type ~= "node" then
return
end
local under = minetest.get_node(pt.under)
local above_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
local above = minetest.get_node(above_pos)
-- return if any of the nodes is not registered
if not minetest.registered_nodes[under.name] then
return
end
if not minetest.registered_nodes[above.name] then
return
end
if not sickle_can_break(pt.under, under, user) then
return
end
-- check if something that can be cut using fine tools
if minetest.get_item_group(under.name, "snappy") > 0 then
-- check if flora but no flower
if minetest.get_item_group(under.name, "flora") == 1 and minetest.get_item_group(under.name, "flower") == 0 then
-- turn the node into cut grass, wear out item and play sound
minetest.set_node(pt.under, {name="dryplants:grass"})
else -- otherwise dig the node
if not minetest.node_dig(pt.under, under, user) then
return
end
end
minetest.sound_play("default_dig_crumbly", {
pos = pt.under,
gain = 0.5,
})
itemstack:add_wear(65535/(uses-1))
return itemstack
elseif string.find(under.name, "default:dirt_with_grass") then
if minetest.is_protected(above_pos, user:get_player_name()) or above.name ~= "air" then
return
end
minetest.set_node(pt.under, {name="dryplants:grass_short"})
minetest.set_node(above_pos, {name="dryplants:grass"})
minetest.sound_play("default_dig_crumbly", {
pos = pt.under,
gain = 0.5,
})
itemstack:add_wear(65535/(uses-1))
return itemstack
end
end
-- the tool
minetest.register_tool("dryplants:sickle", {
description = S("Sickle"),
inventory_image = "dryplants_sickle.png",
on_use = function(itemstack, user, pointed_thing)
return sickle_on_use(itemstack, user, pointed_thing, 220)
end,
})
-----------------------------------------------------------------------------------------------
-- Cut Grass
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:grass", {
description = S("Cut Grass"),
inventory_image = "dryplants_grass.png",
wield_image = "dryplants_grass.png",
paramtype = "light",
sunlight_propagates = true,
tiles = {"dryplants_grass.png"},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5 , -0.5 , -0.5 , 0.5 , -0.4375, 0.5 },
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Cut Grass becomes Hay over time
-----------------------------------------------------------------------------------------------
minetest.register_abm({
nodenames = {"dryplants:grass"},
interval = HAY_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
chance = 1,
action = function(pos)
minetest.set_node(pos, {name="dryplants:hay"})
end,
})
-----------------------------------------------------------------------------------------------
-- Hay
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:hay", {
description = S("Hay"),
inventory_image = "dryplants_hay.png",
wield_image = "dryplants_hay.png",
paramtype = "light",
sunlight_propagates = true,
tiles = {"dryplants_hay.png"},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5 , -0.5 , -0.5 , 0.5 , -0.4375, 0.5 },
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Short Grass
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:grass_short", {
description = S("Short Grass"),
tiles = {"default_grass.png^dryplants_grass_short.png", "default_dirt.png", "default_dirt.png^default_grass_side.png^dryplants_grass_short_side.png"},
is_ground_content = true,
groups = {crumbly=3,soil=1,not_in_creative_inventory=1},
--drop = 'default:dirt',
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
-----------------------------------------------------------------------------------------------
-- Short Grass becomes Dirt with Grass over time
-----------------------------------------------------------------------------------------------
minetest.register_abm({
nodenames = {"dryplants:grass_short"},
interval = GRASS_REGROWING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
chance = 100/GRASS_REGROWING_CHANCE,
action = function(pos)
-- Only become dirt with grass if no cut grass or hay lies on top
local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
if above.name ~= "dryplants:grass" and above.name ~= "dryplants:hay" then
minetest.set_node(pos, {name="default:dirt_with_grass"})
end
end,
})
-----------------------------------------------------------------------------------------------
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
local title = "Grasses" -- former "Dry plants"
local version = "0.1.5"
local mname = "dryplants"
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- textures & ideas partly by Neuromancer
-- License (everything): WTFPL
-- Contains code from: default, farming
-- Looked at code from: darkage, sickle, stairs
-- Dependencies: default, farming, biome_lib
-- Supports:
-----------------------------------------------------------------------------------------------
abstract_dryplants = {}
-- support for i18n
local S = plantlife_i18n.gettext
dofile(minetest.get_modpath("dryplants").."/crafting.lua")
dofile(minetest.get_modpath("dryplants").."/settings.txt")
dofile(minetest.get_modpath("dryplants").."/reed.lua")
if REEDMACE_GENERATES == true then
dofile(minetest.get_modpath("dryplants").."/reedmace.lua")
end
if SMALL_JUNCUS_GENERATES == true then
dofile(minetest.get_modpath("dryplants").."/juncus.lua")
end
if EXTRA_TALL_GRASS_GENERATES == true then
dofile(minetest.get_modpath("dryplants").."/moregrass.lua")
end
--dofile(minetest.get_modpath("dryplants").."/meadowvariation.lua")
-----------------------------------------------------------------------------------------------
-- Sickle
-----------------------------------------------------------------------------------------------
local function sickle_can_break(pos, deff, player)
local def = ItemStack({name=deff.name}):get_definition()
if not def.diggable or (def.can_dig and not def.can_dig(pos,player)) then
minetest.log("info", player:get_player_name() .. " tried to sickle "
.. def.name .. " which is not diggable "
.. minetest.pos_to_string(pos))
return
end
if minetest.is_protected(pos, player:get_player_name()) then
minetest.log("action", player:get_player_name()
.. " tried to sickle " .. def.name
.. " at protected position "
.. minetest.pos_to_string(pos))
minetest.record_protection_violation(pos, player:get_player_name())
return
end
return true
end
-- turns nodes with group flora=1 & flower=0 into cut grass
local function sickle_on_use(itemstack, user, pointed_thing, uses)
local pt = pointed_thing
-- check if pointing at a node
if not pt then
return
end
if pt.type ~= "node" then
return
end
local under = minetest.get_node(pt.under)
local above_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
local above = minetest.get_node(above_pos)
-- return if any of the nodes is not registered
if not minetest.registered_nodes[under.name] then
return
end
if not minetest.registered_nodes[above.name] then
return
end
if not sickle_can_break(pt.under, under, user) then
return
end
-- check if something that can be cut using fine tools
if minetest.get_item_group(under.name, "snappy") > 0 then
-- check if flora but no flower
if minetest.get_item_group(under.name, "flora") == 1 and minetest.get_item_group(under.name, "flower") == 0 then
-- turn the node into cut grass, wear out item and play sound
minetest.set_node(pt.under, {name="dryplants:grass"})
else -- otherwise dig the node
if not minetest.node_dig(pt.under, under, user) then
return
end
end
minetest.sound_play("default_dig_crumbly", {
pos = pt.under,
gain = 0.5,
})
itemstack:add_wear(65535/(uses-1))
return itemstack
elseif string.find(under.name, "default:dirt_with_grass") then
if minetest.is_protected(above_pos, user:get_player_name()) or above.name ~= "air" then
return
end
minetest.set_node(pt.under, {name="dryplants:grass_short"})
minetest.set_node(above_pos, {name="dryplants:grass"})
minetest.sound_play("default_dig_crumbly", {
pos = pt.under,
gain = 0.5,
})
itemstack:add_wear(65535/(uses-1))
return itemstack
end
end
-- the tool
minetest.register_tool("dryplants:sickle", {
description = S("Sickle"),
inventory_image = "dryplants_sickle.png",
on_use = function(itemstack, user, pointed_thing)
return sickle_on_use(itemstack, user, pointed_thing, 220)
end,
})
-----------------------------------------------------------------------------------------------
-- Cut Grass
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:grass", {
description = S("Cut Grass"),
inventory_image = "dryplants_grass.png",
wield_image = "dryplants_grass.png",
paramtype = "light",
sunlight_propagates = true,
tiles = {"dryplants_grass.png"},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5 , -0.5 , -0.5 , 0.5 , -0.4375, 0.5 },
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Cut Grass becomes Hay over time
-----------------------------------------------------------------------------------------------
minetest.register_abm({
nodenames = {"dryplants:grass"},
interval = HAY_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
chance = 1,
action = function(pos)
minetest.set_node(pos, {name="dryplants:hay"})
end,
})
-----------------------------------------------------------------------------------------------
-- Hay
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:hay", {
description = S("Hay"),
inventory_image = "dryplants_hay.png",
wield_image = "dryplants_hay.png",
paramtype = "light",
sunlight_propagates = true,
tiles = {"dryplants_hay.png"},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5 , -0.5 , -0.5 , 0.5 , -0.4375, 0.5 },
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Short Grass
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:grass_short", {
description = S("Short Grass"),
tiles = {"default_grass.png^dryplants_grass_short.png", "default_dirt.png", "default_dirt.png^default_grass_side.png^dryplants_grass_short_side.png"},
is_ground_content = true,
groups = {crumbly=3,soil=1,not_in_creative_inventory=1},
--drop = 'default:dirt',
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
-----------------------------------------------------------------------------------------------
-- Short Grass becomes Dirt with Grass over time
-----------------------------------------------------------------------------------------------
minetest.register_abm({
nodenames = {"dryplants:grass_short"},
interval = GRASS_REGROWING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
chance = 100/GRASS_REGROWING_CHANCE,
action = function(pos)
-- Only become dirt with grass if no cut grass or hay lies on top
local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
if above.name ~= "dryplants:grass" and above.name ~= "dryplants:hay" then
minetest.set_node(pos, {name="default:dirt_with_grass"})
end
end,
})
-----------------------------------------------------------------------------------------------
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
-----------------------------------------------------------------------------------------------

View File

@ -4,8 +4,8 @@
-- by Mossmanikin
-- textures & ideas partly by Neuromancer
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at code from: default
-----------------------------------------------------------------------------------------------

View File

@ -3,9 +3,9 @@
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at code from: default
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at code from: default
-----------------------------------------------------------------------------------------------
abstract_dryplants.grow_grass_variation = function(pos)

View File

@ -1,33 +1,33 @@
-----------------------------------------------------------------------------------------------
-- Grasses - More Tall Grass 0.0.2
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at code from: default
-----------------------------------------------------------------------------------------------
abstract_dryplants.grow_grass = function(pos)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
local grass_size = math.random(1,5)
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
or minetest.get_node(right_here).name == "default:junglegrass" then
minetest.set_node(right_here, {name="default:grass_"..grass_size})
end
end
biome_lib:register_generate_plant({
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,
},
abstract_dryplants.grow_grass
)
-----------------------------------------------------------------------------------------------
-- Grasses - More Tall Grass 0.0.2
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at code from: default
-----------------------------------------------------------------------------------------------
abstract_dryplants.grow_grass = function(pos)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
local grass_size = math.random(1,5)
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
or minetest.get_node(right_here).name == "default:junglegrass" then
minetest.set_node(right_here, {name="default:grass_"..grass_size})
end
end
biome_lib:register_generate_plant({
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,
},
abstract_dryplants.grow_grass
)

View File

@ -1,383 +1,383 @@
-----------------------------------------------------------------------------------------------
-- Dry Plants - Reed 0.0.5
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): WTFPL
-- Looked at code from: darkage, default, stairs
-- Dependencies: default
-----------------------------------------------------------------------------------------------
-- support for i18n
local S = plantlife_i18n.gettext
minetest.register_alias("stairs:stair_wetreed", "dryplants:wetreed_roof")
minetest.register_alias("stairs:slab_wetreed", "dryplants:wetreed_slab")
minetest.register_alias("stairs:stair_reed", "dryplants:reed_roof")
minetest.register_alias("stairs:slab_reed", "dryplants:reed_slab")
-----------------------------------------------------------------------------------------------
-- Wet Reed
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed", {
description = S("Wet Reed"),
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed_wet.png"},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Wet Reed Slab
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed_slab", {
description = S("Wet Reed Slab"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed_wet.png"},
node_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
},
selection_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Wet Reed Roof
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed_roof", {
description = S("Wet Reed Roof"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed_wet.png"},
node_box = {
type = "fixed",
-- { left , bottom , front , right , top , back }
fixed = {
{-1/2, 0, 0, 1/2, 1/2, 1/2},
{-1/2, -1/2, -1/2, 1/2, 0, 0},
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/2, 0, 0, 1/2, 1/2, 1/2},
{-1/2, -1/2, -1/2, 1/2, 0, 0},
}
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
if AUTO_ROOF_CORNER == true then
local CoRNeR = {
-- MaTeRiaL
{"wetreed"},
{"reed"}
}
for i in pairs(CoRNeR) do
local MaTeRiaL = CoRNeR[i][1]
local roof = "dryplants:"..MaTeRiaL.."_roof"
local corner = "dryplants:"..MaTeRiaL.."_roof_corner"
local corner_2 = "dryplants:"..MaTeRiaL.."_roof_corner_2"
minetest.register_abm({
nodenames = {roof},
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})
local node_south = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1})
-- corner 1
if ((node_west.name == roof and node_west.param2 == 0)
or (node_west.name == corner and node_west.param2 == 1))
and ((node_north.name == roof and node_north.param2 == 3)
or (node_north.name == corner and node_north.param2 == 3))
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)
or (node_east.name == corner and node_east.param2 == 0))
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)
or (node_south.name == corner and node_south.param2 == 1))
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)
or (node_west.name == corner and node_west.param2 == 2))
then
minetest.set_node(pos, {name=corner, param2=3})
end
-- corner 2
if ((node_west.name == roof and node_west.param2 == 2)
or (node_west.name == corner_2 and node_west.param2 == 1))
and ((node_north.name == roof and node_north.param2 == 1)
or (node_north.name == corner_2 and node_north.param2 == 3))
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)
or (node_east.name == corner_2 and node_east.param2 == 0))
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)
or (node_south.name == corner_2 and node_south.param2 == 1))
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)
or (node_west.name == corner_2 and node_west.param2 == 2))
then
minetest.set_node(pos, {name=corner_2, param2=3})
end
end,
})
end
end
-----------------------------------------------------------------------------------------------
-- Wet Reed Roof Corner
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed_roof_corner", {
description = S("Wet Reed Roof Corner"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed_wet.png"},
node_box = {
type = "fixed",
-- { left , bottom , front , right , top , back }
fixed = {
{-1/2, 0, 0, 0, 1/2, 1/2},
{0, -1/2, 0, 1/2, 0, 1/2},
{-1/2, -1/2, -1/2, 0, 0, 0},
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/2, 0, 0, 0, 1/2, 1/2},
{0, -1/2, 0, 1/2, 0, 1/2},
{-1/2, -1/2, -1/2, 0, 0, 0},
}
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Wet Reed Roof Corner 2
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed_roof_corner_2", {
description = S("Wet Reed Roof Corner 2"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed_wet.png"},
node_box = {
type = "fixed",
-- { left , bottom , front , right , top , back }
fixed = {
{-1/2, -1/2, 0, 0, 0, 1/2},
{0, 0, 0, 1/2, 1/2, 1/2},
{-1/2, 0, -1/2, 0, 1/2, 0},
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/2, -1/2, 0, 0, 0, 1/2},
{0, 0, 0, 1/2, 1/2, 1/2},
{-1/2, 0, -1/2, 0, 1/2, 0},
}
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Wet Reed becomes (dry) Reed over time
-----------------------------------------------------------------------------------------------
if REED_WILL_DRY == true then
local DRyiNG = {
-- WeT DRy
{"dryplants:wetreed", "dryplants:reed"},
{"dryplants:wetreed_slab", "dryplants:reed_slab"},
{"dryplants:wetreed_roof", "dryplants:reed_roof"},
{"dryplants:wetreed_roof_corner", "dryplants:reed_roof_corner"},
{"dryplants:wetreed_roof_corner_2", "dryplants:reed_roof_corner_2"}
}
for i in pairs(DRyiNG) do
local WeT = DRyiNG[i][1]
local DRy = DRyiNG[i][2]
minetest.register_abm({
nodenames = {WeT},
interval = REED_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
chance = 1,
action = function(pos)
local direction = minetest.get_node(pos).param2
minetest.set_node(pos, {name=DRy, param2=direction})
end,
})
end
end
-----------------------------------------------------------------------------------------------
-- Reed
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed", {
description = S("Reed"),
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed.png"},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Reed Slab
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed_slab", {
description = S("Reed Slab"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed.png"},
node_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
},
selection_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Reed Roof
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed_roof", {
description = S("Reed Roof"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed.png"},
node_box = {
type = "fixed",
-- { left , bottom , front , right , top , back }
fixed = {
{-1/2, 0, 0, 1/2, 1/2, 1/2},
{-1/2, -1/2, -1/2, 1/2, 0, 0},
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/2, 0, 0, 1/2, 1/2, 1/2},
{-1/2, -1/2, -1/2, 1/2, 0, 0},
}
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Reed Roof Corner
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed_roof_corner", {
description = S("Reed Roof Corner"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed.png"},
node_box = {
type = "fixed",
-- { left , bottom , front , right , top , back }
fixed = {
{-1/2, 0, 0, 0, 1/2, 1/2},
{0, -1/2, 0, 1/2, 0, 1/2},
{-1/2, -1/2, -1/2, 0, 0, 0},
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/2, 0, 0, 0, 1/2, 1/2},
{0, -1/2, 0, 1/2, 0, 1/2},
{-1/2, -1/2, -1/2, 0, 0, 0},
}
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Reed Roof Corner 2
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed_roof_corner_2", {
description = S("Reed Roof Corner 2"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed.png"},
node_box = {
type = "fixed",
-- { left , bottom , front , right , top , back }
fixed = {
{-1/2, -1/2, 0, 0, 0, 1/2},
{0, 0, 0, 1/2, 1/2, 1/2},
{-1/2, 0, -1/2, 0, 1/2, 0},
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/2, -1/2, 0, 0, 0, 1/2},
{0, 0, 0, 1/2, 1/2, 1/2},
{-1/2, 0, -1/2, 0, 1/2, 0},
}
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Dry Plants - Reed 0.0.5
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): WTFPL
-- Looked at code from: darkage, default, stairs
-- Dependencies: default
-----------------------------------------------------------------------------------------------
-- support for i18n
local S = plantlife_i18n.gettext
minetest.register_alias("stairs:stair_wetreed", "dryplants:wetreed_roof")
minetest.register_alias("stairs:slab_wetreed", "dryplants:wetreed_slab")
minetest.register_alias("stairs:stair_reed", "dryplants:reed_roof")
minetest.register_alias("stairs:slab_reed", "dryplants:reed_slab")
-----------------------------------------------------------------------------------------------
-- Wet Reed
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed", {
description = S("Wet Reed"),
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed_wet.png"},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Wet Reed Slab
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed_slab", {
description = S("Wet Reed Slab"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed_wet.png"},
node_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
},
selection_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Wet Reed Roof
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed_roof", {
description = S("Wet Reed Roof"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed_wet.png"},
node_box = {
type = "fixed",
-- { left , bottom , front , right , top , back }
fixed = {
{-1/2, 0, 0, 1/2, 1/2, 1/2},
{-1/2, -1/2, -1/2, 1/2, 0, 0},
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/2, 0, 0, 1/2, 1/2, 1/2},
{-1/2, -1/2, -1/2, 1/2, 0, 0},
}
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
if AUTO_ROOF_CORNER == true then
local CoRNeR = {
-- MaTeRiaL
{"wetreed"},
{"reed"}
}
for i in pairs(CoRNeR) do
local MaTeRiaL = CoRNeR[i][1]
local roof = "dryplants:"..MaTeRiaL.."_roof"
local corner = "dryplants:"..MaTeRiaL.."_roof_corner"
local corner_2 = "dryplants:"..MaTeRiaL.."_roof_corner_2"
minetest.register_abm({
nodenames = {roof},
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})
local node_south = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1})
-- corner 1
if ((node_west.name == roof and node_west.param2 == 0)
or (node_west.name == corner and node_west.param2 == 1))
and ((node_north.name == roof and node_north.param2 == 3)
or (node_north.name == corner and node_north.param2 == 3))
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)
or (node_east.name == corner and node_east.param2 == 0))
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)
or (node_south.name == corner and node_south.param2 == 1))
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)
or (node_west.name == corner and node_west.param2 == 2))
then
minetest.set_node(pos, {name=corner, param2=3})
end
-- corner 2
if ((node_west.name == roof and node_west.param2 == 2)
or (node_west.name == corner_2 and node_west.param2 == 1))
and ((node_north.name == roof and node_north.param2 == 1)
or (node_north.name == corner_2 and node_north.param2 == 3))
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)
or (node_east.name == corner_2 and node_east.param2 == 0))
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)
or (node_south.name == corner_2 and node_south.param2 == 1))
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)
or (node_west.name == corner_2 and node_west.param2 == 2))
then
minetest.set_node(pos, {name=corner_2, param2=3})
end
end,
})
end
end
-----------------------------------------------------------------------------------------------
-- Wet Reed Roof Corner
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed_roof_corner", {
description = S("Wet Reed Roof Corner"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed_wet.png"},
node_box = {
type = "fixed",
-- { left , bottom , front , right , top , back }
fixed = {
{-1/2, 0, 0, 0, 1/2, 1/2},
{0, -1/2, 0, 1/2, 0, 1/2},
{-1/2, -1/2, -1/2, 0, 0, 0},
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/2, 0, 0, 0, 1/2, 1/2},
{0, -1/2, 0, 1/2, 0, 1/2},
{-1/2, -1/2, -1/2, 0, 0, 0},
}
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Wet Reed Roof Corner 2
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:wetreed_roof_corner_2", {
description = S("Wet Reed Roof Corner 2"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed_wet.png"},
node_box = {
type = "fixed",
-- { left , bottom , front , right , top , back }
fixed = {
{-1/2, -1/2, 0, 0, 0, 1/2},
{0, 0, 0, 1/2, 1/2, 1/2},
{-1/2, 0, -1/2, 0, 1/2, 0},
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/2, -1/2, 0, 0, 0, 1/2},
{0, 0, 0, 1/2, 1/2, 1/2},
{-1/2, 0, -1/2, 0, 1/2, 0},
}
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Wet Reed becomes (dry) Reed over time
-----------------------------------------------------------------------------------------------
if REED_WILL_DRY == true then
local DRyiNG = {
-- WeT DRy
{"dryplants:wetreed", "dryplants:reed"},
{"dryplants:wetreed_slab", "dryplants:reed_slab"},
{"dryplants:wetreed_roof", "dryplants:reed_roof"},
{"dryplants:wetreed_roof_corner", "dryplants:reed_roof_corner"},
{"dryplants:wetreed_roof_corner_2", "dryplants:reed_roof_corner_2"}
}
for i in pairs(DRyiNG) do
local WeT = DRyiNG[i][1]
local DRy = DRyiNG[i][2]
minetest.register_abm({
nodenames = {WeT},
interval = REED_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle
chance = 1,
action = function(pos)
local direction = minetest.get_node(pos).param2
minetest.set_node(pos, {name=DRy, param2=direction})
end,
})
end
end
-----------------------------------------------------------------------------------------------
-- Reed
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed", {
description = S("Reed"),
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed.png"},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Reed Slab
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed_slab", {
description = S("Reed Slab"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed.png"},
node_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
},
selection_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2},
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Reed Roof
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed_roof", {
description = S("Reed Roof"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed.png"},
node_box = {
type = "fixed",
-- { left , bottom , front , right , top , back }
fixed = {
{-1/2, 0, 0, 1/2, 1/2, 1/2},
{-1/2, -1/2, -1/2, 1/2, 0, 0},
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/2, 0, 0, 1/2, 1/2, 1/2},
{-1/2, -1/2, -1/2, 1/2, 0, 0},
}
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Reed Roof Corner
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed_roof_corner", {
description = S("Reed Roof Corner"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed.png"},
node_box = {
type = "fixed",
-- { left , bottom , front , right , top , back }
fixed = {
{-1/2, 0, 0, 0, 1/2, 1/2},
{0, -1/2, 0, 1/2, 0, 1/2},
{-1/2, -1/2, -1/2, 0, 0, 0},
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/2, 0, 0, 0, 1/2, 1/2},
{0, -1/2, 0, 1/2, 0, 1/2},
{-1/2, -1/2, -1/2, 0, 0, 0},
}
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})
-----------------------------------------------------------------------------------------------
-- Reed Roof Corner 2
-----------------------------------------------------------------------------------------------
minetest.register_node("dryplants:reed_roof_corner_2", {
description = S("Reed Roof Corner 2"),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"dryplants_reed.png"},
node_box = {
type = "fixed",
-- { left , bottom , front , right , top , back }
fixed = {
{-1/2, -1/2, 0, 0, 0, 1/2},
{0, 0, 0, 1/2, 1/2, 1/2},
{-1/2, 0, -1/2, 0, 1/2, 0},
}
},
selection_box = {
type = "fixed",
fixed = {
{-1/2, -1/2, 0, 0, 0, 1/2},
{0, 0, 0, 1/2, 1/2, 1/2},
{-1/2, 0, -1/2, 0, 1/2, 0},
}
},
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
})

View File

@ -4,8 +4,8 @@
-- by Mossmanikin
-- textures & ideas partly by Neuromancer
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at code from: default, trees
-----------------------------------------------------------------------------------------------
@ -280,9 +280,9 @@ minetest.register_abm({
chance = 100/REEDMACE_GROWING_CHANCE,
action = function(pos, node, _, _)
if string.find(minetest.get_node({x = pos.x + 1, y = pos.y, z = pos.z }).name, "default:water")
or string.find(minetest.get_node({x = pos.x, y = pos.y, z = pos.z + 1}).name, "default:water")
or string.find(minetest.get_node({x = pos.x, y = pos.y, z = pos.z + 1}).name, "default:water")
or string.find(minetest.get_node({x = pos.x - 1, y = pos.y, z = pos.z }).name, "default:water")
or string.find(minetest.get_node({x = pos.x, y = pos.y, z = pos.z - 1}).name, "default:water") then
or string.find(minetest.get_node({x = pos.x, y = pos.y, z = pos.z - 1}).name, "default:water") then
if minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name == "air" then
abstract_dryplants.grow_reedmace_water({x = pos.x, y = pos.y - 1, z = pos.z})
end

View File

@ -1,105 +1,110 @@
-- support for i18n
local S = plantlife_i18n.gettext
-----------------------------------------------------------------------------------------------
-- Ferns - Crafting 0.0.5
-----------------------------------------------------------------------------------------------
-- (by Mossmanikin)
-- License (everything): WTFPL
-----------------------------------------------------------------------------------------------
minetest.register_craft({
type = "shapeless",
output = "ferns:fiddlehead 3",
recipe = {"ferns:fern_01"},
replacements = {
{"ferns:fern_01", "ferns:ferntuber"}
},
})
minetest.register_craft({
type = "shapeless",
output = "ferns:fiddlehead 3",
recipe = {"ferns:tree_fern_leaves"},
replacements = {
{"ferns:tree_fern_leaves", "ferns:sapling_tree_fern"}
},
})
-----------------------------------------------------------------------------------------------
-- FIDDLEHEAD
-----------------------------------------------------------------------------------------------
minetest.register_alias("archaeplantae:fiddlehead", "ferns:fiddlehead")
minetest.register_craftitem("ferns:fiddlehead", {
description = S("Fiddlehead"),
inventory_image = "ferns_fiddlehead.png",
on_use = minetest.item_eat(-1), -- slightly poisonous when raw
})
minetest.register_craft({
type = "cooking",
output = "ferns:fiddlehead_roasted",
recipe = "ferns:fiddlehead",
cooktime = 1,
})
minetest.register_craftitem("ferns:fiddlehead_roasted", {
description = S("Roasted Fiddlehead"),
inventory_image = "ferns_fiddlehead_roasted.png",
on_use = minetest.item_eat(1), -- edible when cooked
})
-----------------------------------------------------------------------------------------------
-- FERN TUBER
-----------------------------------------------------------------------------------------------
minetest.register_alias("archaeplantae:ferntuber", "ferns:ferntuber")
minetest.register_craftitem("ferns:ferntuber", {
description = S("Fern Tuber"),
inventory_image = "ferns_ferntuber.png",
})
minetest.register_craft({
type = "cooking",
output = "ferns:ferntuber_roasted",
recipe = "ferns:ferntuber",
cooktime = 3,
})
minetest.register_alias("archaeplantae:ferntuber_roasted", "ferns:ferntuber_roasted")
minetest.register_craftitem("ferns:ferntuber_roasted", {
description = S("Roasted Fern Tuber"),
inventory_image = "ferns_ferntuber_roasted.png",
on_use = minetest.item_eat(3),
})
-----------------------------------------------------------------------------------------------
-- HORSETAIL (EQUISETUM) --> GREEN DYE https://en.wikipedia.org/wiki/Equisetum
-----------------------------------------------------------------------------------------------
minetest.register_craft({
type = "shapeless",
output = "dye:green",
recipe = {"group:horsetail"},
})
-----------------------------------------------------------------------------------------------
-- GLUE WOODEN TOOLS with RESIN & POLISH them with HORSETAIL (planned)
-----------------------------------------------------------------------------------------------
--[[minetest.register_craft({
type = "shapeless",
output = "default:pick_wood",
recipe = {"default:pick_wood","group:horsetail","farming:string","default:stick"},
})
minetest.register_craft({
type = "shapeless",
output = "default:shovel_wood",
recipe = {"default:shovel_wood","group:horsetail","farming:string","default:stick"},
})
minetest.register_craft({
type = "shapeless",
output = "default:axe_wood",
recipe = {"default:axe_wood","group:horsetail","farming:string","default:stick"},
})
minetest.register_craft({
type = "shapeless",
output = "default:sword_wood",
recipe = {"default:sword_wood","group:horsetail","farming:string","default:stick"},
})
minetest.register_craft({
type = "shapeless",
output = "farming:hoe_wood",
recipe = {"farming:hoe_wood","group:horsetail","farming:string","default:stick"},
})]]
-- support for i18n
local S = plantlife_i18n.gettext
-----------------------------------------------------------------------------------------------
-- Ferns - Crafting 0.0.5
-----------------------------------------------------------------------------------------------
-- (by Mossmanikin)
-- License (everything): WTFPL
-----------------------------------------------------------------------------------------------
local fern1 = minetest.registered_items["default:fern_1"] or false
fern1 = (fern1 and fern1.name) or "ferns:fern_01"
minetest.register_craft({
type = "shapeless",
output = "ferns:fiddlehead 3",
recipe = {"ferns:fern_01"},
replacements = {
{fern1, "ferns:ferntuber"}
},
})
minetest.register_craft({
type = "shapeless",
output = "ferns:fiddlehead 3",
recipe = {"ferns:tree_fern_leaves"},
replacements = {
{"ferns:tree_fern_leaves", "ferns:sapling_tree_fern"}
},
})
-----------------------------------------------------------------------------------------------
-- FIDDLEHEAD
-----------------------------------------------------------------------------------------------
minetest.register_alias("archaeplantae:fiddlehead", "ferns:fiddlehead")
minetest.register_craftitem("ferns:fiddlehead", {
description = S("Fiddlehead"),
inventory_image = "ferns_fiddlehead.png",
on_use = minetest.item_eat(-1), -- slightly poisonous when raw
})
minetest.register_craft({
type = "cooking",
output = "ferns:fiddlehead_roasted",
recipe = "ferns:fiddlehead",
cooktime = 1,
})
minetest.register_craftitem("ferns:fiddlehead_roasted", {
description = S("Roasted Fiddlehead"),
inventory_image = "ferns_fiddlehead_roasted.png",
on_use = minetest.item_eat(1), -- edible when cooked
})
-----------------------------------------------------------------------------------------------
-- FERN TUBER
-----------------------------------------------------------------------------------------------
minetest.register_alias("archaeplantae:ferntuber", "ferns:ferntuber")
minetest.register_craftitem("ferns:ferntuber", {
description = S("Fern Tuber"),
inventory_image = "ferns_ferntuber.png",
})
minetest.register_craft({
type = "cooking",
output = "ferns:ferntuber_roasted",
recipe = "ferns:ferntuber",
cooktime = 3,
})
minetest.register_alias("archaeplantae:ferntuber_roasted", "ferns:ferntuber_roasted")
minetest.register_craftitem("ferns:ferntuber_roasted", {
description = S("Roasted Fern Tuber"),
inventory_image = "ferns_ferntuber_roasted.png",
on_use = minetest.item_eat(3),
})
-----------------------------------------------------------------------------------------------
-- HORSETAIL (EQUISETUM) --> GREEN DYE https://en.wikipedia.org/wiki/Equisetum
-----------------------------------------------------------------------------------------------
minetest.register_craft({
type = "shapeless",
output = "dye:green",
recipe = {"group:horsetail"},
})
-----------------------------------------------------------------------------------------------
-- GLUE WOODEN TOOLS with RESIN & POLISH them with HORSETAIL (planned)
-----------------------------------------------------------------------------------------------
--[[minetest.register_craft({
type = "shapeless",
output = "default:pick_wood",
recipe = {"default:pick_wood","group:horsetail","farming:string","default:stick"},
})
minetest.register_craft({
type = "shapeless",
output = "default:shovel_wood",
recipe = {"default:shovel_wood","group:horsetail","farming:string","default:stick"},
})
minetest.register_craft({
type = "shapeless",
output = "default:axe_wood",
recipe = {"default:axe_wood","group:horsetail","farming:string","default:stick"},
})
minetest.register_craft({
type = "shapeless",
output = "default:sword_wood",
recipe = {"default:sword_wood","group:horsetail","farming:string","default:stick"},
})
minetest.register_craft({
type = "shapeless",
output = "farming:hoe_wood",
recipe = {"farming:hoe_wood","group:horsetail","farming:string","default:stick"},
})]]

View File

@ -1,199 +1,216 @@
-----------------------------------------------------------------------------------------------
-- Ferns - Fern 0.1.0
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at code from: default, flowers, painting, trees
-- Dependencies: biome_lib
-- Supports: dryplants, stoneage, sumpf
-----------------------------------------------------------------------------------------------
-- some inspiration from here
-- https://en.wikipedia.org/wiki/Athyrium_yokoscense
-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
-----------------------------------------------------------------------------------------------
assert(abstract_ferns.config.enable_lady_fern == true)
-- support for i18n
local S = plantlife_i18n.gettext
-- Maintain backward compatibilty
minetest.register_alias("archaeplantae:fern", "ferns:fern_03")
minetest.register_alias("archaeplantae:fern_mid", "ferns:fern_02")
minetest.register_alias("archaeplantae:fern_small", "ferns:fern_01")
minetest.register_alias("ferns:fern_04", "ferns:fern_02") -- for placing
local nodenames = {}
local function create_nodes()
local images = { "ferns_fern.png", "ferns_fern_mid.png", "ferns_fern_big.png" }
local vscales = { 1, math.sqrt(8), math.sqrt(11) }
local descs = { S("Lady-fern (Athyrium)"), nil, nil }
for i = 1, 3 do
local node_on_place = nil
if i == 1 then
node_on_place = function(itemstack, placer, pointed_thing)
-- place a random fern
local stack = ItemStack("ferns:fern_0"..math.random(1,4))
local ret = minetest.item_place(stack, placer, pointed_thing)
return ItemStack("ferns:fern_01 "..itemstack:get_count()-(1-ret:get_count())) -- TODO FIXME?
end
end
nodenames[i] = "ferns:fern_"..string.format("%02d", i)
minetest.register_node(nodenames[i], {
description = descs[i] or (S("Lady-fern (Athyrium)").." " .. string.format("%02d", i)),
inventory_image = "ferns_fern.png",
drawtype = "plantlike",
visual_scale = vscales[i],
paramtype = "light",
tiles = { images[i] },
walkable = false,
buildable_to = true,
groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
},
drop = "ferns:fern_01",
on_place = node_on_place
})
end
end
-----------------------------------------------------------------------------------------------
-- Init
-----------------------------------------------------------------------------------------------
create_nodes()
-----------------------------------------------------------------------------------------------
-- Spawning
-----------------------------------------------------------------------------------------------
if abstract_ferns.config.lady_ferns_near_tree == true then
biome_lib:register_generate_plant({ -- near trees (woodlands)
surface = {
"default:dirt_with_grass",
"default:mossycobble",
"default:desert_sand",
"default:sand",
"default:jungletree",
"stoneage:grass_with_silex",
"sumpf:sumpf"
},
max_count = 30,
rarity = 62,--63,
min_elevation = 1, -- above sea level
near_nodes = {"group:tree"},
near_nodes_size = 3,--4,
near_nodes_vertical = 2,--3,
near_nodes_count = 1,
plantlife_limit = -0.9,
humidity_max = -1.0,
humidity_min = 0.4,
temp_max = -0.5, -- 55 °C (too hot?)
temp_min = 0.75, -- -12 °C
random_facedir = { 0, 179 },
},
nodenames
)
end
if abstract_ferns.config.lady_ferns_near_rock == true then
biome_lib:register_generate_plant({ -- near stone (mountains)
surface = {
"default:dirt_with_grass",
"default:mossycobble",
"group:falling_node",
--"default:jungletree",
"stoneage:grass_with_silex",
"sumpf:sumpf"
},
max_count = 35,
rarity = 40,
min_elevation = 1, -- above sea level
near_nodes = {"group:stone"},
near_nodes_size = 1,
near_nodes_count = 16,
plantlife_limit = -0.9,
humidity_max = -1.0,
humidity_min = 0.4,
temp_max = -0.5, -- 55 °C (too hot?)
temp_min = 0.75, -- -12 °C
random_facedir = { 0, 179 },
},
nodenames
)
end
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
biome_lib:register_generate_plant({ -- near ores (potential mining sites)
surface = {
"default:dirt_with_grass",
"default:mossycobble",
"default:stone_with_coal",
"default:stone_with_iron",
"moreores:mineral_tin",
"moreores:mineral_silver",
"sumpf:sumpf"
},
max_count = 1200,--1600, -- maybe too much? :D
rarity = 25,--15,
min_elevation = 1, -- above sea level
near_nodes = {
"default:stone_with_iron",
--"default:stone_with_copper",
--"default:stone_with_mese",
--"default:stone_with_gold",
--"default:stone_with_diamond",
"moreores:mineral_tin",
"moreores:mineral_silver"
--"moreores:mineral_mithril"
},
near_nodes_size = 2,
near_nodes_vertical = 4,--5,--6,
near_nodes_count = 2,--3,
plantlife_limit = -0.9,
humidity_max = -1.0,
humidity_min = 0.4,
temp_max = -0.5, -- 55 °C (too hot?)
temp_min = 0.75, -- -12 °C
random_facedir = { 0, 179 },
},
nodenames
)
end
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
"default:mossycobble",
"default:stone_with_coal",
"default:stone_with_iron",
"moreores:mineral_tin",
"moreores:mineral_silver",
"sumpf:sumpf"
},
max_count = 70,
rarity = 25,--15,
min_elevation = 1, -- above sea level
near_nodes = {
"default:stone"
},
near_nodes_size = 2,
near_nodes_vertical = 2,--6,
near_nodes_count = 3,
plantlife_limit = -0.9,
humidity_max = -1.0,
humidity_min = 0.4,
temp_max = -0.5, -- 55 °C (too hot?)
temp_min = 0.75, -- -12 °C
random_facedir = { 0, 179 },
},
nodenames
)
end
-----------------------------------------------------------------------------------------------
-- Ferns - Fern 0.1.0
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at code from: default, flowers, painting, trees
-- Dependencies: biome_lib
-- Supports: dryplants, stoneage, sumpf
-----------------------------------------------------------------------------------------------
-- some inspiration from here
-- https://en.wikipedia.org/wiki/Athyrium_yokoscense
-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
-----------------------------------------------------------------------------------------------
assert(abstract_ferns.config.enable_lady_fern == true)
-- support for i18n
local S = plantlife_i18n.gettext
-- Maintain backward compatibilty
-- minetest-0.5: Begin
local default_ferns = minetest.registered_items["default:fern_1"] or false
if default_ferns then
minetest.register_alias("ferns:fern_03", "default:fern_3")
minetest.register_alias("ferns:fern_02", "default:fern_2")
minetest.register_alias("ferns:fern_01", "default:fern_1")
end
-- minetest-0.5: End
minetest.register_alias("archaeplantae:fern", "ferns:fern_03")
minetest.register_alias("archaeplantae:fern_mid", "ferns:fern_02")
minetest.register_alias("archaeplantae:fern_small", "ferns:fern_01")
minetest.register_alias("ferns:fern_04", "ferns:fern_02") -- for placing
local nodenames = {}
local function create_nodes()
local images = { "ferns_fern.png", "ferns_fern_mid.png", "ferns_fern_big.png" }
local vscales = { 1, math.sqrt(8), math.sqrt(11) }
local descs = { S("Lady-fern (Athyrium)"), nil, nil }
for i = 1, 3 do
local node_on_place = nil
if i == 1 then
node_on_place = function(itemstack, placer, pointed_thing)
-- place a random fern
local stack = ItemStack("ferns:fern_0"..math.random(1,4))
local ret = minetest.item_place(stack, placer, pointed_thing)
return ItemStack("ferns:fern_01 "..itemstack:get_count()-(1-ret:get_count())) -- TODO FIXME?
end
end
nodenames[i] = "ferns:fern_"..string.format("%02d", i)
minetest.register_node(nodenames[i], {
description = descs[i] or (S("Lady-fern (Athyrium)").." " .. string.format("%02d", i)),
inventory_image = "ferns_fern.png",
drawtype = "plantlike",
visual_scale = vscales[i],
paramtype = "light",
tiles = { images[i] },
walkable = false,
buildable_to = true,
groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
},
drop = "ferns:fern_01",
on_place = node_on_place
})
end
end
-----------------------------------------------------------------------------------------------
-- Init
-----------------------------------------------------------------------------------------------
if default_ferns then
for i = 1, 3 do
nodenames[i] = "ferns:fern_"..string.format("%02d", i)
end
else
create_nodes()
end
-----------------------------------------------------------------------------------------------
-- Spawning
-----------------------------------------------------------------------------------------------
if abstract_ferns.config.lady_ferns_near_tree == true then
biome_lib:register_generate_plant({ -- near trees (woodlands)
surface = {
"default:dirt_with_grass",
"default:mossycobble",
"default:desert_sand",
"default:sand",
"default:jungletree",
"stoneage:grass_with_silex",
"sumpf:sumpf"
},
max_count = 30,
rarity = 62,--63,
min_elevation = 1, -- above sea level
near_nodes = {"group:tree"},
near_nodes_size = 3,--4,
near_nodes_vertical = 2,--3,
near_nodes_count = 1,
plantlife_limit = -0.9,
humidity_max = -1.0,
humidity_min = 0.4,
temp_max = -0.5, -- 55 °C (too hot?)
temp_min = 0.75, -- -12 °C
random_facedir = { 0, 179 },
},
nodenames
)
end
if abstract_ferns.config.lady_ferns_near_rock == true then
biome_lib:register_generate_plant({ -- near stone (mountains)
surface = {
"default:dirt_with_grass",
"default:mossycobble",
"group:falling_node",
--"default:jungletree",
"stoneage:grass_with_silex",
"sumpf:sumpf"
},
max_count = 35,
rarity = 40,
min_elevation = 1, -- above sea level
near_nodes = {"group:stone"},
near_nodes_size = 1,
near_nodes_count = 16,
plantlife_limit = -0.9,
humidity_max = -1.0,
humidity_min = 0.4,
temp_max = -0.5, -- 55 °C (too hot?)
temp_min = 0.75, -- -12 °C
random_facedir = { 0, 179 },
},
nodenames
)
end
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
biome_lib:register_generate_plant({ -- near ores (potential mining sites)
surface = {
"default:dirt_with_grass",
"default:mossycobble",
"default:stone_with_coal",
"default:stone_with_iron",
"default:stone_with_tin", -- minetest >= 0.4.16
"moreores:mineral_tin",
"moreores:mineral_silver",
"sumpf:sumpf"
},
max_count = 1200,--1600, -- maybe too much? :D
rarity = 25,--15,
min_elevation = 1, -- above sea level
near_nodes = {
"default:stone_with_iron",
--"default:stone_with_copper",
--"default:stone_with_mese",
--"default:stone_with_gold",
--"default:stone_with_diamond",
"default:stone_with_tin", -- minetest >= 0.4.16
"moreores:mineral_tin",
"moreores:mineral_silver"
--"moreores:mineral_mithril"
},
near_nodes_size = 2,
near_nodes_vertical = 4,--5,--6,
near_nodes_count = 2,--3,
plantlife_limit = -0.9,
humidity_max = -1.0,
humidity_min = 0.4,
temp_max = -0.5, -- 55 °C (too hot?)
temp_min = 0.75, -- -12 °C
random_facedir = { 0, 179 },
},
nodenames
)
end
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
"default:mossycobble",
"default:stone_with_coal",
"default:stone_with_iron",
"default:stone_with_tin", -- minetest >= 0.4.16
"moreores:mineral_tin",
"moreores:mineral_silver",
"sumpf:sumpf"
},
max_count = 70,
rarity = 25,--15,
min_elevation = 1, -- above sea level
near_nodes = {
"default:stone"
},
near_nodes_size = 2,
near_nodes_vertical = 2,--6,
near_nodes_count = 3,
plantlife_limit = -0.9,
humidity_max = -1.0,
humidity_min = 0.4,
temp_max = -0.5, -- 55 °C (too hot?)
temp_min = 0.75, -- -12 °C
random_facedir = { 0, 179 },
},
nodenames
)
end

View File

@ -2,8 +2,8 @@
-- Ferns - Giant Tree Fern 0.1.1
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at code from: 4seasons, default
-- Supports: vines
-----------------------------------------------------------------------------------------------
@ -297,6 +297,7 @@ if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
"default:sand",
"default:desert_sand"--,
--"dryplants:grass_short"
@ -330,7 +331,7 @@ if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
neighbors = {"default:desert_sand"},
ncount = 1,
min_elevation = 1,
near_nodes = {"default:water_source"},
near_nodes = {"default:water_source", "default:river_water_source"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,

View File

@ -2,10 +2,10 @@
-- Archae Plantae - Horsetail 0.0.5
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at code from: default, flowers, trees
-- Dependencies: biome_lib
-- Dependencies: biome_lib
-- Supports: dryplants, stoneage, sumpf
-----------------------------------------------------------------------------------------------
@ -82,6 +82,7 @@ if abstract_ferns.config.enable_horsetails_spawning == true then
spawn_chance = 400,
spawn_surfaces = {
"default:dirt_with_grass",
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
"default:desert_sand",
"default:sand",
"dryplants:grass_short",
@ -91,7 +92,7 @@ if abstract_ferns.config.enable_horsetails_spawning == true then
},
seed_diff = 329,
min_elevation = 1, -- above sea level
near_nodes = {"default:water_source","default:gravel"},
near_nodes = {"default:water_source","default:river_water_source","default:gravel"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,
@ -107,6 +108,7 @@ if abstract_ferns.config.enable_horsetails_on_grass == true then
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
"sumpf:sumpf"
},
max_count = 35,

View File

@ -1,10 +1,10 @@
-----------------------------------------------------------------------------------------------
local title = "Ferns" -- former "Archae Plantae"
local version = "0.2.0"
local version = "0.2.1"
local mname = "ferns" -- former "archaeplantae"
-----------------------------------------------------------------------------------------------
-- (by Mossmanikin)
-- License (everything): WTFPL
-- License (everything): WTFPL
-----------------------------------------------------------------------------------------------
abstract_ferns = {}

View File

@ -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).
@ -31,12 +31,12 @@ abstract_ferns.config.lady_ferns_in_groups = false -- this one is meant as a
--
-- Horsetails
abstract_ferns.config.enable_horsetails_spawning = false -- horsetails will grow in already explored areas, over time, near water or gravel
abstract_ferns.config.enable_horsetails_on_grass = true -- on dirt with grass and swamp (sumpf mod)
abstract_ferns.config.enable_horsetails_on_stones = true -- on gravel, mossy cobble and silex (stoneage mod)
abstract_ferns.config.enable_horsetails_on_grass = true -- on dirt with grass and swamp (sumpf mod)
abstract_ferns.config.enable_horsetails_on_stones = true -- on gravel, mossy cobble and silex (stoneage mod)
--
-- Tree_Fern
abstract_ferns.config.enable_treeferns_in_jungle = true
abstract_ferns.config.enable_treeferns_in_oases = true -- for oases and tropical beaches
abstract_ferns.config.enable_treeferns_in_oases = true -- for oases and tropical beaches
--
-- Giant_Tree_Fern
abstract_ferns.config.enable_giant_treeferns_in_jungle = true

View File

@ -2,8 +2,8 @@
-- Ferns - Tree Fern 0.1.1
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at code from: default , trees
-----------------------------------------------------------------------------------------------
@ -31,20 +31,14 @@ abstract_ferns.grow_tree_fern = function(pos)
local i = 1
local brk = false
while (i < size) do
print(minetest.get_node({x = pos.x, y = pos.y + i, z = pos.z}).name)
if minetest.get_node({x = pos.x, y = pos.y + i, z = pos.z}).name ~= "air" then
brk = true
print("break!")
break
end
print("set trunk node at:")
print(dump({x = pos.x, y = pos.y + i, z = pos.z}))
minetest.set_node({x = pos.x, y = pos.y + i, z = pos.z}, { name = "ferns:fern_trunk" })
i = i + 1
end
if not brk then
print("set crown node at:")
print(dump({x = pos.x, y = pos.y + i, z = pos.z}))
minetest.set_node({x = pos.x, y = pos.y + i - 1, z = pos.z}, { name = crown })
end
end
@ -189,6 +183,7 @@ if abstract_ferns.config.enable_treeferns_in_jungle == true then
biome_lib:register_generate_plant({
surface = {
"default:dirt_with_grass",
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
"default:sand",
"default:desert_sand",
},
@ -225,7 +220,7 @@ if abstract_ferns.config.enable_treeferns_in_oases == true then
neighbors = {"default:desert_sand"},
ncount = 1,
min_elevation = 1,
near_nodes = {"default:water_source"},
near_nodes = {"default:water_source","default:river_water_source"},
near_nodes_size = 2,
near_nodes_vertical = 1,
near_nodes_count = 1,

View File

@ -19,7 +19,7 @@ local sunflowers_rarity = 25
-- register the various rotations of waterlilies
local lilies_list = {
{ nil , nil , 1 },
{ nil , nil , 1 },
{ "225", "22.5" , 2 },
{ "45" , "45" , 3 },
{ "675", "67.5" , 4 },

View File

@ -1,6 +1,6 @@
-----------------------------------------------------------------------------------------------
local title = "Mole Hills"
local version = "0.0.3"
local version = "0.0.3"
local mname = "molehills"
-----------------------------------------------------------------------------------------------
-- Idea by Sokomine
@ -49,7 +49,7 @@ minetest.register_craft({ -- molehills --> dirt
-- GeNeRaTiNG
-----------------------------------------------------------------------------------------------
abstract_molehills.place_molehill = function(pos)
local right_here = {x=pos.x , y=pos.y+1, z=pos.z }
local right_here = {x=pos.x , y=pos.y+1, z=pos.z }
if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z }).name ~= "air"
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z }).name ~= "air"
and minetest.get_node({x=pos.x , y=pos.y, z=pos.z+1}).name ~= "air"

View File

@ -64,7 +64,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.set_node(pos, { name = nodename })

View File

@ -28,7 +28,11 @@ local can_tool_dig_node = function(nodename, toolcaps, toolname)
-- diggable: boolean, can this tool dig this node at all
-- time: float, time needed to dig with this tool
-- wear: int, number of wear points to inflict on the item
local nodegroups = minetest.registered_nodes[nodename].groups
local nodedef = minetest.registered_nodes[nodename]
-- don't explode due to nil def in event of unknown node!
if (nodedef == nil) then return false end
local nodegroups = nodedef.groups
local diggable = minetest.get_dig_params(nodegroups, toolcaps).diggable
if not diggable then
-- a pickaxe can't actually dig leaves based on it's groups alone,

179
readme.md Normal file
View File

@ -0,0 +1,179 @@
# Overview
Dreambuilder is my attempt to give the player pretty much everything they'll ever want to build with, and all the tools they should ever need to actually get the job done. This modpack was, for most of its life, maintained as a subgame based on minetest_game, minus a couple of mods that I don't like, with a number of minor things changed, and a number of extra mods added on. Since then, many things have changed, from game content to packaging format. Read on!
This modpack is in use on my Creative server and on my Survival server, which also has a few extra mods installed for its specific needs. It should give you a pretty good idea nonetheless. Expect lag, as it's a significantly-developed multiplayer server, after all.
##  
# What's in it? What's changed from the default stuff?
* Being that this was originally based on an old version of minetest_game, it retains the light-colored user interface theme despite having since been updated, because I don't like feeling like I live in a cave when I open a formspec.
* The complete Plantlife Modpack along with More Trees and Vines mods add a huge amount of variation to your landscape (as a result, they will add mapgen lag). Active spawning of Horsetail ferns is disabled by default, and I've added papyrus growth on dirt/grass with leaves (using a copy of the default growth ABM).
* This modpack includes RealBadAngel's Unified Inventory mod, which overrides minetest_game's default inventory to give you a much more powerful user interface, with crafting guide, bags, and more, and it also means that if you're using this modpack in creative mode, your stacks are NOT infinite (and they shouldn't be).
* The default bones and TNT mods have been disabled (by way of "empty" mods, to trick the dependency resolver into skipping the real ones). They're not exactly useful for building stuff with.
* Stu's split-limb player model replaces the default one.
* The default hotbar HUD holds 16 items instead of 8, taken from the top two rows of your inventory. The first 10 slots can be accessed by number keys 1-9 and 0, the rest via your mouse wheel. You can use `/hotbar ##` to change the number of slots from 1 to 23.
* The default lavacooling code has been supplanted by better, safer code from my Gloopblocks mod. That mod also provides stone/cobble --> mossy stone/cobble transformation in the presence of water.
* An extensive selection of administration tools for single-player and server use are included, such as areas, maptools, worldedit, xban, and more.
* A few textures here and there are different.
* The mapgen won't spawn apples on default trees, nor will they appear on a sapling-grown default tree. Only the *real* apple trees supplied by the Moretrees mod will bear apples (both at mapgen time and sapling-grown). Or at least that's how it's supposed to work. :stuck_out_tongue: While on that subject, apples now use a 3d model instead of the plantlike version.
##  
# Okay, what else?
A whole boatload of other mods have been added, which is where most of the content actually comes from. To be a little more specific, as of August 2017, this modpack has a total of 165 mods (counting all of the various sub-mods that themselves come as part of some modpack, such as mesecons or home decor) and supplies almost 2000 items in the inventory/craft guide (almost 14,300 unique items in total, counting everything that isn't displayed in the inventory)! A mostly-complete list of mods is as follows:
areas
arrowboards
bedrock
bees
biome_lib
blox
bobblocks (without the traps or mesecons support)
campfire
castles++ (Philipbenr's re-fork, without the "orbs")
caverealms
coloredwood
colormachine
cottages
currency
datastorage
digilines
digistuff
display_blocks
farming_plus
framedglass
gardening
gloopblocks
glooptest (without treasure chests)
ilights
inventory_sorter
invsaw
item_tweaks
locks
maptools
markers
memorandum
moreblocks
moreores
moretrees
nixie_tubes
notice
peaceful_npc
pipeworks
plasticbox
player_textures (cheapie's fork, with several default skins)
prefab_redo
quartz
replacer
rgblightstone
signs_lib
solidcolor
stained_glass
teleport_request
titanium
travelnet
unifiedbricks (bucket dependency removed)
unifieddyes
unified_inventory
unifiedmesecons
vines
windmill
xban2
The full Home Decor modpack
The full Technic modpack
The full Plantlife modpack
Cheapie's Roads modpack
Zeg9's Steel modpack
Zeg9's UFO modpack
The full Mesecons modpack
Jeija's Jumping modpack
The full Worldedit modpack
### Your Inventory Display
This modpack, as previously mentioned, replaces the standard inventory with Unified Inventory, which almost defies description here. Unified Inventory includes waypoints, a crafting guide, set/go home buttons, set day/set night buttons, a full creative inventory on the right if you're playing in that mode - and you only have to click/tap the item once to get the it, instead of multiple clicks/drag and drop, a trash slot, a clear all inventory button, a search feature for the inventory, and more. Basically, you just need to use it a few times and you'll find yourself wondering how you ever got along with the standard inventory!
### The Circular Saw
This modpack uses the More Blocks mod, which comes with the Stairsplus mod and more importantly, the Circular Saw mod by Sokomine and co. This mod replaces the traditional method of creating stairs, slabs, and the like: rather that crafting a stairs block by placing several of the material into your crafting grid, you must first craft a circular saw (really, a table saw), place that on the ground, and then use that to shape the material you had in mind. It can create dozens of shapes, including the standard stairs and slabs. Give it a try and see for yourself!
### Land Ownership
This modpack uses ShadowNinja's areas mod for land protection, as well as cheapie's protector blocks. Of course, land protection is only useful if you're using this Modpack on a public server.
#### Protection blocks:
These are easy. Craft one, place it, and everything within 15m of it becomes yours immediately (if someone else doesn't own some of the land therein, of course). If you dig one of these, the area protection it created is removed; if you shift-dig, the protection is preserved, but the block is deleted, giving back some steel ingots if you're in survival mode, or nothing at all if in creative mode.
#### Areas:
If you want fine control, use the areas mod's commands. There are three ways to select a region to protect:
**Option A:**
Just type `/area_pos set` and then punch two nodes that are diagonally opposite one another, so that they form a 3d box that fully encloses the area you want to claim. A black **`[1]`** or **`[2]`** will appear where you punched.
**Option B:**
1. Move to one corner, on the ground.
2. Type `/area_pos1` and press enter. A black **`[1]`** will appear.
3. Move to the other corner and go up a ways above your area - not too high though.
4. Type `/area_pos2` and press enter. A black **`[2]`** will appear.
**Option C:**
Just give actual coordinates to the `/area_xxx` commands, e.g.:
`/area_pos1 123,45,678 /area_pos2 987,654,321`
**Claim it:**
Once you've marked your area using one of the above methods, you must actually claim it. This is the step that actually protects it against vandalism and unauthorized access. Just type:
/protect some description here
By default, users may protect up to 3 zones with these commands, and each can be up to 50x100x50 meters in size, but this can be changed by plugging appropriate settings into your minetest.conf.
**Sublet it:**
Ok, you've claimed an area, and you want to let someone else build there. Simple. Set the coordinates of the box you want to let them build in, using the commands above (Options A, B, or C). Then do:
`/add_owner your_area# their_name description here`
For example, if you own area #123 and the other person's name is "Mike", and you want to sublet them some area called "Mike's home", you might do something like this:
`/add_owner 123 Mike Mikes Home`
You can add as many users as you like to your areas. You will need to issue one such command per user.
## Dependencies:
This modpack requires Minetest 0.4.16 or later, and a corresponding copy of minetest_game. Anything too old will likely either crash, show nodes with the wrong shape or colors, throw nonsensical warnings/errors, or open up wormholes.
## Hardware requirements:
This modpack defines a very large number of items and produces a well-detailed landscape, and so it requires a significant amount of resources compared to vanilla Minetest game. At least a 2 GHz dual core CPU and 2 GB free RAM are required for good performance. If you use my HDX texture pack, you'll need more RAM (at least 4 GB free recommended).
This modpack is NOT intended for use on mobile devices.
## Download/Install:
...if you're reading this, you're either on the Dreambuilder Github repo page, so clone it from there, or download the ZIP... or maybe you already have it. ;-) You can also fetch it from [url]https://daconcepts.com/vanessa/hobbies/minetest/Dreambuilder_Modpack.tar.bz2[/url]
Just rename the project folder to "dreambuilder_modpack", if necessary, and move it to your Minetest mods directory. Then select and enable it for the world you want to use it in. Depending on the condition of the world you are using, and for brand new maps, this modpack may take a minute or two to start, during which time you may see the hotbar and hand, all-grey window content where the world should be, or other odd-looking things. Just wait it out, it will eventually start and settle down.
## License:
Each of the base mods in this modpack retains the standard license that its author has assigned, even if the license file is missing from the archive. All changes and any supplemental content made by me is WTFPL unless explicitly stated otherwise.
# Open Source Software
This modpack is open source, or at least as much so as I have control over. Since it started from the standard minetest_game distribution, you'll want to look at that. You can find it at its usual Github repository, here:
[url]https://github.com/minetest/minetest_game[/url]
An online copy of the archive of mods the modpack is built from can be found here (with full git histories, including my changes and any files that went missing from the completed modpack, where applicable):
[url]http://minetest.daconcepts.com/my-main-mod-archive/[/url]
# Notes:
For best results, I recommend adding the following to your minetest.conf (perhaps to a secondary copy of that file that you only use when playing worlds with this modpack):
```
enable_item_drops = false
enable_item_pickup = true
remove_items = -1
disable_fire = true
enable_mesh_cache = false
```

View File

@ -14,38 +14,38 @@ 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}
local east = {x=pos.x+1, y=pos.y+1, z=pos.z }
local south_east = {x=pos.x+1, y=pos.y+1, z=pos.z-1}
local south = {x=pos.x , y=pos.y+1, z=pos.z-1}
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)
local node_east = minetest.get_node(east)
local node_s_e = minetest.get_node(south_east)
local node_south = minetest.get_node(south)
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
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}
local east = {x=pos.x+1, y=pos.y+1, z=pos.z }
local south_east = {x=pos.x+1, y=pos.y+1, z=pos.z-1}
local south = {x=pos.x , y=pos.y+1, z=pos.z-1}
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)
local node_east = minetest.get_node(east)
local node_s_e = minetest.get_node(south_east)
local node_south = minetest.get_node(south)
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
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
-- 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
@ -53,13 +53,13 @@ abstract_trunks.place_twig = function(pos)
minetest.set_node(north_east, {name="trunks:twig_7"})
end
if minetest.registered_nodes[node_east.name].buildable_to then
minetest.set_node(east, {name="trunks:twig_8"})
minetest.set_node(east, {name="trunks:twig_8"})
end
end
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
@ -67,13 +67,13 @@ abstract_trunks.place_twig = function(pos)
minetest.set_node(south_east, {name="trunks:twig_7", param2=1})
end
if minetest.registered_nodes[node_south.name].buildable_to then
minetest.set_node(south, {name="trunks:twig_8", param2=1})
minetest.set_node(south, {name="trunks:twig_8", param2=1})
end
end
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
@ -81,13 +81,13 @@ abstract_trunks.place_twig = function(pos)
minetest.set_node(south_west, {name="trunks:twig_7", param2=2})
end
if minetest.registered_nodes[node_west.name].buildable_to then
minetest.set_node(west, {name="trunks:twig_8", param2=2})
minetest.set_node(west, {name="trunks:twig_8", param2=2})
end
end
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
@ -95,19 +95,19 @@ abstract_trunks.place_twig = function(pos)
minetest.set_node(north_west, {name="trunks:twig_7", param2=3})
end
if minetest.registered_nodes[node_north.name].buildable_to then
minetest.set_node(north, {name="trunks:twig_8", param2=3})
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
if minetest.registered_nodes[node_north.name].buildable_to then
minetest.set_node(north, {name="trunks:twig_10"})
minetest.set_node(north, {name="trunks:twig_10"})
end
if minetest.registered_nodes[node_n_e.name].buildable_to then
minetest.set_node(north_east, {name="trunks:twig_11"})
@ -116,12 +116,12 @@ 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
if minetest.registered_nodes[node_east.name].buildable_to then
minetest.set_node(east, {name="trunks:twig_10", param2=1})
minetest.set_node(east, {name="trunks:twig_10", param2=1})
end
if minetest.registered_nodes[node_s_e.name].buildable_to then
minetest.set_node(south_east, {name="trunks:twig_11", param2=1})
@ -130,12 +130,12 @@ 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
if minetest.registered_nodes[node_south.name].buildable_to then
minetest.set_node(south, {name="trunks:twig_10", param2=2})
minetest.set_node(south, {name="trunks:twig_10", param2=2})
end
if minetest.registered_nodes[node_s_w.name].buildable_to then
minetest.set_node(south_west, {name="trunks:twig_11", param2=2})
@ -144,12 +144,12 @@ 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
if minetest.registered_nodes[node_west.name].buildable_to then
minetest.set_node(west, {name="trunks:twig_10", param2=3})
minetest.set_node(west, {name="trunks:twig_10", param2=3})
end
if minetest.registered_nodes[node_n_w.name].buildable_to then
minetest.set_node(north_west, {name="trunks:twig_11", param2=3})
@ -199,12 +199,12 @@ end
-- TRuNKS
-----------------------------------------------------------------------------------------------
local TRuNKS = {
-- MoD TRuNK NR
{"default", "tree", 1},
-- MoD TRuNK NR
{"default", "tree", 1},
{"default", "jungletree", 2},
{"default", "pine_tree", 12},
{"trees", "tree_conifer", 3},
{"trees", "tree_conifer", 3},
{"trees", "tree_mangrove", 4},
{"trees", "tree_palm", 5},
@ -223,11 +223,11 @@ local TRuNKS = {
if Horizontal_Trunks == true then -- see settings.txt
for i in pairs(TRuNKS) do
local MoD = TRuNKS[i][1]
local TRuNK = TRuNKS[i][2]
local NR = TRuNKS[i][3]
local MoD = TRuNKS[i][1]
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)
@ -260,11 +260,11 @@ abstract_trunks.place_trunk = function(pos)
local node_east2 = minetest.get_node(east2)
if minetest.registered_nodes[node_here.name].buildable_to then -- instead of check_air = true,
for i in pairs(TRuNKS) do
local MoD = TRuNKS[i][1]
local TRuNK = TRuNKS[i][2]
local NR = TRuNKS[i][3]
local chance = math.random(1, 17)
local length = math.random(3,5)
local MoD = TRuNKS[i][1]
local TRuNK = TRuNKS[i][2]
local NR = TRuNKS[i][3]
local chance = math.random(1, 17)
local length = math.random(3,5)
if chance == NR then
local trunk_type = math.random(1,3)
if trunk_type == 1 then
@ -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,32 +491,32 @@ 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 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)
local node_east = minetest.get_node(east)
local node_south = minetest.get_node(south)
local node_west = minetest.get_node(west)
local node_north = minetest.get_node(north)
local node_east = minetest.get_node(east)
local node_south = minetest.get_node(south)
local node_west = minetest.get_node(west)
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
local MoD = TRuNKS[i][1]
local TRuNK = TRuNKS[i][2]
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

View File

@ -1,6 +1,6 @@
-----------------------------------------------------------------------------------------------
local title = "Trunks"
local version = "0.1.4"
local version = "0.1.4"
local mname = "trunks"
-----------------------------------------------------------------------------------------------
-- Code by Mossmanikin & Neuromancer

View File

@ -217,10 +217,10 @@ if Auto_Roof_Corner == true then
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})
local node_south = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1})
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})
local node_south = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1})
-- corner 1
if ((node_west.name == roof and node_west.param2 == 0)
or (node_west.name == corner and node_west.param2 == 1))
@ -302,8 +302,8 @@ local roots_cube = {-2/16, -1/2, -3/16, 2/16, 1/16, 1/2}
local roots_sheet = {0, -1/2, -1/2, 0, 1/16, 1/2}
local TRuNKS = {
-- MoD TRuNK
{"default", "tree" },
-- MoD TRuNK
{"default", "tree" },
{"default", "jungletree" },
{"default", "pine_tree" },
@ -325,8 +325,8 @@ local TRuNKS = {
}
for i in pairs(TRuNKS) do
local MoD = TRuNKS[i][1]
local TRuNK = TRuNKS[i][2]
local MoD = TRuNKS[i][1]
local TRuNK = TRuNKS[i][2]
if minetest.get_modpath(MoD) ~= nil then
local node = minetest.registered_nodes[MoD..":"..TRuNK]
@ -361,7 +361,7 @@ for i in pairs(TRuNKS) do
})
else
print(string.format("[Trunks] warning: tree type '%s:%s' not found", MoD, TRuNK))
minetest.log("error", string.format("[Trunks] warning: tree type '%s:%s' not found", MoD, TRuNK))
end
end
end

View File

@ -9,4 +9,3 @@ vines.recipes['shears'] = {
{'group:stick', 'group:wood', 'default:steel_ingot'},
{'', '', 'group:stick'}
}

View File

@ -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

View File

@ -1,6 +1,6 @@
-----------------------------------------------------------------------------------------------
local title = "Wood Soils" -- former "Forest Soils"
local version = "0.0.9"
local version = "0.0.9"
local mname = "woodsoils" -- former "forestsoils"
-----------------------------------------------------------------------------------------------