/datum/material/pizza name = "pizza" desc = "~Jamme, jamme, n'coppa, jamme ja! Jamme, jamme, n'coppa jamme ja, funi-culi funi-cala funi-culi funi-cala!! Jamme jamme ja funiculi funicula!~" color = "#FF9F23" mat_flags = MATERIAL_BASIC_RECIPES | MATERIAL_CLASS_ORGANIC mat_properties = list( MATERIAL_DENSITY = 4, MATERIAL_HARDNESS = 1, MATERIAL_FLEXIBILITY = 5, MATERIAL_REFLECTIVITY = 2, MATERIAL_ELECTRICAL = 8, MATERIAL_THERMAL = 4, MATERIAL_CHEMICAL = 2, ) sheet_type = /obj/item/stack/sheet/pizza item_sound_override = 'sound/effects/meatslap.ogg' turf_sound_override = FOOTSTEP_MEAT texture_layer_icon_state = "pizza" mat_rust_resistance = RUST_RESISTANCE_REINFORCED /datum/material/pizza/on_main_applied(atom/source, mat_amount, multiplier) . = ..() make_edible(source, mat_amount) ADD_TRAIT(source, TRAIT_ROD_REMOVE_FISHING_DUD, REF(src)) //the fishing rod itself is the bait... sorta. /datum/material/pizza/on_applied(atom/source, mat_amount, multiplier, from_slot) . = ..() if(IS_EDIBLE(source)) make_edible(source, mat_amount, multiplier) /datum/material/pizza/on_edible_applied(atom/source, datum/component/edible/edible) for(var/datum/reagent/consumable/nutriment/foodchem in source.reagents.reagent_list) var/list/margherita_tastes = /obj/item/food/pizza/margherita::tastes for(var/taste in margherita_tastes) LAZYSET(foodchem.data, taste, 1) source.AddComponentFrom(SOURCE_EDIBLE_MEAT_MAT, /datum/component/edible, foodtypes = GRAIN | DAIRY | VEGETABLES) /datum/material/pizza/on_edible_removed(atom/source, datum/component/edible/edible) for(var/datum/reagent/consumable/nutriment/foodchem in source.reagents.reagent_list) var/list/margherita_tastes = /obj/item/food/pizza/margherita::tastes for(var/taste in margherita_tastes) LAZYREMOVE(foodchem.data, taste) //the edible source is removed by on_removed() /datum/material/pizza/proc/make_edible(atom/source, mat_amount) if(source.material_flags & MATERIAL_NO_EDIBILITY) return var/nutriment_count = 3 * (mat_amount / SHEET_MATERIAL_AMOUNT) var/oil_count = 2 * (mat_amount / SHEET_MATERIAL_AMOUNT) source.AddComponentFrom(SOURCE_EDIBLE_PIZZA_MAT, \ /datum/component/edible, \ initial_reagents = list(/datum/reagent/consumable/nutriment = nutriment_count, /datum/reagent/consumable/nutriment/fat/oil = oil_count), \ foodtypes = GRAIN | DAIRY | VEGETABLES, \ eat_time = 3 SECONDS, \ tastes = /obj/item/food/pizza/margherita::tastes) /datum/material/pizza/on_removed(atom/source, mat_amount, multiplier, from_slot) . = ..() source.RemoveComponentSource(SOURCE_EDIBLE_PIZZA_MAT, /datum/component/edible) /datum/material/pizza/on_main_removed(atom/source, mat_amount, multiplier) . = ..() REMOVE_TRAIT(source, TRAIT_ROD_REMOVE_FISHING_DUD, REF(src))