diff --git a/ingredients.lua b/ingredients.lua index 503aa78..1d14acf 100644 --- a/ingredients.lua +++ b/ingredients.lua @@ -8,36 +8,36 @@ food.module("wheat", function() minetest.register_craftitem("food:wheat", { - description = S("Wheat"), - inventory_image = "food_wheat.png", + description = S("Wheat"), + inventory_image = "food_wheat.png", groups = {food_wheat=1} }) food.craft({ - output = "food:wheat", + output = "food:wheat", recipe = { - {"default:dry_shrub"}, + {"default:dry_shrub"}, } }) end, true) food.module("flour", function() minetest.register_craftitem("food:flour", { - description = S("Flour"), - inventory_image = "food_flour.png", + description = S("Flour"), + inventory_image = "food_flour.png", groups = {food_flour = 1} }) food.craft({ - output = "food:flour", + output = "food:flour", recipe = { - {"group:food_wheat"}, + {"group:food_wheat"}, {"group:food_wheat"} } }) food.craft({ - output = "food:flour", + output = "food:flour", recipe = { - {"default:sand"}, + {"default:sand"}, {"default:sand"} } }) @@ -45,31 +45,47 @@ end, true) food.module("potato", function() minetest.register_craftitem("food:potato", { - description = S("Potato"), - inventory_image = "food_potato.png", + description = S("Potato"), + inventory_image = "food_potato.png", groups = {food_potato = 1} }) food.craft({ - output = "food:potato", + output = "food:potato", recipe = { - {"default:dirt"}, + {"default:dirt"}, {"default:apple"} } }) end, true) +food.module("orange", function() + minetest.register_craftitem("food:orange", { + description = S("Orange"), + inventory_image = "food_orange.png", + groups = {food_orange = 1} + }) + food.craft({ + output = "food:orange", + recipe = { + {"", "default:desert_sand", ""}, + {"default:desert_sand", "default:desert_sand", "default:desert_sand"}, + {"", "default:desert_sand", ""} + } + }) +end, true) + food.module("tomato", function() minetest.register_craftitem("food:tomato", { - description = S("Tomato"), - inventory_image = "food_tomato.png", + description = S("Tomato"), + inventory_image = "food_tomato.png", groups = {food_tomato = 1} }) food.craft({ - output = "food:tomato", + output = "food:tomato", recipe = { - {"", "default:desert_sand", ""}, - {"default:desert_sand", "", "default:desert_sand"}, + {"", "default:desert_sand", ""}, + {"default:desert_sand", "", "default:desert_sand"}, {"", "default:desert_sand", ""} } }) @@ -77,48 +93,48 @@ end, true) food.module("carrot", function() minetest.register_craftitem("food:carrot", { - description = S("Carrot"), - inventory_image = "food_carrot.png", - groups = {food_carrot=1}, + description = S("Carrot"), + inventory_image = "food_carrot.png", + groups = {food_carrot=1}, on_use = food.item_eat(3) }) food.craft({ - output = "food:carrot", + output = "food:carrot", recipe = { - {"default:apple", "default:apple", "default:apple"}, + {"default:apple", "default:apple", "default:apple"}, } }) end, true) food.module("milk", function() minetest.register_craftitem("food:milk", { - description = S("Milk"), - image = "food_milk.png", - on_use = food.item_eat(1), - groups = { eatable=1, food_milk = 1 }, + description = S("Milk"), + image = "food_milk.png", + on_use = food.item_eat(1), + groups = { eatable=1, food_milk = 1 }, stack_max=10 }) food.craft({ - output = "food:milk", + output = "food:milk", recipe = { - {"default:sand"}, + {"default:sand"}, {"bucket:bucket_water"} - }, - replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}, + }, + replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}, }) end, true) food.module("egg", function() minetest.register_craftitem("food:egg", { - description = S("Egg"), - inventory_image = "food_egg.png", + description = S("Egg"), + inventory_image = "food_egg.png", groups = {food_egg=1} }) food.craft({ - output = "food:egg", + output = "food:egg", recipe = { - {"", "default:sand", ""}, - {"default:sand", "", "default:sand"}, + {"", "default:sand", ""}, + {"default:sand", "", "default:sand"}, {"", "default:sand", ""} } }) @@ -126,15 +142,15 @@ end, true) food.module("cocoa", function() minetest.register_craftitem("food:cocoa", { - description = S("Cocoa Bean"), - inventory_image = "food_cocoa.png", + description = S("Cocoa Bean"), + inventory_image = "food_cocoa.png", groups = {food_cocoa=1} }) food.craft({ - output = "food:cocoa", + output = "food:cocoa", recipe = { - {"", "default:apple", ""}, - {"default:apple", "", "default:apple"}, + {"", "default:apple", ""}, + {"default:apple", "", "default:apple"}, {"", "default:apple", ""} } }) @@ -142,29 +158,29 @@ end, true) food.module("meat", function() minetest.register_craftitem("food:meat", { - description = S("Venison"), - inventory_image = "food_meat.png", + description = S("Venison"), + inventory_image = "food_meat.png", groups = {food_meat=1, food_chicken=1} - }) + }) food.craft({ - type = "cooking", - output = "food:meat", - recipe = "group:food_meat_raw", + type = "cooking", + output = "food:meat", + recipe = "group:food_meat_raw", cooktime = 30 }) if not minetest.get_modpath("animalmaterials") then minetest.register_craftitem("food:meat_raw", { - description = S("Raw meat"), - image = "food_meat_raw.png", - on_use = food.item_eat(1), - groups = { meat=1, eatable=1, food_meat_raw=1 }, + description = S("Raw meat"), + image = "food_meat_raw.png", + on_use = food.item_eat(1), + groups = { meat=1, eatable=1, food_meat_raw=1 }, stack_max=25 }) food.craft({ - output = "food:meat_raw", + output = "food:meat_raw", recipe = { - {"default:apple"}, + {"default:apple"}, {"default:dirt"} } }) @@ -173,15 +189,15 @@ end, true) food.module("sugar", function() minetest.register_craftitem("food:sugar", { - description = S("Sugar"), - inventory_image = "food_sugar.png", + description = S("Sugar"), + inventory_image = "food_sugar.png", groups = {food_sugar=1} }) minetest.register_craft({ - output = "food:sugar 20", + output = "food:sugar 20", recipe = { - {"default:papyrus"}, + {"default:papyrus"}, } }) end, true) @@ -261,9 +277,9 @@ end, true) if (minetest.get_modpath("animalmaterials") and not minetest.get_modpath("mobfcooking")) then food.craft({ - type = "cooking", - output = "food:meat", - recipe = "animalmaterials:meat_raw", + type = "cooking", + output = "food:meat", + recipe = "animalmaterials:meat_raw", cooktime = 30 }) end diff --git a/init.lua b/init.lua index 0bbf436..e7b7152 100644 --- a/init.lua +++ b/init.lua @@ -105,7 +105,7 @@ for i=1, #soups do minetest.register_craftitem("food:soup_"..flav[1].."_raw",{ description = S("Uncooked ".. flav[1].." Soup"), inventory_image = "food_soup_"..flav[1].."_raw.png", - + }) food.craft({ type = "cooking", @@ -125,7 +125,7 @@ for i=1, #soups do end -- Juices -local juices = {"apple","cactus"} +local juices = {"apple", "orange", "cactus"} for i=1, #juices do local flav = juices[i] food.module(flav.."_juice", function() @@ -133,12 +133,12 @@ for i=1, #juices do description = S(flav.." Juice"), inventory_image = "food_"..flav.."_juice.png", on_use = food.item_eat(2), - }) + }) food.craft({ output = "food:"..flav.."_juice 4", recipe = { {"","",""}, - {"","default:"..flav,""}, + {"","group:food_"..flav,""}, {"","group:food_cup",""}, } }) diff --git a/locale/de.txt b/locale/de.txt index 35e2187..7b19a7a 100644 --- a/locale/de.txt +++ b/locale/de.txt @@ -5,6 +5,7 @@ Flour = Mehl Potato = Kartoffel Tomato = Tomate Carrot = Karotte +Orange = Milk = Milch Egg = Ei Cocoa Bean = Kakaobohne diff --git a/locale/template.txt b/locale/template.txt index 7c54b13..150e9e8 100644 --- a/locale/template.txt +++ b/locale/template.txt @@ -1,33 +1,35 @@ # template -Wheat = -Flour = +Wheat = +Flour = Potato = Tomato = -Carrot = -Milk = -Egg = -Cocoa Bean = -Raw meat = -Venison = -Sugar = -Chocolate Powder = -Dark Chocolate = +Carrot = +Orange = +Milk = +Egg = +Cocoa Bean = +Raw meat = +Venison = +Sugar = +Chocolate Powder = +Dark Chocolate = Milk Chocolate = -Pasta = -Bowl = -Butter = -Cheese = -Baked Potato = -Pasta Bake = -Raw Pasta Bake = -chicken Soup = -tomato Soup = -Uncooked tomato Soup = -Uncooked chicken Soup = -apple Juice = -cactus Juice = +Pasta = +Bowl = +Butter = +Cheese = +Baked Potato = +Pasta Bake = +Raw Pasta Bake = +chicken Soup = +tomato Soup = +Uncooked tomato Soup = +Uncooked chicken Soup = +apple Juice = +cactus Juice = Rainbow Juice = +Orange Juice = Cake = Chocolate Cake = Carrot Cake = diff --git a/support.lua b/support.lua index d9ebca6..39ef1d6 100644 --- a/support.lua +++ b/support.lua @@ -14,6 +14,9 @@ -- Add support for other mods food.support("cocoa", "farming_plus:cocoa_bean") food.support("cup", "vessels:drinking_glass") +food.support("cactus", "default:cactus") +food.support("apple", "default:apple") +food.support("orange", "farming_plus:orange_item") food.support("potato", { "docfarming:potato", "veggies:potato", diff --git a/textures/food_orange_juice.png b/textures/food_orange_juice.png new file mode 100644 index 0000000..62834ab Binary files /dev/null and b/textures/food_orange_juice.png differ