diff --git a/patches/Bucket_Game-basis/mods/coderfood/food_basic/ingredients.lua b/patches/Bucket_Game-basis/mods/coderfood/food_basic/ingredients.lua new file mode 100644 index 0000000..f888c05 --- /dev/null +++ b/patches/Bucket_Game-basis/mods/coderfood/food_basic/ingredients.lua @@ -0,0 +1,310 @@ +-- FOOD MOD +-- A mod written by rubenwardy that adds +-- food to the minetest game +-- ===================================== +-- >> food_basic/ingredients.lua +-- Fallback ingredients +-- ===================================== + +-- Boilerplate to support localized strings if intllib mod is installed. +local S = 0 +if minetest.get_modpath("intllib") then + S = intllib.Getter() +else + S = function ( s ) return s end +end + +food.module("wheat", function() + minetest.register_craftitem(":food:wheat", { + description = S("Wheat"), + inventory_image = "food_wheat.png", + groups = {food_wheat=1} + }) + + food.craft({ + output = "food:wheat", + recipe = { + {"default:dry_shrub"}, + } + }) +end, true) + +food.module("flour", function() + minetest.register_craftitem(":food:flour", { + description = S("Flour"), + inventory_image = "food_flour.png", + groups = {food_flour = 1} + }) + food.craft({ + output = "food:flour", + recipe = { + {"group:food_wheat"}, + {"group:food_wheat"} + } + }) + food.craft({ + output = "food:flour", + recipe = { + {"default:sand"}, + {"default:sand"} + } + }) +end, true) + +food.module("potato", function() + minetest.register_craftitem(":food:potato", { + description = S("Potato"), + inventory_image = "food_potato.png", + groups = {food_potato = 1} + }) + food.craft({ + output = "food:potato", + recipe = { + {"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", + groups = {food_tomato = 1} + }) + food.craft({ + output = "food:tomato", + recipe = { + {"", "default:desert_sand", ""}, + {"default:desert_sand", "", "default:desert_sand"}, + {"", "default:desert_sand", ""} + } + }) +end, true) + +food.module("carrot", function() + minetest.register_craftitem(":food:carrot", { + description = S("Carrot"), + inventory_image = "food_carrot.png", + groups = {food_carrot=1}, + on_use = food.item_eat(3) + }) + food.craft({ + output = "food:carrot", + recipe = { + {"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 }, + stack_max=10 + }) + food.craft({ + output = "food:milk", + recipe = { + {"default:sand"}, + {"bucket:bucket_water"} + }, + 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", + groups = {food_egg=1} + }) + food.craft({ + output = "food:egg", + recipe = { + {"", "default:sand", ""}, + {"default:sand", "", "default:sand"}, + {"", "default:sand", ""} + } + }) +end, true) + +food.module("cocoa", function() + minetest.register_craftitem(":food:cocoa", { + description = S("Cocoa Bean"), + inventory_image = "food_cocoa.png", + groups = {food_cocoa=1} + }) + food.craft({ + output = "food:cocoa", + recipe = { + {"", "default:apple", ""}, + {"default:apple", "", "default:apple"}, + {"", "default:apple", ""} + } + }) +end, true) + +food.module("meat", function() + minetest.register_craftitem(":food:meat", { + 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", + 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 }, + stack_max=25 + }) + food.craft({ + output = "food:meat_raw", + recipe = { + {"default:apple"}, + {"default:dirt"} + } + }) + end +end, true) + +food.module("sugar", function() + minetest.register_craftitem(":food:sugar", { + description = S("Sugar"), + inventory_image = "food_sugar.png", + groups = {food_sugar=1} + }) + + minetest.register_craft({ + output = "food:sugar 20", + recipe = { + {"default:papyrus"}, + } + }) +end, true) + +food.module("chocolate_powder", function() + minetest.register_craftitem(":food:chocolate_powder", { + description = S("Chocolate Powder"), + inventory_image = "food_chocolate_powder.png", + groups = {food_choco_powder = 1} + }) + food.craft({ + output = "food:chocolate_powder 16", + recipe = { + {"group:food_cocoa","group:food_cocoa","group:food_cocoa"}, + {"group:food_cocoa","group:food_cocoa","group:food_cocoa"}, + {"group:food_cocoa","group:food_cocoa","group:food_cocoa"} + } + }) +end, true) + +food.module("pasta", function() + minetest.register_craftitem(":food:pasta",{ + description = S("Pasta"), + inventory_image = "food_pasta.png", + groups = {food_pasta=1} + }) + food.craft({ + output = "food:pasta 4", + type = "shapeless", + recipe = {"group:food_flour","group:food_egg","group:food_egg"} + }) +end, true) + +food.module("bowl", function() + minetest.register_craftitem(":food:bowl",{ + description = S("Bowl"), + inventory_image = "food_bowl.png", + groups = {food_bowl=1} + }) + food.craft({ + output = "food:bowl", + recipe = { + {"default:clay_lump","","default:clay_lump"}, + {"","default:clay_lump",""} + } + }) +end, true) + +food.module("butter", function() + minetest.register_craftitem(":food:butter", { + description = S("Butter"), + inventory_image = "food_butter.png", + groups = {food_butter=1} + }) + food.craft({ + output = "food:butter", + recipe = {{"group:food_milkbucket","group:food_milkbucket"}}, + replacements = { + {"group:food_milkbucket","bucket:bucket_empty"}, + {"group:food_milkbucket","bucket:bucket_empty"} + }, + }) + food.craft({ + output = "food:butter", + recipe = { + {"group:food_milk","group:food_milkbucket"} + }, + replacements = { + {"group:food_milkbucket","bucket:bucket_empty"}, + }, + }) + food.craft({ + output = "food:butter", + recipe = { + {"group:food_milk","group:food_milk"}, + } + }) +end, true) + +food.module("cheese", function() + minetest.register_craftitem(":food:cheese", { + description = S("Cheese"), + inventory_image = "food_cheese.png", + on_use = food.item_eat(4), + groups = {food_cheese=1} + }) + food.craft({ + output = "food:cheese", + recipe = { + {"group:food_butter","group:food_butter"}, + } + }) +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", + cooktime = 30 + }) +end diff --git a/patches/Bucket_Game-basis/mods/coderfood/food_basic/init.lua b/patches/Bucket_Game-basis/mods/coderfood/food_basic/init.lua new file mode 100644 index 0000000..22de5a9 --- /dev/null +++ b/patches/Bucket_Game-basis/mods/coderfood/food_basic/init.lua @@ -0,0 +1,331 @@ +-- FOOD MOD +-- A mod written by rubenwardy that adds +-- food to the minetest game +-- ===================================== +-- >> food_basic/init.lua +-- Some basic foods +-- ===================================== + +print("Food Mod - Version 2.3") + +if not minetest.registered_nodes ["mobs:egg"] then + minetest.register_node(":mobs:egg", { + description = "Chicken Egg", + tiles = {"mobs_chicken_egg.png"}, + inventory_image = "mobs_chicken_egg.png", + visual_scale = 0.7 , + drawtype = "plantlike" , + wield_image = "mobs_chicken_egg.png" , + paramtype = "light" , + walkable = false, + is_ground_content = true, + sunlight_propagates = true, + selection_box = { + type = "fixed", + fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2} + }, + groups = {snappy=2, dig_immediate=3}, + after_place_node = function(pos, placer, itemstack) + if placer:is_player() then + minetest.set_node(pos, {name = "mobs:egg", param2 = 1}) + end + end + }) +end + +if not minetest.registered_items ["mobs:bucket_milk"] then + minetest.register_craftitem (":mobs:bucket_milk", { + description = "Bucket of Milk", + inventory_image = "mobs_bucket_milk.png", + stack_max = 1, + on_use = minetest.item_eat (8, 'bucket:bucket_empty') , + }) +end + +dofile(minetest.get_modpath("food_basic").."/support.lua") +dofile(minetest.get_modpath("food_basic").."/ingredients.lua") + +-- Boilerplate to support localized strings if intllib mod is installed. +local S = 0 +if minetest.get_modpath("intllib") then + S = intllib.Getter() +else + S = function ( s ) return s end +end + +-- Register dark chocolate +food.module("dark_chocolate", function() + minetest.register_craftitem(":food:dark_chocolate",{ + description = S("Dark Chocolate"), + inventory_image = "food_dark_chocolate.png", + on_use = food.item_eat(3), + groups = {food_dark_chocolate=1} + }) + food.craft({ + output = "food:dark_chocolate", + recipe = { + {"group:food_cocoa","group:food_cocoa","group:food_cocoa"} + } + }) +end) + +-- Register milk chocolate +food.module("milk_chocolate", function() + minetest.register_craftitem(":food:milk_chocolate",{ + description = S("Milk Chocolate"), + inventory_image = "food_milk_chocolate.png", + on_use = food.item_eat(3), + groups = {food_milk_chocolate=1} + }) + food.craft({ + output = "food:milk_chocolate", + recipe = { + {"","group:food_milk",""}, + {"group:food_cocoa","group:food_cocoa","group:food_cocoa"} + } + }) +end) + +-- Register baked potato +food.module("baked_potato", function() + minetest.register_craftitem(":food:baked_potato", { + description = S("Baked Potato"), + inventory_image = "food_baked_potato.png", + on_use = food.item_eat(6), + }) + food.craft({ + type = "cooking", + output = "food:baked_potato", + recipe = "group:food_potato", + }) +end) + +-- Register pasta bake +food.module("pasta_bake", function() + minetest.register_craftitem(":food:pasta_bake",{ + description = S("Pasta Bake"), + inventory_image = "food_pasta_bake.png", + on_use = food.item_eat(4), + groups = {food=3} + }) + minetest.register_craftitem(":food:pasta_bake_raw",{ + description = S("Raw Pasta Bake"), + inventory_image = "food_pasta_bake_raw.png", + }) + food.craft({ + output = "food:pasta_bake", + type = "cooking", + recipe = "food:pasta_bake_raw" + }) + food.craft({ + output = "food:pasta_bake_raw", + recipe = { + {"group:food_cheese"}, + {"group:food_pasta"}, + {"group:food_bowl"} + } + }) +end) + +-- Register Soups +local chicken = "meat" +if minetest.get_modpath("mobs") and mobs.mod == "redo" then + chicken = "chicken" +end +local soups = { + {"tomato", "tomato"}, + {"chicken", chicken} +} +for i=1, #soups do + local flav = soups[i] + food.module("soup_"..flav[1], function() + minetest.register_craftitem(":food:soup_"..flav[1],{ + description = S(flav[1].." Soup"), + inventory_image = "food_soup_"..flav[1]..".png", + on_use = food.item_eat(4), + groups = {food=3} + }) + 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", + output = "food:soup_"..flav[1], + recipe = "food:soup_"..flav[1].."_raw", + }) + food.craft({ + output = "food:soup_"..flav[1].."_raw", + recipe = { + {"", "", ""}, + {"bucket:bucket_water", "group:food_"..flav[2], "bucket:bucket_water"}, + {"", "group:food_bowl", ""}, + }, + replacements = {{"bucket:bucket_water", "bucket:bucket_empty"},{"bucket:bucket_water", "bucket:bucket_empty"}} + }) + end) +end + +-- Juices +local juices = {"apple", "orange", "cactus"} +for i=1, #juices do + local flav = juices[i] + food.module(flav.."_juice", function() + minetest.register_craftitem(":food:"..flav.."_juice", { + description = S(flav.." Juice"), + inventory_image = "food_"..flav.."_juice.png", + on_use = food.item_eat(2), + }) + food.craft({ + output = "food:"..flav.."_juice 4", + recipe = { + {"","",""}, + {"","group:food_"..flav,""}, + {"","group:food_cup",""}, + } + }) + end) +end + +food.module("rainbow_juice", function() + minetest.register_craftitem(":food:rainbow_juice", { + description = S("Rainbow Juice"), + inventory_image = "food_rainbow_juice.png", + on_use = food.item_eat(20), + }) + + food.craft({ + output = "food:rainbow_juice 99", + recipe = { + {"","",""}, + {"","default:nyancat_rainbow",""}, + {"","group:food_cup",""}, + } + }) +end) + +food.cake_box = { + type = "fixed", + fixed = { + {-0.250000,-0.500000,-0.296880,0.250000,-0.250000,0.312502}, + {-0.309375,-0.500000,-0.250000,0.309375,-0.250000,0.250000}, + {-0.250000,-0.250000,-0.250000,0.250000,-0.200000,0.250000} + } +} + +-- Register cakes +food.module("cake", function() + minetest.register_node(":food:cake", { + description = S("Cake"), + on_use = food.item_eat(4), + groups={food=3,crumbly=3}, + tiles = { + "food_cake_texture.png", + "food_cake_texture.png", + "food_cake_texture_side.png", + "food_cake_texture_side.png", + "food_cake_texture_side.png", + "food_cake_texture_side.png" + }, + walkable = false, + sunlight_propagates = true, + drawtype="nodebox", + paramtype = "light", + node_box = food.cake_box + }) + food.craft({ + type = "cooking", + output = "food:cake", + recipe = "food:cakemix_plain", + cooktime = 10, + }) + minetest.register_craftitem(":food:cakemix_plain",{ + description = S("Cake Mix"), + inventory_image = "food_cakemix_plain.png", + }) + minetest.register_craft({ + output = "food:cakemix_plain", + recipe = { + {"group:food_flour","group:food_sugar","group:food_egg"}, + } + }) +end) + + +food.module("cake_choco", function() + minetest.register_node(":food:cake_choco", { + description = S("Chocolate Cake"), + on_use = food.item_eat(4), + groups={food=3,crumbly=3}, + tiles = { + "food_cake_choco_texture.png", + "food_cake_choco_texture.png", + "food_cake_choco_texture_side.png", + "food_cake_choco_texture_side.png", + "food_cake_choco_texture_side.png", + "food_cake_choco_texture_side.png" + }, + walkable = false, + sunlight_propagates = true, + drawtype="nodebox", + paramtype = "light", + node_box = food.cake_box + }) + food.craft({ + type = "cooking", + output = "food:cake_choco", + recipe = "food:cakemix_choco", + cooktime = 10, + }) + minetest.register_craftitem(":food:cakemix_choco",{ + description = S("Chocolate Cake Mix"), + inventory_image = "food_cakemix_choco.png", + }) + food.craft({ + output = "food:cakemix_choco", + recipe = { + {"","group:food_choco_powder",""}, + {"group:food_flour","group:food_sugar","group:food_egg"}, + } + }) +end) + +food.module("cake_carrot", function() + minetest.register_node(":food:cake_carrot", { + description = S("Carrot Cake"), + on_use = food.item_eat(4), + groups={food=3,crumbly=3}, + walkable = false, + sunlight_propagates = true, + tiles = { + "food_cake_carrot_texture.png", + "food_cake_carrot_texture.png", + "food_cake_carrot_texture_side.png", + "food_cake_carrot_texture_side.png", + "food_cake_carrot_texture_side.png", + "food_cake_carrot_texture_side.png" + }, + drawtype="nodebox", + paramtype = "light", + node_box = food.cake_box + }) + food.craft({ + type = "cooking", + output = "food:cake_carrot", + recipe = "food:cakemix_carrot", + cooktime = 10, + }) + minetest.register_craftitem(":food:cakemix_carrot",{ + description = S("Carrot Cake Mix"), + inventory_image = "food_cakemix_carrot.png", + }) + food.craft({ + output = "food:cakemix_carrot", + recipe = { + {"","group:food_carrot",""}, + {"group:food_flour","group:food_sugar","group:food_egg"}, + } + }) +end) + diff --git a/patches/Bucket_Game-patched/mods/coderfood/food_basic/ingredients.lua b/patches/Bucket_Game-patched/mods/coderfood/food_basic/ingredients.lua new file mode 100644 index 0000000..e468d58 --- /dev/null +++ b/patches/Bucket_Game-patched/mods/coderfood/food_basic/ingredients.lua @@ -0,0 +1,304 @@ +-- FOOD MOD +-- A mod written by rubenwardy that adds +-- food to the minetest game +-- ===================================== +-- >> food_basic/ingredients.lua +-- Fallback ingredients +-- ===================================== + +-- Boilerplate to support localized strings if intllib mod is installed. +local S = 0 +if minetest.get_modpath("intllib") then + S = intllib.Getter() +else + S = function ( s ) return s end +end + +food.module("wheat", function() + minetest.register_craftitem(":food:wheat", { + description = S("Wheat"), + inventory_image = "food_wheat.png", + groups = {food_wheat=1} + }) + + food.craft({ + output = "food:wheat", + recipe = { + {"default:dry_shrub"}, + } + }) +end, true) + +food.module("flour", function() + minetest.register_craftitem(":food:flour", { + description = S("Flour"), + inventory_image = "food_flour.png", + groups = {food_flour = 1} + }) + food.craft({ + output = "food:flour", + recipe = { + {"group:food_wheat"}, + {"group:food_wheat"} + } + }) + food.craft({ + output = "food:flour", + recipe = { + {"default:sand"}, + {"default:sand"} + } + }) +end, true) + +food.module("potato", function() + minetest.register_craftitem(":food:potato", { + description = S("Potato"), + inventory_image = "food_potato.png", + groups = {food_potato = 1} + }) + food.craft({ + output = "food:potato", + recipe = { + {"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", + groups = {food_tomato = 1} + }) + food.craft({ + output = "food:tomato", + recipe = { + {"", "default:desert_sand", ""}, + {"default:desert_sand", "", "default:desert_sand"}, + {"", "default:desert_sand", ""} + } + }) +end, true) + +food.module("carrot", function() + minetest.register_craftitem(":food:carrot", { + description = S("Carrot"), + inventory_image = "food_carrot.png", + groups = {food_carrot=1}, + on_use = food.item_eat(3) + }) + food.craft({ + output = "food:carrot", + recipe = { + {"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(3), + on_use = minetest.item_eat(2, 'vessels:drinking_glass'), + -- groups = { eatable=1, food_milk = 1 }, + stack_max=10 + }) + +end, true) + +food.module("egg", function() + minetest.register_craftitem(":food:egg", { + description = S("Egg"), + inventory_image = "food_egg.png", + groups = {food_egg=1} + }) + food.craft({ + output = "food:egg", + recipe = { + {"", "default:sand", ""}, + {"default:sand", "", "default:sand"}, + {"", "default:sand", ""} + } + }) +end, true) + +food.module("cocoa", function() + minetest.register_craftitem(":food:cocoa", { + description = S("Cocoa Bean"), + inventory_image = "food_cocoa.png", + groups = {food_cocoa=1} + }) + food.craft({ + output = "food:cocoa", + recipe = { + {"", "default:apple", ""}, + {"default:apple", "", "default:apple"}, + {"", "default:apple", ""} + } + }) +end, true) + +food.module("meat", function() + minetest.register_craftitem(":food:meat", { + 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", + 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 }, + stack_max=25 + }) + food.craft({ + output = "food:meat_raw", + recipe = { + {"default:apple"}, + {"default:dirt"} + } + }) + end +end, true) + +food.module("sugar", function() + minetest.register_craftitem(":food:sugar", { + description = S("Sugar"), + inventory_image = "food_sugar.png", + groups = {food_sugar=1} + }) + + minetest.register_craft({ + output = "food:sugar 20", + recipe = { + {"default:papyrus"}, + } + }) +end, true) + +food.module("chocolate_powder", function() + minetest.register_craftitem(":food:chocolate_powder", { + description = S("Chocolate Powder"), + inventory_image = "food_chocolate_powder.png", + groups = {food_choco_powder = 1} + }) + food.craft({ + output = "food:chocolate_powder 16", + recipe = { + {"group:food_cocoa","group:food_cocoa","group:food_cocoa"}, + {"group:food_cocoa","group:food_cocoa","group:food_cocoa"}, + {"group:food_cocoa","group:food_cocoa","group:food_cocoa"} + } + }) +end, true) + +food.module("pasta", function() + minetest.register_craftitem(":food:pasta",{ + description = S("Pasta"), + inventory_image = "food_pasta.png", + groups = {food_pasta=1} + }) + food.craft({ + output = "food:pasta 4", + type = "shapeless", + recipe = {"group:food_flour","group:food_egg","group:food_egg"} + }) +end, true) + +food.module("bowl", function() + minetest.register_craftitem(":food:bowl",{ + description = S("Bowl"), + inventory_image = "food_bowl.png", + groups = {food_bowl=1} + }) + food.craft({ + output = "food:bowl", + recipe = { + {"default:clay_lump","","default:clay_lump"}, + {"","default:clay_lump",""} + } + }) +end, true) + +food.module("butter", function() + minetest.register_craftitem(":food:butter", { + description = S("Butter"), + inventory_image = "food_butter.png", + groups = {food_butter=1} + }) + food.craft({ + output = "food:butter", + recipe = {{"group:food_milkbucket","group:food_milkbucket"}}, + replacements = { + {"group:food_milkbucket","bucket:bucket_empty"}, + {"group:food_milkbucket","bucket:bucket_empty"} + }, + }) + food.craft({ + output = "food:butter", + recipe = { + {"group:food_milk","group:food_milkbucket"} + }, + replacements = { + {"group:food_milkbucket","bucket:bucket_empty"}, + }, + }) + food.craft({ + output = "food:butter", + recipe = { + {"group:food_milk","group:food_milk"}, + } + }) +end, true) + +food.module("cheese", function() + minetest.register_craftitem(":food:cheese", { + description = S("Cheese"), + inventory_image = "food_cheese.png", + on_use = food.item_eat(4), + groups = {food_cheese=1} + }) + food.craft({ + output = "food:cheese", + recipe = { + {"group:food_butter","group:food_butter"}, + } + }) +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", + cooktime = 30 + }) +end diff --git a/patches/Bucket_Game-patched/mods/coderfood/food_basic/init.lua b/patches/Bucket_Game-patched/mods/coderfood/food_basic/init.lua new file mode 100644 index 0000000..22de5a9 --- /dev/null +++ b/patches/Bucket_Game-patched/mods/coderfood/food_basic/init.lua @@ -0,0 +1,331 @@ +-- FOOD MOD +-- A mod written by rubenwardy that adds +-- food to the minetest game +-- ===================================== +-- >> food_basic/init.lua +-- Some basic foods +-- ===================================== + +print("Food Mod - Version 2.3") + +if not minetest.registered_nodes ["mobs:egg"] then + minetest.register_node(":mobs:egg", { + description = "Chicken Egg", + tiles = {"mobs_chicken_egg.png"}, + inventory_image = "mobs_chicken_egg.png", + visual_scale = 0.7 , + drawtype = "plantlike" , + wield_image = "mobs_chicken_egg.png" , + paramtype = "light" , + walkable = false, + is_ground_content = true, + sunlight_propagates = true, + selection_box = { + type = "fixed", + fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2} + }, + groups = {snappy=2, dig_immediate=3}, + after_place_node = function(pos, placer, itemstack) + if placer:is_player() then + minetest.set_node(pos, {name = "mobs:egg", param2 = 1}) + end + end + }) +end + +if not minetest.registered_items ["mobs:bucket_milk"] then + minetest.register_craftitem (":mobs:bucket_milk", { + description = "Bucket of Milk", + inventory_image = "mobs_bucket_milk.png", + stack_max = 1, + on_use = minetest.item_eat (8, 'bucket:bucket_empty') , + }) +end + +dofile(minetest.get_modpath("food_basic").."/support.lua") +dofile(minetest.get_modpath("food_basic").."/ingredients.lua") + +-- Boilerplate to support localized strings if intllib mod is installed. +local S = 0 +if minetest.get_modpath("intllib") then + S = intllib.Getter() +else + S = function ( s ) return s end +end + +-- Register dark chocolate +food.module("dark_chocolate", function() + minetest.register_craftitem(":food:dark_chocolate",{ + description = S("Dark Chocolate"), + inventory_image = "food_dark_chocolate.png", + on_use = food.item_eat(3), + groups = {food_dark_chocolate=1} + }) + food.craft({ + output = "food:dark_chocolate", + recipe = { + {"group:food_cocoa","group:food_cocoa","group:food_cocoa"} + } + }) +end) + +-- Register milk chocolate +food.module("milk_chocolate", function() + minetest.register_craftitem(":food:milk_chocolate",{ + description = S("Milk Chocolate"), + inventory_image = "food_milk_chocolate.png", + on_use = food.item_eat(3), + groups = {food_milk_chocolate=1} + }) + food.craft({ + output = "food:milk_chocolate", + recipe = { + {"","group:food_milk",""}, + {"group:food_cocoa","group:food_cocoa","group:food_cocoa"} + } + }) +end) + +-- Register baked potato +food.module("baked_potato", function() + minetest.register_craftitem(":food:baked_potato", { + description = S("Baked Potato"), + inventory_image = "food_baked_potato.png", + on_use = food.item_eat(6), + }) + food.craft({ + type = "cooking", + output = "food:baked_potato", + recipe = "group:food_potato", + }) +end) + +-- Register pasta bake +food.module("pasta_bake", function() + minetest.register_craftitem(":food:pasta_bake",{ + description = S("Pasta Bake"), + inventory_image = "food_pasta_bake.png", + on_use = food.item_eat(4), + groups = {food=3} + }) + minetest.register_craftitem(":food:pasta_bake_raw",{ + description = S("Raw Pasta Bake"), + inventory_image = "food_pasta_bake_raw.png", + }) + food.craft({ + output = "food:pasta_bake", + type = "cooking", + recipe = "food:pasta_bake_raw" + }) + food.craft({ + output = "food:pasta_bake_raw", + recipe = { + {"group:food_cheese"}, + {"group:food_pasta"}, + {"group:food_bowl"} + } + }) +end) + +-- Register Soups +local chicken = "meat" +if minetest.get_modpath("mobs") and mobs.mod == "redo" then + chicken = "chicken" +end +local soups = { + {"tomato", "tomato"}, + {"chicken", chicken} +} +for i=1, #soups do + local flav = soups[i] + food.module("soup_"..flav[1], function() + minetest.register_craftitem(":food:soup_"..flav[1],{ + description = S(flav[1].." Soup"), + inventory_image = "food_soup_"..flav[1]..".png", + on_use = food.item_eat(4), + groups = {food=3} + }) + 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", + output = "food:soup_"..flav[1], + recipe = "food:soup_"..flav[1].."_raw", + }) + food.craft({ + output = "food:soup_"..flav[1].."_raw", + recipe = { + {"", "", ""}, + {"bucket:bucket_water", "group:food_"..flav[2], "bucket:bucket_water"}, + {"", "group:food_bowl", ""}, + }, + replacements = {{"bucket:bucket_water", "bucket:bucket_empty"},{"bucket:bucket_water", "bucket:bucket_empty"}} + }) + end) +end + +-- Juices +local juices = {"apple", "orange", "cactus"} +for i=1, #juices do + local flav = juices[i] + food.module(flav.."_juice", function() + minetest.register_craftitem(":food:"..flav.."_juice", { + description = S(flav.." Juice"), + inventory_image = "food_"..flav.."_juice.png", + on_use = food.item_eat(2), + }) + food.craft({ + output = "food:"..flav.."_juice 4", + recipe = { + {"","",""}, + {"","group:food_"..flav,""}, + {"","group:food_cup",""}, + } + }) + end) +end + +food.module("rainbow_juice", function() + minetest.register_craftitem(":food:rainbow_juice", { + description = S("Rainbow Juice"), + inventory_image = "food_rainbow_juice.png", + on_use = food.item_eat(20), + }) + + food.craft({ + output = "food:rainbow_juice 99", + recipe = { + {"","",""}, + {"","default:nyancat_rainbow",""}, + {"","group:food_cup",""}, + } + }) +end) + +food.cake_box = { + type = "fixed", + fixed = { + {-0.250000,-0.500000,-0.296880,0.250000,-0.250000,0.312502}, + {-0.309375,-0.500000,-0.250000,0.309375,-0.250000,0.250000}, + {-0.250000,-0.250000,-0.250000,0.250000,-0.200000,0.250000} + } +} + +-- Register cakes +food.module("cake", function() + minetest.register_node(":food:cake", { + description = S("Cake"), + on_use = food.item_eat(4), + groups={food=3,crumbly=3}, + tiles = { + "food_cake_texture.png", + "food_cake_texture.png", + "food_cake_texture_side.png", + "food_cake_texture_side.png", + "food_cake_texture_side.png", + "food_cake_texture_side.png" + }, + walkable = false, + sunlight_propagates = true, + drawtype="nodebox", + paramtype = "light", + node_box = food.cake_box + }) + food.craft({ + type = "cooking", + output = "food:cake", + recipe = "food:cakemix_plain", + cooktime = 10, + }) + minetest.register_craftitem(":food:cakemix_plain",{ + description = S("Cake Mix"), + inventory_image = "food_cakemix_plain.png", + }) + minetest.register_craft({ + output = "food:cakemix_plain", + recipe = { + {"group:food_flour","group:food_sugar","group:food_egg"}, + } + }) +end) + + +food.module("cake_choco", function() + minetest.register_node(":food:cake_choco", { + description = S("Chocolate Cake"), + on_use = food.item_eat(4), + groups={food=3,crumbly=3}, + tiles = { + "food_cake_choco_texture.png", + "food_cake_choco_texture.png", + "food_cake_choco_texture_side.png", + "food_cake_choco_texture_side.png", + "food_cake_choco_texture_side.png", + "food_cake_choco_texture_side.png" + }, + walkable = false, + sunlight_propagates = true, + drawtype="nodebox", + paramtype = "light", + node_box = food.cake_box + }) + food.craft({ + type = "cooking", + output = "food:cake_choco", + recipe = "food:cakemix_choco", + cooktime = 10, + }) + minetest.register_craftitem(":food:cakemix_choco",{ + description = S("Chocolate Cake Mix"), + inventory_image = "food_cakemix_choco.png", + }) + food.craft({ + output = "food:cakemix_choco", + recipe = { + {"","group:food_choco_powder",""}, + {"group:food_flour","group:food_sugar","group:food_egg"}, + } + }) +end) + +food.module("cake_carrot", function() + minetest.register_node(":food:cake_carrot", { + description = S("Carrot Cake"), + on_use = food.item_eat(4), + groups={food=3,crumbly=3}, + walkable = false, + sunlight_propagates = true, + tiles = { + "food_cake_carrot_texture.png", + "food_cake_carrot_texture.png", + "food_cake_carrot_texture_side.png", + "food_cake_carrot_texture_side.png", + "food_cake_carrot_texture_side.png", + "food_cake_carrot_texture_side.png" + }, + drawtype="nodebox", + paramtype = "light", + node_box = food.cake_box + }) + food.craft({ + type = "cooking", + output = "food:cake_carrot", + recipe = "food:cakemix_carrot", + cooktime = 10, + }) + minetest.register_craftitem(":food:cakemix_carrot",{ + description = S("Carrot Cake Mix"), + inventory_image = "food_cakemix_carrot.png", + }) + food.craft({ + output = "food:cakemix_carrot", + recipe = { + {"","group:food_carrot",""}, + {"group:food_flour","group:food_sugar","group:food_egg"}, + } + }) +end) + diff --git a/patches/Bucket_Game-patched/mods/coderfood/food_basic/textures/mobs_bucket_milk.png b/patches/Bucket_Game-patched/mods/coderfood/food_basic/textures/mobs_bucket_milk.png new file mode 100644 index 0000000..9c4bd6b Binary files /dev/null and b/patches/Bucket_Game-patched/mods/coderfood/food_basic/textures/mobs_bucket_milk.png differ