-- =================================================================== -- "ufoods" common header. local S if minetest.get_modpath ("intllib") then S = intllib.Getter() else S = function (s) return s end end local item_eat = unified_foods.item_eat local keep_vessels = unified_foods.keep_vessels local mra = minetest.registered_aliases local mri = minetest.registered_items local reg_alias = ocutil.safe_register_alias local reg_craft = minetest.register_craft local reg_food = unified_foods.register_food local reg_item = ocutil.safe_register_item local reg_juice = unified_foods.register_juice local needitem -- =================================================================== local obj -- =================================================================== needitem = reg_food ("cocoa", { description = "Cocoa Bean" , satiate = 1 , external_items = { "farming:cocoa_beans" , "farming_plus:cocoa_bean" , } , }) -- =================================================================== needitem = reg_food ("choco_powder", { description = "Chocolate Powder" , }) obj = "group:food_cocoa" -- reg_craft ({ output = needitem .. " 16" , recipe = { { obj, obj, obj } , { obj, obj, obj } , { obj, obj, obj } , } }) reg_alias ("food:chocolate_powder", needitem) -- =================================================================== needitem = reg_food ("dark_choco", { description = "Dark Chocolate" , satiate = 2 , external_items = "farming:chocolate_dark" , }) obj = "group:food_cocoa" -- reg_craft ({ output = needitem , recipe = { { obj, obj, obj } , } }) obj = "food:choco_powder" -- reg_craft ({ output = needitem , recipe = { { obj, obj, obj } , { obj, obj, obj } , } }) reg_alias ("food:dark_chocolate", needitem) -- =================================================================== needitem = reg_food ("milk_choco", { description = "Milk Chocolate" , satiate = 3 , }) obj = "group:food_cocoa" -- reg_craft ({ output = needitem , replacements = keep_vessels , recipe = { { "" , "group:food_milk" , "" } , { obj , obj , obj } , } }) obj = "food:choco_powder" -- reg_craft ({ output = needitem , replacements = keep_vessels , recipe = { { "" , "group:food_milk" , "" } , { obj , obj , obj } , { obj , obj , obj } , } }) reg_craft ({ output = needitem , replacements = keep_vessels , recipe = { { "", "group:food_milk", "food:choco_dark" } , } }) reg_alias ("food:milk_chocolate", "food:milk_choco") -- =================================================================== needitem = reg_food ("choco_milk_cup", { description = "Cup of chocolate milk" , satiate = 10 , replace = "food:cup" , extra_groups = { food_cup=1 } , }) reg_craft ({ type = "shapeless" , output = needitem , recipe = { "group:food_milk" , "food:choco_powder" , "food:choco_powder" , "food:cup" , } }) reg_craft ({ type = "shapeless" , output = needitem , replacements = keep_vessels , recipe = { "group:food_milk" , "food:cocoa" , "food:cup" , } }) -- =================================================================== needitem = reg_food ("choco_milk_mug", { description = "Mug of chocolate milk" , satiate = 10 , replace = "food:mug" , extra_groups = { food_mug=1 } , }) reg_craft ({ type = "shapeless" , output = needitem , recipe = { "group:food_mug" , "group:food_milk" , "group:food_choco_powder" , "group:food_choco_powder" , } }) reg_craft ({ type = "shapeless" , output = needitem , recipe = { "group:food_mug" , "group:food_milk" , "group:food_cocoa" , } }) reg_alias ("food:choco_milk" , needitem) reg_alias ("food:chocolate_milk" , needitem) -- =================================================================== -- End of file.