i too, like food quality.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
var/foodtype = NONE
|
||||
var/last_check_time
|
||||
var/food_quality = 50
|
||||
|
||||
/obj/item/reagent_containers/food/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -23,6 +24,9 @@
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/reagent_containers/food/proc/adjust_food_quality(new_quality)
|
||||
food_quality = min(new_quality,100)
|
||||
|
||||
/obj/item/reagent_containers/food/proc/checkLiked(var/fraction, mob/M)
|
||||
if(last_check_time + 50 < world.time)
|
||||
if(ishuman(M))
|
||||
@@ -32,11 +36,11 @@
|
||||
to_chat(H,"<span class='warning'>What the hell was that thing?!</span>")
|
||||
H.adjust_disgust(25 + 30 * fraction)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "toxic_food", /datum/mood_event/disgusting_food)
|
||||
else if(foodtype & H.dna.species.disliked_food)
|
||||
else if((foodtype & H.dna.species.disliked_food) || food_quality <= 30)
|
||||
to_chat(H,"<span class='notice'>That didn't taste very good...</span>")
|
||||
H.adjust_disgust(11 + 15 * fraction)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "gross_food", /datum/mood_event/gross_food)
|
||||
else if(foodtype & H.dna.species.liked_food)
|
||||
else if((foodtype & H.dna.species.liked_food) || food_quality >= 70)
|
||||
to_chat(H,"<span class='notice'>I love this taste!</span>")
|
||||
H.adjust_disgust(-5 + -2.5 * fraction)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "fav_food", /datum/mood_event/favorite_food)
|
||||
|
||||
@@ -296,6 +296,10 @@ All foods are distributed among various categories. Use common sense.
|
||||
var/obj/item/result
|
||||
if(cooked_type)
|
||||
result = new cooked_type(T)
|
||||
//if the result is food, set its food quality to the original food item's quality
|
||||
if(istype(result, /obj/item/reagent_containers/food))
|
||||
var/obj/item/reagent_containers/food/food_output = result
|
||||
food_output.adjust_food_quality(food_quality)
|
||||
if(istype(M))
|
||||
initialize_cooked_food(result, M.efficiency)
|
||||
else
|
||||
|
||||
@@ -28,8 +28,10 @@
|
||||
|
||||
/obj/machinery/processor/proc/process_food(datum/food_processor_process/recipe, atom/movable/what)
|
||||
if (recipe.output && loc && !QDELETED(src))
|
||||
var/obj/item/reagent_containers/food/food_input = what
|
||||
for(var/i = 0, i < rating_amount, i++)
|
||||
new recipe.output(drop_location())
|
||||
var/obj/item/reagent_containers/food/food_output = new recipe.output(drop_location())
|
||||
food_output.adjust_food_quality(food_input.food_quality) //output quality equals input quality for the food processor
|
||||
if (ismob(what))
|
||||
var/mob/themob = what
|
||||
themob.gib(TRUE,TRUE,TRUE)
|
||||
|
||||
Reference in New Issue
Block a user