Multiple changes
There are now five bushes in this mod: strawberry, blackberry, blueberry, raspberry, and gooseberry. Instead of giving you the fruit, digging a bush now directly gives you that bush, with a 1/5 chance of getting two. Craft one bush by itself to turn it into four of the corresponding fruit. Craft six of that fruit to get the bush back (this is how it was before, I opted to keep it that way). Craft: - - - S J S f f f That is, two sugar, one jungle grass, and three fruit as before, to get one raw pie of that fruit. Cook it as usual. Heals 2 hearts. Craft one whole pie by itself to get four slices, each of which heals 1/2 heart. Craft: S J S f f f f f f That is, two sugar, one jungle grass, and mix-and-match six fruits to get two mixed fruit pies. Cook as usual, craft one to get four slices. Baskets of pies can be crafted the same as before (craft a basket from four sticks in a "T" shape, then craft one of those plus three pies of the desired type). In addition: some moderate rewriting and re-arranging of the code to facilitating adding the new objects. Made the bushes lower-resolution (they were 64px, which made them not fit in so well into the usual 16px landscape - reduced them to 32px. Ditto for the basket textures. Pies are all 16px. New textures for the pies.
@ -1,23 +1,15 @@
|
||||
-- Basket
|
||||
minetest.register_node(":bushes:basket_empty", {
|
||||
description = "Basket",
|
||||
tiles = {
|
||||
"bushes_basket_empty_top.png",
|
||||
"bushes_basket_bottom.png",
|
||||
"bushes_basket_side.png"
|
||||
},
|
||||
groups = { dig_immediate = 3 },
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = ':bushes:basket_empty',
|
||||
output = ":bushes:basket_empty",
|
||||
recipe = {
|
||||
{ 'default:stick', 'default:stick', 'default:stick' },
|
||||
{ '', 'default:stick', '' },
|
||||
{ "default:stick", "default:stick", "default:stick" },
|
||||
{ "", "default:stick", "" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Sugar
|
||||
|
||||
minetest.register_craftitem(":bushes:sugar", {
|
||||
description = "Sugar",
|
||||
inventory_image = "bushes_sugar.png",
|
||||
@ -25,65 +17,92 @@ minetest.register_craftitem(":bushes:sugar", {
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'bushes:sugar 1',
|
||||
output = "bushes:sugar 1",
|
||||
recipe = {
|
||||
{ 'default:papyrus', 'default:papyrus' },
|
||||
{ "default:papyrus", "default:papyrus" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Raw pie
|
||||
minetest.register_craftitem(":bushes:berry_pie_raw", {
|
||||
description = "Raw berry pie",
|
||||
inventory_image = "bushes_berry_pie_raw.png",
|
||||
on_use = minetest.item_eat(3),
|
||||
for i, berry in ipairs(bushes_classic.bushes) do
|
||||
local desc = bushes_classic.bushes_descriptions[i]
|
||||
|
||||
minetest.register_craftitem(":bushes:"..berry.."_pie_raw", {
|
||||
description = "Raw "..desc.." pie",
|
||||
inventory_image = "bushes_"..berry.."_pie_raw.png",
|
||||
on_use = minetest.item_eat(3),
|
||||
})
|
||||
|
||||
if berry ~= "mixed_berry" then
|
||||
minetest.register_craftitem(":bushes:"..berry, {
|
||||
description = "Raw "..desc.." pie",
|
||||
inventory_image = "bushes_"..berry..".png",
|
||||
groups = {berry = 1},
|
||||
on_use = minetest.item_eat(3),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bushes:"..berry.."_pie_raw 1",
|
||||
recipe = {
|
||||
{ "bushes:sugar", "default:junglegrass", "bushes:sugar" },
|
||||
{ "bushes:"..berry, "bushes:"..berry, "bushes:"..berry },
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- Cooked pie
|
||||
|
||||
minetest.register_craftitem(":bushes:"..berry.."_pie_cooked", {
|
||||
description = "Cooked "..desc.." pie",
|
||||
inventory_image = "bushes_"..berry.."_pie_cooked.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "bushes:"..berry.."_pie_cooked",
|
||||
recipe = "bushes:"..berry.."_pie_raw",
|
||||
cooktime = 30,
|
||||
})
|
||||
|
||||
-- slice of pie
|
||||
|
||||
minetest.register_craftitem(":bushes:"..berry.."_pie_slice", {
|
||||
description = "Slice of "..desc.." pie",
|
||||
inventory_image = "bushes_"..berry.."_pie_slice.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bushes:"..berry.."_pie_slice 4",
|
||||
recipe = {
|
||||
{ "bushes:"..berry.."_pie_cooked" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Basket with pies
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bushes:basket_"..berry.." 1",
|
||||
recipe = {
|
||||
{ "bushes:berry_pie_cooked", "bushes:berry_pie_cooked", "bushes:berry_pie_cooked" },
|
||||
{ "", "bushes:basket_empty", "" },
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bushes:strawberry_pie_raw 1",
|
||||
recipe = {
|
||||
{ "bushes:sugar", "default:junglegrass", "bushes:sugar" },
|
||||
{ "farming_plus:strawberry_item", "farming_plus:strawberry_item", "farming_plus:strawberry_item" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'bushes:berry_pie_raw 1',
|
||||
recipe = {
|
||||
{ 'bushes:sugar', 'default:junglegrass', 'bushes:sugar' },
|
||||
{ 'bushes:strawberry', 'bushes:strawberry', 'bushes:strawberry' },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'bushes:berry_pie_raw 1',
|
||||
recipe = {
|
||||
{ 'bushes:sugar', 'default:junglegrass', 'bushes:sugar' },
|
||||
{ 'farming_plus:strawberry_item', 'farming_plus:strawberry_item', 'farming_plus:strawberry_item' },
|
||||
},
|
||||
})
|
||||
|
||||
-- Cooked pie
|
||||
minetest.register_craftitem(":bushes:berry_pie_cooked", {
|
||||
description = "Cooked berry pie",
|
||||
inventory_image = "bushes_berry_pie_cooked.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'cooking',
|
||||
output = 'bushes:berry_pie_cooked',
|
||||
recipe = 'bushes:berry_pie_raw',
|
||||
cooktime = 30,
|
||||
})
|
||||
|
||||
-- Basket with pies
|
||||
minetest.register_node(":bushes:basket_pies", {
|
||||
description = "Basket with pies",
|
||||
tiles = {
|
||||
"bushes_basket_full_top.png",
|
||||
"bushes_basket_bottom.png",
|
||||
"bushes_basket_side.png"
|
||||
},
|
||||
on_use = minetest.item_eat(15),
|
||||
groups = { dig_immediate = 3 },
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'bushes:basket_pies 1',
|
||||
recipe = {
|
||||
{ 'bushes:berry_pie_cooked', 'bushes:berry_pie_cooked', 'bushes:berry_pie_cooked' },
|
||||
{ '', 'bushes:basket_empty', '' },
|
||||
},
|
||||
output = "bushes:mixed_berry_pie_raw 2",
|
||||
recipe = {
|
||||
{ "bushes:sugar", "default:junglegrass", "bushes:sugar" },
|
||||
{ "group:berry", "group:berry", "group:berry" },
|
||||
{ "group:berry", "group:berry", "group:berry" },
|
||||
},
|
||||
})
|
||||
|
5
bushes_classic/image_credits.txt
Normal file
@ -0,0 +1,5 @@
|
||||
strawberry: http://www.clker.com/clipart-4060.html
|
||||
blueberry: http://www.clker.com/clipart-cerezafiro12.html
|
||||
blackberry: http://www.clker.com/clipart-blackberry-2.html
|
||||
raspberry: http://www.clker.com/clipart-simple-raspberry.html
|
||||
gooseberry: http://www.clker.com/clipart-26281.html
|
@ -1,49 +1,36 @@
|
||||
local BUSHES = {
|
||||
-- Bushes classic mod originally by unknown
|
||||
-- now maintained by VanessaE
|
||||
--
|
||||
-- License: WTFPL
|
||||
|
||||
bushes_classic = {}
|
||||
|
||||
bushes_classic.bushes = {
|
||||
"strawberry",
|
||||
"blackberry",
|
||||
"blueberry",
|
||||
"raspberry",
|
||||
"gooseberry",
|
||||
"mixed_berry"
|
||||
}
|
||||
|
||||
local BUSHES_DESCRIPTIONS = {
|
||||
bushes_classic.bushes_descriptions = {
|
||||
"Strawberry",
|
||||
"Blackberry",
|
||||
"Blueberry",
|
||||
"Raspberry",
|
||||
"Gooseberry",
|
||||
"Mixed Berry"
|
||||
}
|
||||
|
||||
local spawn_list = {}
|
||||
bushes_classic.spawn_list = {}
|
||||
|
||||
for i, bush_name in ipairs(BUSHES) do
|
||||
minetest.register_node(":bushes:" .. bush_name .. "_bush", {
|
||||
description = BUSHES_DESCRIPTIONS[i] .. " bush",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.3,
|
||||
tiles = { "bushes_" .. bush_name .. "_bush.png" },
|
||||
inventory_image = "bushes_" .. bush_name .. "_bush.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
drop = 'bushes:' .. bush_name .. ' 4',
|
||||
groups = { snappy = 3, bush = 1, flammable = 2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":bushes:" .. bush_name, {
|
||||
description = BUSHES_DESCRIPTIONS[i],
|
||||
inventory_image = "bushes_" .. bush_name .. ".png",
|
||||
stack_max = 99,
|
||||
on_use = minetest.item_eat(1),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'bushes:' .. bush_name .. '_bush',
|
||||
recipe = {
|
||||
{ 'bushes:' .. bush_name, 'bushes:' .. bush_name, 'bushes:' .. bush_name },
|
||||
{ 'bushes:' .. bush_name, 'bushes:' .. bush_name, 'bushes:' .. bush_name },
|
||||
}
|
||||
})
|
||||
|
||||
table.insert(spawn_list, "bushes:"..bush_name.."_bush")
|
||||
end
|
||||
dofile(minetest.get_modpath('bushes_classic') .. '/cooking.lua')
|
||||
dofile(minetest.get_modpath('bushes_classic') .. '/nodes.lua')
|
||||
|
||||
plantslib:spawn_on_surfaces({
|
||||
spawn_delay = 3600,
|
||||
spawn_plants = spawn_list,
|
||||
spawn_plants = bushes_classic.spawn_list,
|
||||
avoid_radius = 10,
|
||||
spawn_chance = 100,
|
||||
spawn_surfaces = {
|
||||
@ -53,7 +40,7 @@ plantslib:spawn_on_surfaces({
|
||||
"woodsoils:grass_with_leaves_2"
|
||||
},
|
||||
avoid_nodes = {"group:bush"},
|
||||
seed_diff = 545342534, -- guaranteed to be random :P
|
||||
seed_diff = 545342534, -- chosen by a fair mashing of the keyboard - guaranteed to be random :P
|
||||
plantlife_limit = -0.1,
|
||||
light_min = 10,
|
||||
temp_min = 0.15, -- approx 20C
|
||||
@ -62,6 +49,6 @@ plantslib:spawn_on_surfaces({
|
||||
humidity_max = -1, -- 100% RH
|
||||
})
|
||||
|
||||
dofile(minetest.get_modpath('bushes_classic') .. '/cooking.lua')
|
||||
minetest.register_alias("bushes:basket_pies", "bushes:basket_strawberry")
|
||||
|
||||
print("[Bushes] Loaded.")
|
||||
|
65
bushes_classic/nodes.lua
Normal file
@ -0,0 +1,65 @@
|
||||
for i, bush_name in ipairs(bushes_classic.bushes) do
|
||||
local desc = bushes_classic.bushes_descriptions[i]
|
||||
|
||||
if bush_name ~= "mixed_berry" then
|
||||
minetest.register_node(":bushes:" .. bush_name .. "_bush", {
|
||||
description = desc.." Bush",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.3,
|
||||
tiles = { "bushes_" .. bush_name .. "_bush.png" },
|
||||
inventory_image = "bushes_" .. bush_name .. "_bush.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
|
||||
groups = { snappy = 3, bush = 1, flammable = 2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drop = {
|
||||
max_items = 2,
|
||||
items = {
|
||||
{items = {"bushes:" .. bush_name .. "_bush"}, rarity = 1 }, -- always get at least one on dig
|
||||
{items = {"bushes:" .. bush_name .. "_bush"}, rarity = 5 }, -- 1/5 chance of getting a second one.
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bushes:"..bush_name.." 4",
|
||||
recipe = {
|
||||
{ "bushes:"..bush_name.."_bush", },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bushes:" .. bush_name .. "_bush",
|
||||
recipe = {
|
||||
{ "bushes:" .. bush_name, "bushes:" .. bush_name, "bushes:" .. bush_name },
|
||||
{ "bushes:" .. bush_name, "bushes:" .. bush_name, "bushes:" .. bush_name },
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_node(":bushes:basket_"..bush_name, {
|
||||
description = "Basket with "..desc.." Pies",
|
||||
tiles = {
|
||||
"bushes_basket_"..bush_name.."_top.png",
|
||||
"bushes_basket_bottom.png",
|
||||
"bushes_basket_side.png"
|
||||
},
|
||||
on_use = minetest.item_eat(15),
|
||||
groups = { dig_immediate = 3 },
|
||||
})
|
||||
|
||||
table.insert(bushes_classic.spawn_list, "bushes:"..bush_name.."_bush")
|
||||
end
|
||||
|
||||
minetest.register_node(":bushes:basket_empty", {
|
||||
description = "Basket",
|
||||
tiles = {
|
||||
"bushes_basket_empty_top.png",
|
||||
"bushes_basket_bottom.png",
|
||||
"bushes_basket_side.png"
|
||||
},
|
||||
groups = { dig_immediate = 3 },
|
||||
})
|
||||
|
BIN
bushes_classic/textures/bushes_basket_blackberry_top.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
bushes_classic/textures/bushes_basket_blueberry_top.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 283 B After Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 285 B After Width: | Height: | Size: 271 B |
Before Width: | Height: | Size: 633 B |
BIN
bushes_classic/textures/bushes_basket_gooseberry_top.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
bushes_classic/textures/bushes_basket_mixed_berry_top.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
bushes_classic/textures/bushes_basket_raspberry_top.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 341 B |
BIN
bushes_classic/textures/bushes_basket_strawberry_top.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 918 B |
Before Width: | Height: | Size: 918 B |
BIN
bushes_classic/textures/bushes_blackberry.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
bushes_classic/textures/bushes_blackberry_bush.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
bushes_classic/textures/bushes_blackberry_pie_cooked.png
Normal file
After Width: | Height: | Size: 725 B |
BIN
bushes_classic/textures/bushes_blackberry_pie_raw.png
Normal file
After Width: | Height: | Size: 751 B |
BIN
bushes_classic/textures/bushes_blackberry_pie_slice.png
Normal file
After Width: | Height: | Size: 391 B |
BIN
bushes_classic/textures/bushes_blueberry.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
bushes_classic/textures/bushes_blueberry_bush.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
bushes_classic/textures/bushes_blueberry_pie_cooked.png
Normal file
After Width: | Height: | Size: 734 B |
BIN
bushes_classic/textures/bushes_blueberry_pie_raw.png
Normal file
After Width: | Height: | Size: 771 B |
BIN
bushes_classic/textures/bushes_blueberry_pie_slice.png
Normal file
After Width: | Height: | Size: 409 B |
BIN
bushes_classic/textures/bushes_gooseberry.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
bushes_classic/textures/bushes_gooseberry_bush.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
bushes_classic/textures/bushes_gooseberry_pie_cooked.png
Normal file
After Width: | Height: | Size: 705 B |
BIN
bushes_classic/textures/bushes_gooseberry_pie_raw.png
Normal file
After Width: | Height: | Size: 739 B |
BIN
bushes_classic/textures/bushes_gooseberry_pie_slice.png
Normal file
After Width: | Height: | Size: 426 B |
BIN
bushes_classic/textures/bushes_mixed_berry_pie_cooked.png
Normal file
After Width: | Height: | Size: 716 B |
BIN
bushes_classic/textures/bushes_mixed_berry_pie_raw.png
Normal file
After Width: | Height: | Size: 781 B |
BIN
bushes_classic/textures/bushes_mixed_berry_pie_slice.png
Normal file
After Width: | Height: | Size: 421 B |
BIN
bushes_classic/textures/bushes_raspberry.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
bushes_classic/textures/bushes_raspberry_bush.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
bushes_classic/textures/bushes_raspberry_pie_cooked.png
Normal file
After Width: | Height: | Size: 708 B |
BIN
bushes_classic/textures/bushes_raspberry_pie_raw.png
Normal file
After Width: | Height: | Size: 747 B |
BIN
bushes_classic/textures/bushes_raspberry_pie_slice.png
Normal file
After Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 824 B After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 2.0 KiB |
BIN
bushes_classic/textures/bushes_strawberry_pie_cooked.png
Normal file
After Width: | Height: | Size: 671 B |
BIN
bushes_classic/textures/bushes_strawberry_pie_raw.png
Normal file
After Width: | Height: | Size: 747 B |
BIN
bushes_classic/textures/bushes_strawberry_pie_slice.png
Normal file
After Width: | Height: | Size: 386 B |