Add files via upload
parent
b9ec5e0920
commit
4ef77364ce
|
@ -1,3 +1,8 @@
|
|||
|
||||
local modname = "naturalbiomes"
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
|
||||
minetest.register_node("naturalbiomes:alderswamp_litter", {
|
||||
description = ("Alder Swamp dirt with Grass"),
|
||||
tiles = {"naturalbiomes_alderswamp_litter.png", "naturalbiomes_alderswamp_dirt.png",
|
||||
|
@ -34,6 +39,22 @@ minetest.register_biome({
|
|||
humidity_point = 70,
|
||||
})
|
||||
|
||||
--
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New alder tree
|
||||
|
||||
local function grow_new_alder_tree(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_aldertree_0_270.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
-- alder trunk
|
||||
minetest.register_node("naturalbiomes:alder_trunk", {
|
||||
description = ("Alder Trunk"),
|
||||
|
@ -94,14 +115,13 @@ minetest.register_node("naturalbiomes:alder_leaves", {
|
|||
minetest.register_node("naturalbiomes:alder_sapling", {
|
||||
description = ("Alder Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_alderswamp_sapling.png"},
|
||||
inventory_image = "naturalbiomes_alderswamp_sapling.png",
|
||||
wield_image = "naturalbiomes_alderswamp_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
on_timer = grow_new_alder_tree,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
|
@ -110,20 +130,18 @@ minetest.register_node("naturalbiomes:alder_sapling", {
|
|||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Alder sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:alder_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
|
@ -131,17 +149,7 @@ minetest.register_node("naturalbiomes:alder_sapling", {
|
|||
|
||||
|
||||
|
||||
--
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New alder tree
|
||||
|
||||
function default.grow_new_alder_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_aldertree_0_270.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_alderswamp_alder_wood",
|
||||
|
|
116
alpine.lua
116
alpine.lua
|
@ -1,3 +1,8 @@
|
|||
|
||||
local modname = "naturalbiomes"
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
|
||||
minetest.register_node("naturalbiomes:alpine_litter", {
|
||||
description = ("Dirt with Alpine Grass"),
|
||||
tiles = {"naturalbiomes_alpine_litter.png", "naturalbiomes_alpine_rock.png",
|
||||
|
@ -36,6 +41,21 @@ minetest.register_biome({
|
|||
humidity_point = 61,
|
||||
})
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New pine tree
|
||||
|
||||
local function grow_new_alppine1_tree(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_alpine_pine1_0_90.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
-- Pine1 trunk
|
||||
minetest.register_node("naturalbiomes:alppine1_trunk", {
|
||||
description = ("Pine Trunk"),
|
||||
|
@ -96,14 +116,13 @@ minetest.register_node("naturalbiomes:alppine1_leaves", {
|
|||
minetest.register_node("naturalbiomes:alppine1_sapling", {
|
||||
description = ("Pine Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_alpine_pine1_sapling.png"},
|
||||
inventory_image = "naturalbiomes_alpine_pine1_sapling.png",
|
||||
wield_image = "naturalbiomes_alpine_pine1_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
on_timer = grow_new_alppine1_tree,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
|
@ -112,38 +131,24 @@ minetest.register_node("naturalbiomes:alppine1_sapling", {
|
|||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Pine sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:alppine1_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New pine tree
|
||||
|
||||
function default.grow_new_alppine1_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_alpine_pine1_0_90.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_alpine_pine1_wood",
|
||||
"naturalbiomes:allpine1_wood",
|
||||
|
@ -219,6 +224,21 @@ minetest.register_decoration({
|
|||
rotation = "random",
|
||||
})
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New alppine2 tree
|
||||
|
||||
local function grow_new_alppine2_tree(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_alpine_pine2_0_90.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
-- Pine2 trunk
|
||||
minetest.register_node("naturalbiomes:alppine2_trunk", {
|
||||
description = ("Pine Trunk"),
|
||||
|
@ -279,14 +299,13 @@ minetest.register_node("naturalbiomes:alppine2_leaves", {
|
|||
minetest.register_node("naturalbiomes:alppine2_sapling", {
|
||||
description = ("Pine Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_alpine_pine2_sapling.png"},
|
||||
inventory_image = "naturalbiomes_alpine_pine2_sapling.png",
|
||||
wield_image = "naturalbiomes_alpine_pine2_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
on_timer = grow_new_alppine2_tree,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
|
@ -295,38 +314,24 @@ minetest.register_node("naturalbiomes:alppine2_sapling", {
|
|||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Pine sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:alppine2_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New alppine2 tree
|
||||
|
||||
function default.grow_new_alppine2_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_alpine_pine2_0_90.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_alpine_pine2_wood",
|
||||
"naturalbiomes:alppine2_wood",
|
||||
|
@ -402,6 +407,21 @@ minetest.register_decoration({
|
|||
rotation = "random",
|
||||
})
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New alpine bush
|
||||
|
||||
local function grow_new_alpine_bush(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_alpine_berrybush_0_90.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
-- Alpine bush
|
||||
|
||||
minetest.register_decoration({
|
||||
|
|
103
bambooforest.lua
103
bambooforest.lua
|
@ -1,3 +1,8 @@
|
|||
|
||||
local modname = "naturalbiomes"
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
|
||||
minetest.register_node("naturalbiomes:bambooforest_litter", {
|
||||
description = ("Bamboo Forest Litter"),
|
||||
tiles = {"naturalbiomes_bambooforest_litter.png", "naturalbiomes_bambooforest_rock.png",
|
||||
|
@ -27,6 +32,21 @@ minetest.register_biome({
|
|||
humidity_point = 77,
|
||||
})
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New bamboo tree
|
||||
|
||||
local function grow_new_bamboo_tree(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_bambootree_large_0_270.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
-- bamboo trunk
|
||||
minetest.register_node("naturalbiomes:bamboo_trunk", {
|
||||
description = ("Bamboo Trunk"),
|
||||
|
@ -87,14 +107,13 @@ minetest.register_node("naturalbiomes:bamboo_leaves", {
|
|||
minetest.register_node("naturalbiomes:bamboo_sapling", {
|
||||
description = ("Bamboo Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_bambooforest_bamboo_sapling.png"},
|
||||
inventory_image = "naturalbiomes_bambooforest_bamboo_sapling.png",
|
||||
wield_image = "naturalbiomes_bambooforest_bamboo_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
on_timer = grow_new_bamboo_tree,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
|
@ -103,38 +122,24 @@ minetest.register_node("naturalbiomes:bamboo_sapling", {
|
|||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Alder sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:bamboo_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New bamboo tree
|
||||
|
||||
function default.grow_new_bamboo_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_bambootree_large_0_270.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_bambooforest_bamboo_wood2",
|
||||
"naturalbiomes:bamboo_wood",
|
||||
|
@ -353,6 +358,22 @@ minetest.register_node("naturalbiomes:bambooforest_groundgrass2", {
|
|||
},
|
||||
})
|
||||
|
||||
--
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New banana tree
|
||||
|
||||
local function grow_new_banana_tree(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_banana_palm_0_90.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
-- banana trunk
|
||||
minetest.register_node("naturalbiomes:banana_trunk", {
|
||||
description = ("Banana Trunk"),
|
||||
|
@ -413,14 +434,13 @@ minetest.register_node("naturalbiomes:banana_leaves", {
|
|||
minetest.register_node("naturalbiomes:banana_sapling", {
|
||||
description = ("Banana Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes__banana_tree_sapling.png"},
|
||||
inventory_image = "naturalbiomes__banana_tree_sapling.png",
|
||||
wield_image = "naturalbiomes__banana_tree_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
on_timer = grow_new_banana_tree,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
|
@ -429,39 +449,24 @@ minetest.register_node("naturalbiomes:banana_sapling", {
|
|||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Banana sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:banana_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New banana tree
|
||||
|
||||
function default.grow_new_banana_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_banana_palm_0_90.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_banana_wood",
|
||||
"naturalbiomes:banana_wood",
|
||||
|
|
4
init.lua
4
init.lua
|
@ -1,4 +1,8 @@
|
|||
|
||||
local modname = "naturalbiomes"
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
|
||||
-- Load support for intllib.
|
||||
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
|
||||
local modname = "naturalbiomes"
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
|
||||
minetest.register_node("naturalbiomes:mediterran_litter", {
|
||||
description = ("Mediterranean litter with grass"),
|
||||
tiles = {"naturalbiomes_mediterran_litter.png", "default_dirt.png",
|
||||
|
@ -51,6 +56,21 @@ minetest.register_biome({
|
|||
humidity_point = 30,
|
||||
})
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New olive tree
|
||||
|
||||
local function grow_new_olive_tree(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_olive_tree_0_90.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
-- olive trunk
|
||||
minetest.register_node("naturalbiomes:olive_trunk", {
|
||||
description = ("Olive Trunk"),
|
||||
|
@ -111,14 +131,13 @@ minetest.register_node("naturalbiomes:olive_leaves", {
|
|||
minetest.register_node("naturalbiomes:olive_sapling", {
|
||||
description = ("Olive Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_mediterran_olive_sapling.png"},
|
||||
inventory_image = "naturalbiomes_mediterran_olive_sapling.png",
|
||||
wield_image = "naturalbiomes_mediterran_olive_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
on_timer = grow_new_olive_tree,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
|
@ -127,38 +146,24 @@ minetest.register_node("naturalbiomes:olive_sapling", {
|
|||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Olive sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:olive_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New olive tree
|
||||
|
||||
function default.grow_new_olive_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_olive_tree_0_90.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_mediterran_olive_wood",
|
||||
"naturalbiomes:olive_wood",
|
||||
|
@ -234,6 +239,22 @@ minetest.register_decoration({
|
|||
rotation = "random",
|
||||
})
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New pine tree
|
||||
|
||||
local function grow_new_pine_tree(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_med_pinetree_0_90.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
|
||||
-- pine trunk
|
||||
minetest.register_node("naturalbiomes:pine_trunk", {
|
||||
description = ("Pine Trunk"),
|
||||
|
@ -294,14 +315,13 @@ minetest.register_node("naturalbiomes:pine_leaves", {
|
|||
minetest.register_node("naturalbiomes:pine_sapling", {
|
||||
description = ("Pine Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_mediterran_pine_sapling.png"},
|
||||
inventory_image = "naturalbiomes_mediterran_pine_sapling.png",
|
||||
wield_image = "naturalbiomes_mediterran_pine_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
on_timer = grow_new_pine_tree,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
|
@ -310,38 +330,23 @@ minetest.register_node("naturalbiomes:pine_sapling", {
|
|||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Pine sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:pine_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New pine tree
|
||||
|
||||
function default.grow_new_pine_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_med_pinetree_0_90.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_mediterran_pine_wood",
|
||||
"naturalbiomes:pine_wood",
|
||||
|
@ -434,6 +439,19 @@ minetest.register_decoration({
|
|||
|
||||
-- Cypress Bush
|
||||
|
||||
-- New cypress tree
|
||||
|
||||
local function grow_new_cypress_tree(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_cypress_0_90.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:med_bush",
|
||||
deco_type = "schematic",
|
||||
|
@ -499,7 +517,7 @@ minetest.register_node("naturalbiomes:med_bush_sapling", {
|
|||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = grow_sapling,
|
||||
on_timer = grow_new_cypress_tree,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
name = naturalbiomes
|
||||
description = 7 New Biomes
|
||||
depends = default, stairs, doors
|
||||
optional_depends = hunger_ng
|
67
outback.lua
67
outback.lua
|
@ -1,3 +1,8 @@
|
|||
|
||||
local modname = "naturalbiomes"
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
|
||||
minetest.register_node("naturalbiomes:outback_litter", {
|
||||
description = ("Outback ground with grass"),
|
||||
tiles = {"naturalbiomes_outbacklitter.png", "naturalbiomes_outback_ground.png",
|
||||
|
@ -42,6 +47,21 @@ minetest.register_biome({
|
|||
humidity_point = 32,
|
||||
})
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New outback tree
|
||||
|
||||
local function grow_new_outback_tree(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_outback_tree1_0_90.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
-- outback trunk
|
||||
minetest.register_node("naturalbiomes:outback_trunk", {
|
||||
description = ("Outback Trunk"),
|
||||
|
@ -102,14 +122,13 @@ minetest.register_node("naturalbiomes:outback_leaves", {
|
|||
minetest.register_node("naturalbiomes:outback_sapling", {
|
||||
description = ("Outback Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_outbackeukaplyptus_sapling.png"},
|
||||
inventory_image = "naturalbiomes_outbackeukaplyptus_sapling.png",
|
||||
wield_image = "naturalbiomes_outbackeukaplyptus_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
on_timer = grow_new_outback_tree,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
|
@ -118,38 +137,24 @@ minetest.register_node("naturalbiomes:outback_sapling", {
|
|||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Alder sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:outback_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New outback tree
|
||||
|
||||
function default.grow_new_outback_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_outback_tree1_0_90.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_outback_eukalyptus_wood",
|
||||
"naturalbiomes:outback_wood",
|
||||
|
@ -266,6 +271,18 @@ minetest.register_decoration({
|
|||
|
||||
-- Outback Bush
|
||||
|
||||
-- New outback bush
|
||||
|
||||
local function grow_new_outback_bush(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_outback_bush_small2_0_270.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:outback_bush",
|
||||
deco_type = "schematic",
|
||||
|
@ -331,7 +348,7 @@ minetest.register_node("naturalbiomes:outback_bush_sapling", {
|
|||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = grow_sapling,
|
||||
on_timer = grow_new_outback_bush,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
|
||||
local modname = "naturalbiomes"
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
|
||||
minetest.register_node("naturalbiomes:palmbeach_sand", {
|
||||
description = ("Beach Sand"),
|
||||
tiles = {"naturalbiomes_beach_sand.png"},
|
||||
|
@ -122,6 +127,21 @@ offset = -0.004,
|
|||
rotation = "random",
|
||||
})
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New palm tree
|
||||
|
||||
local function grow_new_palm_tree(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_cocopalm_tree_0_270.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
|
||||
-- palm trunk
|
||||
minetest.register_node("naturalbiomes:palm_trunk", {
|
||||
|
@ -183,14 +203,13 @@ minetest.register_node("naturalbiomes:palm_leaves", {
|
|||
minetest.register_node("naturalbiomes:palm_sapling", {
|
||||
description = ("Palm Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_savannapalm_sapling.png"},
|
||||
inventory_image = "naturalbiomes_savannapalm_sapling.png",
|
||||
wield_image = "naturalbiomes_savannapalm_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
on_timer = grow_new_palm_tree,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
|
@ -199,38 +218,24 @@ minetest.register_node("naturalbiomes:palm_sapling", {
|
|||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Palm sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:palm_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New palm tree
|
||||
|
||||
function default.grow_new_palm_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_cocopalm_tree_0_270.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_savannapalm_wood",
|
||||
"naturalbiomes:palm_wood",
|
||||
|
@ -308,6 +313,18 @@ minetest.register_decoration({
|
|||
|
||||
-- Beach Bush
|
||||
|
||||
-- New palm buh
|
||||
|
||||
local function grow_new_palm_bush(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_beach_bush_0_270.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
minetest.register_decoration({
|
||||
name = "naturalbiomes:beach_bush",
|
||||
deco_type = "schematic",
|
||||
|
@ -373,7 +390,7 @@ minetest.register_node("naturalbiomes:beach_bush_sapling", {
|
|||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = grow_sapling,
|
||||
on_timer = grow_new_palm_bush,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
|
||||
local modname = "naturalbiomes"
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
|
||||
minetest.register_node("naturalbiomes:savannalitter", {
|
||||
description = ("Wet Savanna dirt with Grass"),
|
||||
tiles = {"naturalbiomes_savannalitter.png", "default_dirt.png",
|
||||
|
@ -27,6 +32,21 @@ minetest.register_biome({
|
|||
humidity_point = 40,
|
||||
})
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New acacia tree
|
||||
|
||||
local function grow_new_acacia_tree(pos)
|
||||
if not default.can_grow(pos) then
|
||||
-- try a bit later again
|
||||
minetest.get_node_timer(pos):start(math.random(240, 600))
|
||||
return
|
||||
end
|
||||
|
||||
minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/naturalbiomes_acaciatree_0_180.mts", "0", nil, true)
|
||||
end
|
||||
|
||||
-- acacia trunk
|
||||
minetest.register_node("naturalbiomes:acacia_trunk", {
|
||||
description = ("Acacia Trunk"),
|
||||
|
@ -87,14 +107,13 @@ minetest.register_node("naturalbiomes:acacia_leaves", {
|
|||
minetest.register_node("naturalbiomes:acacia_sapling", {
|
||||
description = ("Acacia Sapling"),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"naturalbiomes_savannaacaia_sapling.png"},
|
||||
inventory_image = "naturalbiomes_savannaacaia_sapling.png",
|
||||
wield_image = "naturalbiomes_savannaacaia_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
on_timer = grow_new_acacia_tree,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
|
||||
|
@ -103,37 +122,24 @@ minetest.register_node("naturalbiomes:acacia_sapling", {
|
|||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(300, 1500))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
minetest.log("action", ("Acacia sapling placed."))
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"naturalbiomes:acacia_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -2, y = 1, z = -2},
|
||||
{x = 2, y = 13, z = 2},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
-- Tree generation
|
||||
--
|
||||
|
||||
-- New acacia tree
|
||||
|
||||
function default.grow_new_acacia_tree(pos)
|
||||
local path = naturalbiomes.path .. "/schematics/naturalbiomes_acaciatree_0_180.mts"
|
||||
minetest.place_schematic({x = pos.x - 3, y = pos.y, z = pos.z - 3},
|
||||
path, "0", nil, false)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab(
|
||||
"naturalbiomes_savannaacacia_wood",
|
||||
"naturalbiomes:acacia_wood",
|
||||
|
|
Loading…
Reference in New Issue