Willow vines now work with the latest plants_lib

This commit is contained in:
Bas
2013-01-26 04:39:46 +01:00
parent 3e17724125
commit dc1898bca9
2 changed files with 25 additions and 31 deletions

View File

@ -1,4 +1,3 @@
local mod_name = "vines"
local average_height = 12
local spawn_interval = 1500
@ -204,10 +203,9 @@ minetest.register_node("vines:vine_rotten", {
--ABM
--make vines grow downward
--[[
minetest.register_abm({
nodenames = {"vines:vine", "vines:side", "vines:root"},
interval = 300,
nodenames = {"vines:vine", "vines:root"},
interval = 700,
chance = 8,
action = function(pos, node, active_object_count, active_object_count_wider)
local p = {x=pos.x, y=pos.y-1, z=pos.z}
@ -219,19 +217,6 @@ minetest.register_abm({
end
})
]]--
minetest.register_abm({
nodenames = {"default:dirt", "default:dirt_with_grass"},
interval = 36000,
chance = 10,
action = function(pos, node, active_object_count, active_object_count_wider)
local p = {x=pos.x, y=pos.y-1, z=pos.z}
local n = minetest.env:get_node(p)
minetest.env:add_node(p, {name="vines:vine"})
end
})
minetest.register_abm({
nodenames = {"vines:rope_end"},
interval = 1,
@ -265,29 +250,36 @@ minetest.register_craftitem("vines:vines", {
})
plantslib:spawn_on_surfaces({
spawn_delay = spawn_interval,
spawn_plants = {"vines:side"},
spawn_chance = 1,
spawn_surfaces = {"default:leaves"},
spawn_on_side = true
})
plantslib:spawn_on_surfaces({
savoid = {"vines:vine"},
sradius = 2,
spawn_delay = spawn_interval,
spawn_plants = {"vines:vine"},
spawn_chance = 1,
spawn_chance = 10,
spawn_surfaces = {"default:leaves"},
spawn_on_bottom = true
})
plantslib:spawn_on_surfaces({
savoid = {"vines:vine"},
sradius = 1,
spawn_delay = spawn_interval,
spawn_plants = {"vines:side"},
spawn_chance = 10,
spawn_surfaces = {"default:leaves"},
spawn_on_side = true
})
plantslib:spawn_on_surfaces({
spawn_delay = spawn_interval/100,
spawn_plants = {"vines:willow"},
spawn_chance = 1,
spawn_chance = 3,
spawn_surfaces = {"moretrees:willow_leaves"},
spawn_on_side = true,
near_nodes_size = 20,
near_nodes = {"default:water_source"},
near_nodes_size = 4
near_nodes_count = 1,
plantlife_limit = -1,
near_nodes_vertical = 4,
})
print("[Vines] Loaded!")

View File

@ -8,15 +8,17 @@
BY: bas080
DESCRIPTION: Vines and ropebox
VERSION: 1.5
VERSION: 2.0
LICENCE: WTFPL
FORUM: http://forum.minetest.net/viewtopic.php?id=2344
Changelog
2.0
* Root vines
* Bottom vines
* Root vines texture and node (no spawn)
* Side vines spawn on leaves
* Willow vines spawns on moretrees willow leaves
* Ropebox after_dig_node re-defined
1.5
* Added side vines