2018-12-26 21:16:41 +01:00
|
|
|
--[[
|
|
|
|
**********************************************
|
|
|
|
*** Parsley default ***
|
|
|
|
**********************************************
|
|
|
|
]]--
|
|
|
|
|
2018-05-28 01:10:48 +02:00
|
|
|
-- Load support for intllib.
|
|
|
|
local MP = minetest.get_modpath(minetest.get_current_modname())
|
|
|
|
local S, NS = dofile(MP.."/intllib.lua")
|
|
|
|
|
2018-12-26 21:16:41 +01:00
|
|
|
local dname = S("Parsley")
|
|
|
|
local pname = "parsley"
|
|
|
|
local step = 5
|
2019-01-13 20:14:07 +01:00
|
|
|
local modname = minetest.get_current_modname()
|
2018-12-26 21:16:41 +01:00
|
|
|
|
2018-05-16 19:28:05 +02:00
|
|
|
-- Parsley
|
2018-12-27 19:17:31 +01:00
|
|
|
farming.register_plant("cucina_vegana:" .. pname, {
|
2018-12-27 19:42:00 +01:00
|
|
|
description = dname .. " " .. S("Seed"),
|
2018-12-26 21:16:41 +01:00
|
|
|
inventory_image = "cucina_vegana_" .. pname .. "_seed.png",
|
|
|
|
steps = step,
|
2018-05-16 19:28:05 +02:00
|
|
|
minlight = 11,
|
|
|
|
maxlight = default.LIGHT_MAX,
|
|
|
|
fertility = {"grassland"},
|
|
|
|
groups = {flammable = 4, attached_node = 1},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Register for Mapgen
|
2018-12-26 21:16:41 +01:00
|
|
|
minetest.register_node("cucina_vegana:wild_" .. pname, {
|
2018-12-27 19:23:26 +01:00
|
|
|
description = S("Wild") .. " " .. dname,
|
2018-05-16 19:28:05 +02:00
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
drop = {
|
|
|
|
items = {
|
2018-12-26 21:16:41 +01:00
|
|
|
{items = {"cucina_vegana:seed_" .. pname .. " 3"}},
|
|
|
|
{items = {"cucina_vegana:" .. pname}},
|
2018-05-16 19:28:05 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
drawtype = "plantlike",
|
|
|
|
paramtype2 = "facedir",
|
2018-12-26 21:16:41 +01:00
|
|
|
tiles = {"cucina_vegana_" .. pname .. "_" .. step .. ".png"},
|
2018-05-18 21:16:25 +02:00
|
|
|
sunlight_propagates = true,
|
2018-05-16 19:28:05 +02:00
|
|
|
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
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2018-12-26 21:16:41 +01:00
|
|
|
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)
|
2019-01-13 20:14:07 +01:00
|
|
|
minetest.log("info", "[MOD] " .. modname .. ": cucina_vegana:seed_" .. pname .. " at farming_nextgen registered.")
|
|
|
|
|
2018-12-26 21:16:41 +01:00
|
|
|
end
|