1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2024-11-05 18:00:28 +01:00
plantlife_modpack/poinsonivy/init.lua
Vanessa Ezekowitz 2942f2366f Split the flowers/junglegrass/poisonivy components into separate folders,
leaving the plants folder as the primary API code and glue between them.  Any
of the three may be deleted to disable them if so desired.
2012-12-03 17:20:50 -05:00

70 lines
2.1 KiB
Lua

-- This file supplies poison ivy for the plantlife modpack
local spawn_delay = 2000 -- 2000
local spawn_chance = 100 -- 100
local grow_delay = 1000 -- 1000
local grow_chance = 10 -- 10
local verticals_list = {
"default:dirt",
"default:dirt_with_grass",
"default:stone",
"default:cobble",
"default:mossycobble",
"default:brick",
"default:tree",
"default:jungletree",
"default:coal",
"default:iron"
}
minetest.register_node(':poisonivy:seedling', {
description = "Poison ivy (seedling)",
drawtype = 'plantlike',
tile_images = { 'poisonivy_seedling.png' },
inventory_image = 'poisonivy_seedling.png',
wield_image = 'poisonivy_seedling.png',
sunlight_propagates = true,
paramtype = 'light',
walkable = false,
groups = { snappy = 3, poisonivy=1 },
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node(':poisonivy:sproutling', {
description = "Poison ivy (sproutling)",
drawtype = 'plantlike',
tile_images = { 'poisonivy_sproutling.png' },
inventory_image = 'poisonivy_sproutling.png',
wield_image = 'poisonivy_sproutling.png',
sunlight_propagates = true,
paramtype = 'light',
walkable = false,
groups = { snappy = 3, poisonivy=1 },
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node(':poisonivy:climbing', {
description = "Poison ivy (climbing plant)",
drawtype = 'signlike',
tile_images = { 'poisonivy_climbing.png' },
inventory_image = 'poisonivy_climbing.png',
wield_image = 'poisonivy_climbing.png',
sunlight_propagates = true,
paramtype = 'light',
paramtype2 = 'wallmounted',
walkable = false,
groups = { snappy = 3, poisonivy=1 },
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
})
spawn_on_surfaces(spawn_delay, "poisonivy:seedling", 10 , spawn_chance/10, "default:dirt_with_grass", {"group:poisonivy","group:flower"}, poisonivy_seed_diff, 7)
grow_plants(spawn_delay, grow_chance, "poisonivy:seedling", "poisonivy:sproutling", nil, {"default:dirt_with_grass"})
grow_plants(spawn_delay, grow_chance*2, "poisonivy:climbing", nil, nil, nil)
enabled_poisonivy = true