1
0
mirror of https://github.com/rubenwardy/food.git synced 2024-12-22 16:00:19 +01:00
This commit is contained in:
rubenwardy 2014-11-16 13:05:15 +00:00
parent 30f3b6d7bc
commit 0164302915
3 changed files with 34 additions and 36 deletions

View File

@ -7,7 +7,7 @@
-- ===================================== -- =====================================
food.module("wheat", function() food.module("wheat", function()
minetest.register_craftitem("food:wheat", { minetest.register_craftitem(":food:wheat", {
description = S("Wheat"), description = S("Wheat"),
inventory_image = "food_wheat.png", inventory_image = "food_wheat.png",
groups = {food_wheat=1} groups = {food_wheat=1}
@ -22,7 +22,7 @@ food.module("wheat", function()
end, true) end, true)
food.module("flour", function() food.module("flour", function()
minetest.register_craftitem("food:flour", { minetest.register_craftitem(":food:flour", {
description = S("Flour"), description = S("Flour"),
inventory_image = "food_flour.png", inventory_image = "food_flour.png",
groups = {food_flour = 1} groups = {food_flour = 1}
@ -44,7 +44,7 @@ food.module("flour", function()
end, true) end, true)
food.module("potato", function() food.module("potato", function()
minetest.register_craftitem("food:potato", { minetest.register_craftitem(":food:potato", {
description = S("Potato"), description = S("Potato"),
inventory_image = "food_potato.png", inventory_image = "food_potato.png",
groups = {food_potato = 1} groups = {food_potato = 1}
@ -60,7 +60,7 @@ food.module("potato", function()
end, true) end, true)
food.module("orange", function() food.module("orange", function()
minetest.register_craftitem("food:orange", { minetest.register_craftitem(":food:orange", {
description = S("Orange"), description = S("Orange"),
inventory_image = "food_orange.png", inventory_image = "food_orange.png",
groups = {food_orange = 1} groups = {food_orange = 1}
@ -76,7 +76,7 @@ food.module("orange", function()
end, true) end, true)
food.module("tomato", function() food.module("tomato", function()
minetest.register_craftitem("food:tomato", { minetest.register_craftitem(":food:tomato", {
description = S("Tomato"), description = S("Tomato"),
inventory_image = "food_tomato.png", inventory_image = "food_tomato.png",
groups = {food_tomato = 1} groups = {food_tomato = 1}
@ -92,7 +92,7 @@ food.module("tomato", function()
end, true) end, true)
food.module("carrot", function() food.module("carrot", function()
minetest.register_craftitem("food:carrot", { minetest.register_craftitem(":food:carrot", {
description = S("Carrot"), description = S("Carrot"),
inventory_image = "food_carrot.png", inventory_image = "food_carrot.png",
groups = {food_carrot=1}, groups = {food_carrot=1},
@ -107,7 +107,7 @@ food.module("carrot", function()
end, true) end, true)
food.module("milk", function() food.module("milk", function()
minetest.register_craftitem("food:milk", { minetest.register_craftitem(":food:milk", {
description = S("Milk"), description = S("Milk"),
image = "food_milk.png", image = "food_milk.png",
on_use = food.item_eat(1), on_use = food.item_eat(1),
@ -125,7 +125,7 @@ food.module("milk", function()
end, true) end, true)
food.module("egg", function() food.module("egg", function()
minetest.register_craftitem("food:egg", { minetest.register_craftitem(":food:egg", {
description = S("Egg"), description = S("Egg"),
inventory_image = "food_egg.png", inventory_image = "food_egg.png",
groups = {food_egg=1} groups = {food_egg=1}
@ -141,7 +141,7 @@ food.module("egg", function()
end, true) end, true)
food.module("cocoa", function() food.module("cocoa", function()
minetest.register_craftitem("food:cocoa", { minetest.register_craftitem(":food:cocoa", {
description = S("Cocoa Bean"), description = S("Cocoa Bean"),
inventory_image = "food_cocoa.png", inventory_image = "food_cocoa.png",
groups = {food_cocoa=1} groups = {food_cocoa=1}
@ -157,7 +157,7 @@ food.module("cocoa", function()
end, true) end, true)
food.module("meat", function() food.module("meat", function()
minetest.register_craftitem("food:meat", { minetest.register_craftitem(":food:meat", {
description = S("Venison"), description = S("Venison"),
inventory_image = "food_meat.png", inventory_image = "food_meat.png",
groups = {food_meat=1, food_chicken=1} groups = {food_meat=1, food_chicken=1}
@ -170,7 +170,7 @@ food.module("meat", function()
}) })
if not minetest.get_modpath("animalmaterials") then if not minetest.get_modpath("animalmaterials") then
minetest.register_craftitem("food:meat_raw", { minetest.register_craftitem(":food:meat_raw", {
description = S("Raw meat"), description = S("Raw meat"),
image = "food_meat_raw.png", image = "food_meat_raw.png",
on_use = food.item_eat(1), on_use = food.item_eat(1),
@ -188,7 +188,7 @@ food.module("meat", function()
end, true) end, true)
food.module("sugar", function() food.module("sugar", function()
minetest.register_craftitem("food:sugar", { minetest.register_craftitem(":food:sugar", {
description = S("Sugar"), description = S("Sugar"),
inventory_image = "food_sugar.png", inventory_image = "food_sugar.png",
groups = {food_sugar=1} groups = {food_sugar=1}
@ -203,7 +203,7 @@ food.module("sugar", function()
end, true) end, true)
food.module("chocolate_powder", function() food.module("chocolate_powder", function()
minetest.register_craftitem("food:chocolate_powder", { minetest.register_craftitem(":food:chocolate_powder", {
description = S("Chocolate Powder"), description = S("Chocolate Powder"),
inventory_image = "food_chocolate_powder.png", inventory_image = "food_chocolate_powder.png",
groups = {food_choco_powder = 1} groups = {food_choco_powder = 1}
@ -219,7 +219,7 @@ food.module("chocolate_powder", function()
end, true) end, true)
food.module("pasta", function() food.module("pasta", function()
minetest.register_craftitem("food:pasta",{ minetest.register_craftitem(":food:pasta",{
description = S("Pasta"), description = S("Pasta"),
inventory_image = "food_pasta.png", inventory_image = "food_pasta.png",
groups = {food_pasta=1} groups = {food_pasta=1}
@ -232,7 +232,7 @@ food.module("pasta", function()
end, true) end, true)
food.module("bowl", function() food.module("bowl", function()
minetest.register_craftitem("food:bowl",{ minetest.register_craftitem(":food:bowl",{
description = S("Bowl"), description = S("Bowl"),
inventory_image = "food_bowl.png", inventory_image = "food_bowl.png",
groups = {food_bowl=1} groups = {food_bowl=1}
@ -247,7 +247,7 @@ food.module("bowl", function()
end, true) end, true)
food.module("butter", function() food.module("butter", function()
minetest.register_craftitem("food:butter", { minetest.register_craftitem(":food:butter", {
description = S("Butter"), description = S("Butter"),
inventory_image = "food_butter.png", inventory_image = "food_butter.png",
groups = {food_butter=1} groups = {food_butter=1}
@ -261,7 +261,7 @@ food.module("butter", function()
end, true) end, true)
food.module("cheese", function() food.module("cheese", function()
minetest.register_craftitem("food:cheese", { minetest.register_craftitem(":food:cheese", {
description = S("Cheese"), description = S("Cheese"),
inventory_image = "food_cheese.png", inventory_image = "food_cheese.png",
on_use = food.item_eat(4), on_use = food.item_eat(4),

View File

@ -8,15 +8,13 @@
print("Food Mod - Version 2.3") print("Food Mod - Version 2.3")
dofile(minetest.get_modpath("food").."/api.lua") dofile(minetest.get_modpath("food_basic").."/support.lua")
dofile(minetest.get_modpath("food").."/support.lua") dofile(minetest.get_modpath("food_basic").."/ingredients.lua")
dofile(minetest.get_modpath("food").."/ingredients.lua")
-- Register dark chocolate -- Register dark chocolate
food.module("dark_chocolate", function() food.module("dark_chocolate", function()
minetest.register_craftitem("food:dark_chocolate",{ minetest.register_craftitem(":food:dark_chocolate",{
description = S("Dark Chocolate"), description = S("Dark Chocolate"),
inventory_image = "food_dark_chocolate.png", inventory_image = "food_dark_chocolate.png",
on_use = food.item_eat(3), on_use = food.item_eat(3),
@ -32,7 +30,7 @@ end)
-- Register milk chocolate -- Register milk chocolate
food.module("milk_chocolate", function() food.module("milk_chocolate", function()
minetest.register_craftitem("food:milk_chocolate",{ minetest.register_craftitem(":food:milk_chocolate",{
description = S("Milk Chocolate"), description = S("Milk Chocolate"),
inventory_image = "food_milk_chocolate.png", inventory_image = "food_milk_chocolate.png",
on_use = food.item_eat(3), on_use = food.item_eat(3),
@ -49,7 +47,7 @@ end)
-- Register baked potato -- Register baked potato
food.module("baked_potato", function() food.module("baked_potato", function()
minetest.register_craftitem("food:baked_potato", { minetest.register_craftitem(":food:baked_potato", {
description = S("Baked Potato"), description = S("Baked Potato"),
inventory_image = "food_baked_potato.png", inventory_image = "food_baked_potato.png",
on_use = food.item_eat(6), on_use = food.item_eat(6),
@ -63,13 +61,13 @@ end)
-- Register pasta bake -- Register pasta bake
food.module("pasta_bake", function() food.module("pasta_bake", function()
minetest.register_craftitem("food:pasta_bake",{ minetest.register_craftitem(":food:pasta_bake",{
description = S("Pasta Bake"), description = S("Pasta Bake"),
inventory_image = "food_pasta_bake.png", inventory_image = "food_pasta_bake.png",
on_use = food.item_eat(4), on_use = food.item_eat(4),
groups = {food=3} groups = {food=3}
}) })
minetest.register_craftitem("food:pasta_bake_raw",{ minetest.register_craftitem(":food:pasta_bake_raw",{
description = S("Raw Pasta Bake"), description = S("Raw Pasta Bake"),
inventory_image = "food_pasta_bake_raw.png", inventory_image = "food_pasta_bake_raw.png",
}) })
@ -96,13 +94,13 @@ local soups = {
for i=1, #soups do for i=1, #soups do
local flav = soups[i] local flav = soups[i]
food.module("soup_"..flav[1], function() food.module("soup_"..flav[1], function()
minetest.register_craftitem("food:soup_"..flav[1],{ minetest.register_craftitem(":food:soup_"..flav[1],{
description = S(flav[1].." Soup"), description = S(flav[1].." Soup"),
inventory_image = "food_soup_"..flav[1]..".png", inventory_image = "food_soup_"..flav[1]..".png",
on_use = food.item_eat(4), on_use = food.item_eat(4),
groups = {food=3} groups = {food=3}
}) })
minetest.register_craftitem("food:soup_"..flav[1].."_raw",{ minetest.register_craftitem(":food:soup_"..flav[1].."_raw",{
description = S("Uncooked ".. flav[1].." Soup"), description = S("Uncooked ".. flav[1].." Soup"),
inventory_image = "food_soup_"..flav[1].."_raw.png", inventory_image = "food_soup_"..flav[1].."_raw.png",
@ -129,7 +127,7 @@ local juices = {"apple", "orange", "cactus"}
for i=1, #juices do for i=1, #juices do
local flav = juices[i] local flav = juices[i]
food.module(flav.."_juice", function() food.module(flav.."_juice", function()
minetest.register_craftitem("food:"..flav.."_juice", { minetest.register_craftitem(":food:"..flav.."_juice", {
description = S(flav.." Juice"), description = S(flav.." Juice"),
inventory_image = "food_"..flav.."_juice.png", inventory_image = "food_"..flav.."_juice.png",
on_use = food.item_eat(2), on_use = food.item_eat(2),
@ -146,7 +144,7 @@ for i=1, #juices do
end end
food.module("rainbow_juice", function() food.module("rainbow_juice", function()
minetest.register_craftitem("food:rainbow_juice", { minetest.register_craftitem(":food:rainbow_juice", {
description = S("Rainbow Juice"), description = S("Rainbow Juice"),
inventory_image = "food_rainbow_juice.png", inventory_image = "food_rainbow_juice.png",
on_use = food.item_eat(20), on_use = food.item_eat(20),
@ -173,7 +171,7 @@ food.cake_box = {
-- Register cakes -- Register cakes
food.module("cake", function() food.module("cake", function()
minetest.register_node("food:cake", { minetest.register_node(":food:cake", {
description = S("Cake"), description = S("Cake"),
on_use = food.item_eat(4), on_use = food.item_eat(4),
groups={food=3,crumbly=3}, groups={food=3,crumbly=3},
@ -197,7 +195,7 @@ food.module("cake", function()
recipe = "food:cakemix_plain", recipe = "food:cakemix_plain",
cooktime = 10, cooktime = 10,
}) })
minetest.register_craftitem("food:cakemix_plain",{ minetest.register_craftitem(":food:cakemix_plain",{
description = S("Cake Mix"), description = S("Cake Mix"),
inventory_image = "food_cakemix_plain.png", inventory_image = "food_cakemix_plain.png",
}) })
@ -211,7 +209,7 @@ end)
food.module("cake_choco", function() food.module("cake_choco", function()
minetest.register_node("food:cake_choco", { minetest.register_node(":food:cake_choco", {
description = S("Chocolate Cake"), description = S("Chocolate Cake"),
on_use = food.item_eat(4), on_use = food.item_eat(4),
groups={food=3,crumbly=3}, groups={food=3,crumbly=3},
@ -235,7 +233,7 @@ food.module("cake_choco", function()
recipe = "food:cakemix_choco", recipe = "food:cakemix_choco",
cooktime = 10, cooktime = 10,
}) })
minetest.register_craftitem("food:cakemix_choco",{ minetest.register_craftitem(":food:cakemix_choco",{
description = S("Chocolate Cake Mix"), description = S("Chocolate Cake Mix"),
inventory_image = "food_cakemix_choco.png", inventory_image = "food_cakemix_choco.png",
}) })
@ -249,7 +247,7 @@ food.module("cake_choco", function()
end) end)
food.module("cake_carrot", function() food.module("cake_carrot", function()
minetest.register_node("food:cake_carrot", { minetest.register_node(":food:cake_carrot", {
description = S("Carrot Cake"), description = S("Carrot Cake"),
on_use = food.item_eat(4), on_use = food.item_eat(4),
groups={food=3,crumbly=3}, groups={food=3,crumbly=3},
@ -273,7 +271,7 @@ food.module("cake_carrot", function()
recipe = "food:cakemix_carrot", recipe = "food:cakemix_carrot",
cooktime = 10, cooktime = 10,
}) })
minetest.register_craftitem("food:cakemix_carrot",{ minetest.register_craftitem(":food:cakemix_carrot",{
description = S("Carrot Cake Mix"), description = S("Carrot Cake Mix"),
inventory_image = "food_cakemix_carrot.png", inventory_image = "food_cakemix_carrot.png",
}) })

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B