Add x_farming bonemeal support for trees
This commit is contained in:
parent
5c2f92e19b
commit
70f47ef977
|
@ -75,4 +75,5 @@ read_globals = {
|
|||
"xpanes",
|
||||
"XTumbleweed",
|
||||
"x_obsidianmese",
|
||||
"x_farming",
|
||||
}
|
||||
|
|
|
@ -109,7 +109,8 @@
|
|||
"walls",
|
||||
"stairs",
|
||||
"XTumbleweed",
|
||||
"x_obsidianmese"
|
||||
"x_obsidianmese",
|
||||
"x_farming"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,6 +71,7 @@ https://bitbucket.org/minetest_gamers/everness/issues
|
|||
- walls
|
||||
- x_obsidianmese (for paths)
|
||||
- x_tumbleweed (adds tumbleweeds to deserts)
|
||||
- x_farming (bonemeal, recipes...)
|
||||
|
||||
## License
|
||||
|
||||
|
|
3
init.lua
3
init.lua
|
@ -178,7 +178,7 @@ end
|
|||
-- Mod Support
|
||||
--
|
||||
|
||||
if minetest.get_modpath('x_farming') then
|
||||
if minetest.get_modpath('x_farming') and minetest.global_exists('x_farming') then
|
||||
dofile(path .. '/mod_support_x_farming.lua')
|
||||
end
|
||||
|
||||
|
@ -188,6 +188,7 @@ end
|
|||
|
||||
if minetest.get_modpath('x_obsidianmese')
|
||||
and minetest.global_exists('x_obsidianmese')
|
||||
-- backwards compatibility check
|
||||
and x_obsidianmese.register_path_node
|
||||
then
|
||||
dofile(path .. '/mod_support_x_obsidianmese.lua')
|
||||
|
|
2
mod.conf
2
mod.conf
|
@ -1,6 +1,6 @@
|
|||
name = everness
|
||||
description = Never ending discovery in Everness mapgen.
|
||||
depends = default
|
||||
optional_depends = xpanes, doors, stairs, walls, x_obsidianmese, x_tumbleweed
|
||||
optional_depends = xpanes, doors, stairs, walls, x_obsidianmese, x_tumbleweed, x_farming
|
||||
supported_games = minetest_game
|
||||
min_minetest_version = 5.4
|
||||
|
|
|
@ -16,6 +16,101 @@
|
|||
License along with this library; if not, write to juraj.vajda@gmail.com
|
||||
--]]
|
||||
|
||||
--
|
||||
-- Bonemeal Trees
|
||||
--
|
||||
|
||||
x_farming.x_bonemeal:register_tree_defs({
|
||||
{
|
||||
-- sapling name
|
||||
name = 'everness:coral_tree_sapling',
|
||||
-- 1 out of `chance`, e.g. 2 = 50% chance
|
||||
chance = 3,
|
||||
-- grow tree from sapling
|
||||
grow_tree = Everness.grow_sapling
|
||||
},
|
||||
{
|
||||
-- sapling name
|
||||
name = 'everness:coral_tree_bioluminescent_sapling',
|
||||
-- 1 out of `chance`, e.g. 2 = 50% chance
|
||||
chance = 3,
|
||||
-- grow tree from sapling
|
||||
grow_tree = Everness.grow_sapling
|
||||
},
|
||||
{
|
||||
-- sapling name
|
||||
name = 'everness:crystal_bush_sapling',
|
||||
-- 1 out of `chance`, e.g. 2 = 50% chance
|
||||
chance = 3,
|
||||
-- grow tree from sapling
|
||||
grow_tree = Everness.grow_sapling
|
||||
},
|
||||
{
|
||||
-- sapling name
|
||||
name = 'everness:cursed_bush_sapling',
|
||||
-- 1 out of `chance`, e.g. 2 = 50% chance
|
||||
chance = 3,
|
||||
-- grow tree from sapling
|
||||
grow_tree = Everness.grow_sapling
|
||||
},
|
||||
{
|
||||
-- sapling name
|
||||
name = 'everness:baobab_sapling',
|
||||
-- 1 out of `chance`, e.g. 2 = 50% chance
|
||||
chance = 3,
|
||||
-- grow tree from sapling
|
||||
grow_tree = Everness.grow_sapling
|
||||
},
|
||||
{
|
||||
-- sapling name
|
||||
name = 'everness:dry_tree_sapling',
|
||||
-- 1 out of `chance`, e.g. 2 = 50% chance
|
||||
chance = 3,
|
||||
-- grow tree from sapling
|
||||
grow_tree = Everness.grow_sapling
|
||||
},
|
||||
{
|
||||
-- sapling name
|
||||
name = 'everness:willow_tree_sapling',
|
||||
-- 1 out of `chance`, e.g. 2 = 50% chance
|
||||
chance = 3,
|
||||
-- grow tree from sapling
|
||||
grow_tree = Everness.grow_sapling
|
||||
},
|
||||
{
|
||||
-- sapling name
|
||||
name = 'everness:sequoia_tree_sapling',
|
||||
-- 1 out of `chance`, e.g. 2 = 50% chance
|
||||
chance = 3,
|
||||
-- grow tree from sapling
|
||||
grow_tree = Everness.grow_sapling
|
||||
},
|
||||
{
|
||||
-- sapling name
|
||||
name = 'everness:crystal_tree_sapling',
|
||||
-- 1 out of `chance`, e.g. 2 = 50% chance
|
||||
chance = 3,
|
||||
-- grow tree from sapling
|
||||
grow_tree = Everness.grow_sapling
|
||||
},
|
||||
{
|
||||
-- sapling name
|
||||
name = 'everness:crystal_tree_large_sapling',
|
||||
-- 1 out of `chance`, e.g. 2 = 50% chance
|
||||
chance = 3,
|
||||
-- grow tree from sapling
|
||||
grow_tree = Everness.grow_sapling
|
||||
},
|
||||
{
|
||||
-- sapling name
|
||||
name = 'everness:cursed_dream_tree_sapling',
|
||||
-- 1 out of `chance`, e.g. 2 = 50% chance
|
||||
chance = 3,
|
||||
-- grow tree from sapling
|
||||
grow_tree = Everness.grow_sapling
|
||||
},
|
||||
})
|
||||
|
||||
--
|
||||
-- Recipes
|
||||
--
|
||||
|
|
14
trees.lua
14
trees.lua
|
@ -54,6 +54,20 @@ function Everness.grow_willow_tree(pos)
|
|||
local path = minetest.get_modpath('everness') .. '/schematics/everness_willow_tree_from_sapling.mts'
|
||||
minetest.place_schematic({ x = pos.x - 19, y = pos.y, z = pos.z - 19 },
|
||||
path, 'random', nil, false)
|
||||
|
||||
-- trigger vines
|
||||
minetest.after(1, function(v_pos)
|
||||
local size = { x = 39, y = 27, z = 39 }
|
||||
local positions = minetest.find_nodes_in_area(
|
||||
vector.round(vector.new(v_pos.x - (size.x / 2), v_pos.y, v_pos.z - (size.z / 2))),
|
||||
vector.round(vector.new(v_pos.x + (size.x / 2), v_pos.y + size.y, v_pos.z + (size.z / 2))),
|
||||
{ 'group:vine' }
|
||||
)
|
||||
|
||||
for _, vine_pos in ipairs(positions) do
|
||||
Everness:tick_vine(vine_pos)
|
||||
end
|
||||
end, pos)
|
||||
end
|
||||
|
||||
function Everness.grow_sequoia_tree(pos)
|
||||
|
|
Ŝarĝante…
Reference in New Issue