cucina_vegana/parsley_default.lua
2018-12-27 19:42:00 +01:00

59 lines
1.8 KiB
Lua

--[[
**********************************************
*** Parsley default ***
**********************************************
]]--
-- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local dname = S("Parsley")
local pname = "parsley"
local step = 5
-- Parsley
farming.register_plant("cucina_vegana:" .. pname, {
description = dname .. " " .. S("Seed"),
inventory_image = "cucina_vegana_" .. pname .. "_seed.png",
steps = step,
minlight = 11,
maxlight = default.LIGHT_MAX,
fertility = {"grassland"},
groups = {flammable = 4, attached_node = 1},
})
-- Register for Mapgen
minetest.register_node("cucina_vegana:wild_" .. pname, {
description = S("Wild") .. " " .. dname,
paramtype = "light",
walkable = false,
drop = {
items = {
{items = {"cucina_vegana:seed_" .. pname .. " 3"}},
{items = {"cucina_vegana:" .. pname}},
}
},
drawtype = "plantlike",
paramtype2 = "facedir",
tiles = {"cucina_vegana_" .. pname .. "_" .. step .. ".png"},
sunlight_propagates = true,
groups = {snappy = 3, dig_immediate=1, flammable=2, plant=1, attached_node = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.35, 0.5}, -- side f
},
},
})
minetest.register_alias("parsley:parsley", "cucina_vegana:" .. pname)
minetest.register_alias("parsley:seed", "cucina_vegana:" .. pname .. "_seed")
minetest.register_alias("parsley:wild_parsley", "cucina_vegana:wild_" .. pname)
if (minetest.get_modpath("farming_nextgen")) then
farmingNG.register_seed("cucina_vegana:seed_parsley", "cucina_vegana:" .. pname .. "_1")
farmingNG.register_harvest("cucina_vegana:" .. pname .. "_" .. step)
end