more food quality

This commit is contained in:
timothyteakettle
2020-04-09 01:36:15 +01:00
parent bc6294baa9
commit 792be6e146
5 changed files with 16 additions and 2 deletions
+1 -1
View File
@@ -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)
@@ -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, "<span class='notice'>You add the [I.name] to the [name].</span>")
update_name(S)
else
@@ -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
@@ -104,6 +104,12 @@ God bless America.
else if(!frying && user.transferItemToLoc(I, src))
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
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()
@@ -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))