diff --git a/code/modules/food_and_drinks/food.dm b/code/modules/food_and_drinks/food.dm
index b1df946e34..de41d2dd23 100644
--- a/code/modules/food_and_drinks/food.dm
+++ b/code/modules/food_and_drinks/food.dm
@@ -25,7 +25,7 @@
pixel_y = rand(-5, 5)
/obj/item/reagent_containers/food/proc/adjust_food_quality(new_quality)
- food_quality = min(new_quality,100)
+ food_quality = clamp(new_quality,0,100)
/obj/item/reagent_containers/food/proc/checkLiked(var/fraction, mob/M)
if(last_check_time + 50 < world.time)
diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm
index bd20ad8d69..0e2bdc63c8 100644
--- a/code/modules/food_and_drinks/food/customizables.dm
+++ b/code/modules/food_and_drinks/food/customizables.dm
@@ -20,6 +20,7 @@
var/list/ingredients = list()
var/ingredients_placement = INGREDIENTS_FILL
var/customname = "custom"
+ var/total_quality = 0 //quality of all ingredients added together
/obj/item/reagent_containers/food/snacks/customizable/examine(mob/user)
. = ..()
@@ -56,6 +57,9 @@
S.reagents.trans_to(src,min(S.reagents.total_volume, 15)) //limit of 15, we don't want our custom food to be completely filled by just one ingredient with large reagent volume.
foodtype |= S.foodtype
update_snack_overlays(S)
+ //quality of customised food is average of the ingredient's qualities
+ total_quality += S.food_quality
+ food_quality = total_quality / length(ingredients)
to_chat(user, "You add the [I.name] to the [name].")
update_name(S)
else
diff --git a/code/modules/food_and_drinks/food/snacks_bread.dm b/code/modules/food_and_drinks/food/snacks_bread.dm
index 204e5ce455..11eedcd363 100644
--- a/code/modules/food_and_drinks/food/snacks_bread.dm
+++ b/code/modules/food_and_drinks/food/snacks_bread.dm
@@ -247,18 +247,22 @@ GLOBAL_LIST_INIT(frying_bad_chems, list(
add_atom_colour(rgb(166,103,54), FIXED_COLOUR_PRIORITY)
name = "lightly-fried [name]"
desc = "[desc] It's been lightly fried in a deep fryer."
+ adjust_food_quality(food_quality - 5)
if(16 to 49)
add_atom_colour(rgb(103,63,24), FIXED_COLOUR_PRIORITY)
name = "fried [name]"
desc = "[desc] It's been fried, increasing its tastiness value by [rand(1, 75)]%."
+ adjust_food_quality(food_quality - 10)
if(50 to 59)
add_atom_colour(rgb(63,23,4), FIXED_COLOUR_PRIORITY)
name = "deep-fried [name]"
desc = "[desc] Deep-fried to perfection."
+ adjust_food_quality(food_quality) //we shouldn't punish perfection in the fried arts
if(60 to INFINITY)
add_atom_colour(rgb(33,19,9), FIXED_COLOUR_PRIORITY)
name = "the physical manifestation of the very concept of fried foods"
desc = "A heavily-fried...something. Who can tell anymore?"
+ adjust_food_quality(0) //good job, you're truly the best cook.
filling_color = color
foodtype |= FRIED
diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
index 1215dd7ecb..2cd17a9020 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
@@ -104,6 +104,12 @@ God bless America.
else if(!frying && user.transferItemToLoc(I, src))
to_chat(user, "You put [I] into [src].")
frying = new/obj/item/reagent_containers/food/snacks/deepfryholder(src, I)
+ //setup food quality for item depending on if it's edible or not
+ if(istype(I, /obj/item/reagent_containers/food))
+ /obj/item/reagent_containers/food/original_food = I
+ frying.adjust_food_quality(I.food_quality) //food quality remains unchanged until degree of frying is calculated
+ else
+ frying.food_quality = 10 //inedible fried item has low quality
icon_state = "fryer_on"
fry_loop.start()
diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
index 305d12b3c5..bd79ed5fb8 100644
--- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
@@ -506,7 +506,7 @@
taste_description = "awful cooking"
/datum/reagent/toxin/condensed_cooking_oil/on_mob_life(mob/living/carbon/M)
- if(prob(15))
+ if(prob(5))
M.vomit()
else
if(prob(40))