cucina_vegana/kohlrabi_default.lua

67 lines
2.2 KiB
Lua
Raw Normal View History

--[[
**********************************************
*** Kohlrabi default ***
**********************************************
]]--
-- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
2019-07-16 23:56:14 +02:00
local S = dofile(MP.."/intllib.lua")
local dname = S("Kohlrabi")
local pname = "kohlrabi"
local step = 6
2019-01-13 20:14:07 +01:00
local modname = minetest.get_current_modname()
-- kohlrabi
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"),
inventory_image = "cucina_vegana_" .. pname .. "_seed.png",
steps = step,
2019-07-02 21:38:03 +02:00
minlight = cucina_vegana.plant_settings.kohlrabi_light,
fertility = {"grassland"},
groups = {flammable = 4, attached_node = 1},
})
2019-07-16 22:59:13 +02:00
-- Register for Mapgen
2018-12-27 19:17:31 +01:00
minetest.register_node("cucina_vegana:wild_" .. pname, {
2018-12-27 19:23:26 +01:00
description = S("Wild") .. " " .. dname,
paramtype = "light",
walkable = false,
2019-07-16 22:59:13 +02:00
drop = {
items = {
{items = {"cucina_vegana:seed_" .. pname .. " 3"}},
2018-12-27 19:17:31 +01:00
{items = {"cucina_vegana:" .. pname}},
}
},
drawtype = "plantlike",
paramtype2 = "facedir",
tiles = {"cucina_vegana_" .. pname .. "_" .. step .. ".png"},
2018-05-18 21:16:25 +02:00
sunlight_propagates = true,
groups = {snappy = 3, dig_immediate=1, flammable=2, plant=1, attached_node = 1, growing = 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-27 19:17:31 +01:00
minetest.register_alias("kohlrabi:kohlrabi", "cucina_vegana:" .. pname)
minetest.register_alias("kohlrabi:seed", "cucina_vegana:" .. pname .. "_seed")
2018-12-27 19:17:31 +01:00
minetest.register_alias("kohlrabi:wild_kohlrabi", "cucina_vegana:wild_" .. pname)
2019-07-02 21:38:03 +02:00
if(cucina_vegana.plant_settings.bonemeal) then
2019-07-16 23:56:14 +02:00
table.insert(cucina_vegana.plant_settings.bonemeal_list,
{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:seed_" .. pname})
2019-07-16 22:59:13 +02:00
2019-07-02 21:38:03 +02:00
end -- if(cucina_vegana.plant_settings.bonemeal
if (minetest.get_modpath("farming_nextgen")) then
2018-12-27 19:17:31 +01:00
farmingNG.register_seed("cucina_vegana:seed_" .. pname, "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.")
2019-07-16 22:59:13 +02:00
end