ropes/spawning.lua
bas080 796961b01a Complete rewrite
A big code update. Some features have changes slightly. The goal of this update
is to improve performance on servers. This is achieved by removing ABMs and
using on_timers instead. The amount of times that on_timer is used is also
minimized. Other features include.

- vine register function that allows the registering of side and bottom vines

- Removing vines remove all vines beneath it.

- New vine named Roots
2015-02-10 07:15:16 +01:00

48 lines
1.2 KiB
Lua

plantslib:spawn_on_surfaces({
avoid_nodes = {"vines:vine"},
avoid_radius = 5,
spawn_delay = 500,
spawn_plants = {"vines:vine"},
spawn_chance = 10,
spawn_surfaces = {"default:dirt_with_grass","default:dirt"},
spawn_on_bottom = true,
plantlife_limit = -0.9,
})
plantslib:spawn_on_surfaces({
avoid_nodes = {"vines:root"},
avoid_radius = 5,
spawn_delay = 500,
spawn_plants = {"vines:vine"},
spawn_chance = 10,
spawn_surfaces = {"default:dirt_with_grass","default:dirt"},
spawn_on_bottom = true,
plantlife_limit = -0.9,
})
plantslib:spawn_on_surfaces({
avoid_nodes = {"vines:vine", "vines:side"},
avoid_radius = 3,
spawn_delay = 300,
spawn_plants = {"vines:side"},
spawn_chance = 10,
spawn_surfaces = {}, --TODO
spawn_on_side = true,
near_nodes = {"default:jungletree"},
near_nodes_size = 5,
plantlife_limit = -0.9,
})
plantslib:spawn_on_surfaces({
spawn_plants = {"vines:willow"},
spawn_delay = 200,
spawn_chance = 3,
spawn_surfaces = {"moretrees:willow_leaves"},
spawn_on_side = true,
near_nodes = {"default:water_source"},
near_nodes_size = 2,
near_nodes_vertical = 5,
near_nodes_count = 1,
plantlife_limit = -0.9,
})