-- =================================================================== -- "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 -- =================================================================== -- Onion. needitem = reg_food ("onion", { description = "Onion" , satiate = 4 , external_items = "farming:onion" , }) reg_alias ("farming:onion", needitem) -- =================================================================== -- Onion Juice. needitem = reg_juice ("onion", { satiate = 2 , color = "#CED7B2" , }) -- =================================================================== -- Onion Slices. needitem = reg_food ("onion_slices", { description = "Onion slices" , satiate = 1 , external_items = "extra:onion_slice" , }) reg_craft ({ output = needitem .. " 4" , recipe = {{ "group:food_onion" }} , }) obj = "group:food_onion_slices" reg_craft ({ type = "shapeless" , output = "food:onion" , recipe = { obj, obj, obj, obj } , }) reg_craft ({ type = "shapeless" , output = "food:onion_juice" , recipe = { "group:food_juicer", "group:food_glass", obj, obj, obj, obj } , replacements = unified_foods.keep_juicer , }) reg_alias ("extra:onion_slice" , needitem) reg_alias ("food:onion_slice" , needitem) -- =================================================================== -- Onion Rings. needitem = reg_food ("onion_rings", { description = "Onion Rings" , satiate = 1 , external_items = "extra:onion_rings" , }) reg_craft ({ type = "cooking" , output = needitem , recipe = "group:food_onion_slices" , }) reg_alias ("extra:onion_rings", needitem) -- =================================================================== -- End of file.