added chili peppers and bowl of chili
|
@ -13,6 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
|
|||
|
||||
Changelog:
|
||||
|
||||
1.28 - Added chili peppers and bowl of chili, optimized code and fixed a few bugs
|
||||
1.27 - Added meshoptions to api and wheat plants, added farming.rarity setting to spawn more/less crops on map, have separate cotton/string items (4x cotton = 1x wool, 2x cotton = 2x string)
|
||||
1.26 - Added support for [toolranks] mod when using hoe's
|
||||
1.25 - Added check for farming.conf setting file to disable specific crops globally (inside mod folder) or world specific (inside world folder)
|
||||
|
@ -49,7 +50,7 @@ Changelog:
|
|||
0.1 - Fixed growing bug
|
||||
0.0 - Initial release
|
||||
|
||||
Lucky Blocks: 11 (plus 3 for default farming items)
|
||||
Lucky Blocks: 16
|
||||
|
||||
|
||||
License of media (textures):
|
||||
|
|
88
chili.lua
Normal file
|
@ -0,0 +1,88 @@
|
|||
|
||||
local S = farming.intllib
|
||||
|
||||
-- chili pepper
|
||||
minetest.register_craftitem("farming:chili_pepper", {
|
||||
description = S("Chili Pepper"),
|
||||
inventory_image = "farming_chili_pepper.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:chili_1")
|
||||
end,
|
||||
on_use = minetest.item_eat(2),
|
||||
})
|
||||
|
||||
-- bowl of chili
|
||||
minetest.register_craftitem("farming:chili_bowl", {
|
||||
description = S("Bowl of Chili"),
|
||||
inventory_image = "farming_chili_bowl.png",
|
||||
on_use = minetest.item_eat(8),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "farming:chili_bowl",
|
||||
recipe = {"farming:chili_pepper", "farming:barley", "farming:tomato", "farming:beans"}
|
||||
})
|
||||
|
||||
-- chili can be used for red dye
|
||||
minetest.register_craft({
|
||||
output = "dye:red",
|
||||
recipe = {
|
||||
{'farming:chili_pepper'},
|
||||
}
|
||||
})
|
||||
|
||||
-- chili definition
|
||||
local crop_def = {
|
||||
drawtype = "plantlike",
|
||||
tiles = {"farming_chili_1.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "",
|
||||
selection_box = farming.select,
|
||||
groups = {
|
||||
snappy = 3, flammable = 4, plant = 1, attached_node = 1,
|
||||
not_in_creative_inventory = 1, growing = 1
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults()
|
||||
}
|
||||
|
||||
-- stage 1
|
||||
minetest.register_node("farming:chili_1", table.copy(crop_def))
|
||||
|
||||
-- stage 2
|
||||
crop_def.tiles = {"farming_chili_2.png"}
|
||||
minetest.register_node("farming:chili_2", table.copy(crop_def))
|
||||
|
||||
-- stage 3
|
||||
crop_def.tiles = {"farming_chili_3.png"}
|
||||
minetest.register_node("farming:chili_3", table.copy(crop_def))
|
||||
|
||||
-- stage 4
|
||||
crop_def.tiles = {"farming_chili_4.png"}
|
||||
minetest.register_node("farming:chili_4", table.copy(crop_def))
|
||||
|
||||
-- stage 5
|
||||
crop_def.tiles = {"farming_chili_5.png"}
|
||||
minetest.register_node("farming:chili_5", table.copy(crop_def))
|
||||
|
||||
-- stage 6
|
||||
crop_def.tiles = {"farming_chili_6.png"}
|
||||
minetest.register_node("farming:chili_6", table.copy(crop_def))
|
||||
|
||||
-- stage 7
|
||||
crop_def.tiles = {"farming_chili_7.png"}
|
||||
minetest.register_node("farming:chili_7", table.copy(crop_def))
|
||||
|
||||
-- stage 8 (final)
|
||||
crop_def.tiles = {"farming_chili_8.png"}
|
||||
crop_def.groups.growing = 0
|
||||
crop_def.drop = {
|
||||
items = {
|
||||
{items = {'farming:chili 3'}, rarity = 1},
|
||||
{items = {'farming:chili 2'}, rarity = 2},
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:chili_8", table.copy(crop_def))
|
|
@ -23,6 +23,7 @@ farming.rhubarb = true
|
|||
farming.beans = true
|
||||
farming.grapes = true
|
||||
farming.barley = true
|
||||
farming.chili = true
|
||||
farming.hemp = true
|
||||
farming.donuts = true
|
||||
|
||||
|
|
2
init.lua
|
@ -592,6 +592,7 @@ farming.rhubarb = true
|
|||
farming.beans = true
|
||||
farming.grapes = true
|
||||
farming.barley = true
|
||||
farming.chili = true
|
||||
farming.hemp = true
|
||||
farming.donuts = true
|
||||
farming.rarety = 0.006
|
||||
|
@ -641,6 +642,7 @@ if farming.rhubarb then dofile(farming.path.."/rhubarb.lua") end
|
|||
if farming.beans then dofile(farming.path.."/beanpole.lua") end
|
||||
if farming.grapes then dofile(farming.path.."/grapes.lua") end
|
||||
if farming.barley then dofile(farming.path.."/barley.lua") end
|
||||
if farming.chili then dofile(farming.path.."/chili.lua") end
|
||||
if farming.hemp then dofile(farming.path.."/hemp.lua") end
|
||||
if farming.donuts then dofile(farming.path.."/donut.lua") end
|
||||
|
||||
|
|
|
@ -15,5 +15,7 @@ if minetest.get_modpath("lucky_block") then
|
|||
{"nod", "farming:melon", 0},
|
||||
{"dro", {"farming:donut", "farming:donut_chocolate", "farming:donut_apple"}, 5},
|
||||
{"dro", {"farming:hemp_leaf", "farming:hemp_fibre", "farming:seed_hemp"}, 5},
|
||||
{"nod", "fire:permanent_flame", 1},
|
||||
{"dro", {"farming:chili_pepper", "farming:chili_bowl"}, 5},
|
||||
})
|
||||
end
|
||||
|
|
21
mapgen.lua
|
@ -73,3 +73,24 @@ minetest.register_decoration({
|
|||
num_spawn_by = 1,
|
||||
})
|
||||
end
|
||||
|
||||
if farming.chili then
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass", "default:dirt_with_rainforest_litter"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = farming.rarety, -- 0.06,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 760,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
y_min = 5,
|
||||
y_max = 35,
|
||||
decoration = {"farming:chili_8"},
|
||||
spawn_by = "group:tree",
|
||||
num_spawn_by = 1,
|
||||
})
|
||||
end
|
||||
|
|
BIN
textures/farming_chili_1.png
Normal file
After Width: | Height: | Size: 113 B |
BIN
textures/farming_chili_2.png
Normal file
After Width: | Height: | Size: 107 B |
BIN
textures/farming_chili_3.png
Normal file
After Width: | Height: | Size: 137 B |
BIN
textures/farming_chili_4.png
Normal file
After Width: | Height: | Size: 144 B |
BIN
textures/farming_chili_5.png
Normal file
After Width: | Height: | Size: 154 B |
BIN
textures/farming_chili_6.png
Normal file
After Width: | Height: | Size: 157 B |
BIN
textures/farming_chili_7.png
Normal file
After Width: | Height: | Size: 169 B |
BIN
textures/farming_chili_8.png
Normal file
After Width: | Height: | Size: 169 B |
BIN
textures/farming_chili_bowl.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
textures/farming_chili_pepper.png
Normal file
After Width: | Height: | Size: 194 B |