Chili added.

master
acmgit 2022-02-14 19:58:40 +01:00
parent 7c09c9f96a
commit 8e1919ca44
27 changed files with 247 additions and 2 deletions

17
chili.lua Normal file
View File

@ -0,0 +1,17 @@
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = cucina_vegana.plant_settings.chili_scale,
spread = {x = 70, y = 70, z = 70},
seed = 8154711,
octaves = 3,
persist = 0.6
},
y_min = 0,
y_max = 150,
decoration = "cucina_vegana:wild_chili",
})

67
chili_default.lua Normal file
View File

@ -0,0 +1,67 @@
--[[
**********************************************
*** Chili default ***
**********************************************
]]--
-- Load support for intllib.
local S = cucina_vegana.get_translator
local dname = S("Chili")
local pname = "chili"
local step = 7
-- Chili
farming.register_plant("cucina_vegana:" .. pname, {
description = dname .. " " .. S("Seed"),
harvest_description = dname,
inventory_image = "cucina_vegana_" .. pname .. "_seed.png",
steps = step,
minlight = cucina_vegana.plant_settings.chili_light,
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 .. " 4"}},
}
},
drawtype = "plantlike",
paramtype2 = "facedir",
sunlight_propagates = true,
tiles = {"cucina_vegana_" .. pname .. "_" .. step .. ".png"},
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
},
},
})
cucina_vegana.add_group("cucina_vegana:seed_" .. pname, {seed_chili = 1})
if(cucina_vegana.plant_settings.bonemeal) then
table.insert(cucina_vegana.plant_settings.bonemeal_list,
{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:seed_" .. pname})
end -- if(cucina_vegana.plant_settings.bonemeal
-- Register @ farming_nextgen
if cucina_vegana.farming_ng then
cucina_vegana.register_farming_ng(pname, step)
end -- if(cucina_vegana.farming_ng
-- Register @ Signs_bot
if(cucina_vegana.sign_bot) then
cucina_vegana.register_signs_bot(pname, 1, step)
end

142
chili_redo.lua Normal file
View File

@ -0,0 +1,142 @@
--[[
**********************************************
*** Chili redo ***
**********************************************
]]--
-- Load support for intllib.
local S = cucina_vegana.get_translator
local dname = S("Chili")
local pname = "chili"
local step = 7
local germ = tonumber(cucina_vegana.plant_settings.germ_launch)
if germ == 0 then
germ = "_seed"
else
germ = "_" .. germ
end
-- chives
minetest.register_node("cucina_vegana:" .. pname .. "_seed", {
description = dname .. " " .. S("Seed"),
tiles = {"cucina_vegana_" .. pname .. "_seed.png"},
inventory_image = "cucina_vegana_" .. pname .. "_seed.png",
wield_image = "cucina_vegana_" .. pname .. "_seed.png",
minlight = cucina_vegana.plant_settings.chili_light,
drawtype = "signlike",
groups = {seed = 1, snappy = 3, attached_node = 1, dig_immediate=1, flammable = 4},
paramtype = "light",
paramtype2 = "wallmounted",
walkable = false,
sunlight_propagates = true,
selection_box = farming.select,
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "cucina_vegana:" .. pname .. germ)
end,
})
-- chives definition
local crop_def = {
drawtype = "plantlike",
tiles = {"cucina_vegana_" .. pname .. "_1.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
waving = 1,
buildable_to = true,
minlight = cucina_vegana.plant_settings.chili_light,
drop = "",
selection_box = farming.select,
groups = {
flammable = 4, snappy=3, dig_immediate=1, plant = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults()
}
-- stage 1
minetest.register_node("cucina_vegana:" .. pname .. "_1", table.copy(crop_def))
-- stage 2
crop_def.tiles = {"cucina_vegana_" .. pname .. "_2.png"}
minetest.register_node("cucina_vegana:" .. pname .. "_2", table.copy(crop_def))
-- stage 3
crop_def.tiles = {"cucina_vegana_" .. pname .. "_3.png"}
minetest.register_node("cucina_vegana:" .. pname .. "_3", table.copy(crop_def))
-- stage 4
crop_def.tiles = {"cucina_vegana_" .. pname .. "_4.png"}
minetest.register_node("cucina_vegana:" .. pname .. "_4", table.copy(crop_def))
-- stage 5
crop_def.tiles = {"cucina_vegana_" .. pname .. "_5.png"}
minetest.register_node("cucina_vegana:" .. pname .. "_5", table.copy(crop_def))
-- stage 6
crop_def.tiles = {"cucina_vegana_" .. pname .. "_6.png"}
crop_def.drop = {
items = {
{items = {"cucina_vegana:" .. pname .. "_seed"}, rarity = 2},
}
}
minetest.register_node("cucina_vegana:" .. pname .. "_6", table.copy(crop_def))
-- stage 7 (final)
crop_def.tiles = {"cucina_vegana_" .. pname .. "_" .. step .. ".png"}
crop_def.groups.growing = 0
crop_def.drop = {
items = {
{items = {"cucina_vegana:" .. pname .. "_seed 2"}, rarity = 1},
{items = {"cucina_vegana:" .. pname .. "_seed 3"}, rarity = 2},
{items = {"cucina_vegana:" .. pname .. "_seed 4"}, rarity = 3},
}
}
minetest.register_node("cucina_vegana:" .. pname .. "_" .. step, table.copy(crop_def))
-- Register for Mapgen
minetest.register_node("cucina_vegana:wild_" .. pname .. "", {
description = S("Wild ") .. dname,
paramtype = "light",
walkable = false,
drop = {
items = {
{items = {"cucina_vegana:" .. pname .. "_seed 3"}},
}
},
drawtype = "plantlike",
paramtype2 = "facedir",
tiles = {"cucina_vegana_" .. pname .. "_" .. step .. ".png"},
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
},
},
})
cucina_vegana.add_group("cucina_vegana:" .. pname .. "_seed", {seed_chili = 1})
if(cucina_vegana.plant_settings.bonemeal) then
table.insert(cucina_vegana.plant_settings.bonemeal_list,
{"cucina_vegana:" .. pname .. "_", step, "cucina_vegana:" .. pname .. "_seed"})
end -- if(cucina_vegana.plant_settings.bonemeal
-- Register @ farming_nextgen
if cucina_vegana.farming_ng then
cucina_vegana.register_farming_ng(pname, step)
end -- if(cucina_vegana.farming_ng
-- Register @ Signs_bot
if(cucina_vegana.sign_bot) then
cucina_vegana.register_signs_bot(pname, 1, step)
end

View File

@ -84,6 +84,7 @@ local plants = {
["potato"] = cucina_vegana.plant_settings.potato,
["carrot"] = cucina_vegana.plant_settings.carrot,
["garlic"] = cucina_vegana.plant_settings.garlic,
["chili"] = cucina_vegana.plant_settings.garlic,
}

View File

@ -266,6 +266,13 @@ minetest.register_craftitem("cucina_vegana:garlic", {
groups = {flammable = 1, food = 1, food_vegan = 1, food_garlic = 1},
})
minetest.register_craftitem("cucina_vegana:chili", {
description = S("Chili"),
inventory_image = "cucina_vegana_chili.png",
groups = {flammable = 1, food = 1, food_vegan = 1, food_chili = 1},
on_use = minetest.item_eat(1),
})
-- *******************************************
-- ***** Food *****
-- *******************************************

View File

@ -1,6 +1,6 @@
--[[
**********************************************
*** Flex redo ***
*** Peanut redo ***
**********************************************
]]--

View File

@ -14,6 +14,7 @@
{'cucina_vegana:tomato', 4, nil, nil, nil, nil},
{'cucina_vegana:potato', 5, nil, nil, nil, nil},
{'cucina_vegana:carrot', 3, nil, nil, nil, nil},
{'cucina_vegana:chili', 1, nil, nil, nil, nil},
-- Name Saturation Replace with Poison Heal Sound
-- side dishes

View File

@ -91,3 +91,8 @@ cucina_vegana.plant_settings.carrot_light = minetest.settings:get(cv_setting .."
cucina_vegana.plant_settings.garlic = minetest.settings:get_bool(cv_setting .."garlic", true)
cucina_vegana.plant_settings.garlic_scale = minetest.settings:get(cv_setting .."garlic_scale") or 0.0006
cucina_vegana.plant_settings.garlic_light = minetest.settings:get(cv_setting .."garlic_light") or 12
-- Chili
cucina_vegana.plant_settings.chili = minetest.settings:get_bool(cv_setting .."chili", true)
cucina_vegana.plant_settings.chili_scale = minetest.settings:get(cv_setting .."chili_scale") or 0.0003
cucina_vegana.plant_settings.chili_light = minetest.settings:get(cv_setting .."chili_light") or 13

View File

@ -78,6 +78,11 @@ cucina_vegana.plant_settings.carrot_scale (Spreadvalue) float 0.0005
cucina_vegana.plant_settings.carrot_light (Min. Light) int 11
#Garlic
cucina_vegana.plant_settings.garlic (Enable Carrot) bool true
cucina_vegana.plant_settings.garlic (Enable Garlic) bool true
cucina_vegana.plant_settings.garlic_scale (Spreadvalue) float 0.0006
cucina_vegana.plant_settings.garlic_light (Min. Light) int 12
#Chili
cucina_vegana.plant_settings.chili (Enable Chili) bool true
cucina_vegana.plant_settings.chili_scale (Spreadvalue) float 0.0003
cucina_vegana.plant_settings.chili_light (Min. Light) int 13

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B