cucina_vegana/sunflower_default.lua

64 lines
1.8 KiB
Lua
Raw Normal View History

--[[
**********************************************
*** Sunflower default ***
**********************************************
]]--
local modpath = minetest.get_modpath(minetest.get_current_modname())
-- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local dname = S("Sunflower")
local pname = "sunflower"
local step = 5
if(minetest.registered_nodes["flowers:sunflower"] ~= nil) then
print("[MOD] " .. minetest.get_current_modname() .. " Sunflowers available.")
print("[MOD] " .. minetest.get_current_modname() .. " using \"flowers:sunflower\".")
else
2018-12-27 19:17:31 +01:00
farming.register_plant("cucina_vegana:" .. pname, {
2018-12-27 00:08:09 +01:00
description = dname,
inventory_image = "cucina_vegana_" .. pname .. "_seed.png",
steps = step,
minlight = 13,
maxlight = default.LIGHT_MAX,
fertility = {"grassland"},
groups = {flammable = 4},
})
-- 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,
drop = {
items = {
{items = {"cucina_vegana:seed_" .. pname .. " 2"}},
{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},
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
},
},
})
end
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 .. "")
end