mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
[MIRROR] Fixes newfood reagent transfer and food trash' to_chat (#2007)
* Fixes newfood reagent transfer and food trash' to_chat (#55150) Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com> * Fixes newfood reagent transfer and food trash' to_chat Co-authored-by: Qustinnus <Floydje123@hotmail.com> Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
This commit is contained in:
co-authored by
Jared-Fogle
Qustinnus
parent
b1355636c3
commit
434b5d2f23
@@ -192,7 +192,7 @@ Behavior that's still missing from this component that original food items had t
|
||||
|
||||
var/atom/this_food = parent
|
||||
|
||||
this_food.reagents.clear_reagents()
|
||||
this_food.reagents.multiply_reagents(CRAFTED_FOOD_BASE_REAGENT_MODIFIER)
|
||||
|
||||
for(var/obj/item/crafted_part in this_food.contents)
|
||||
crafted_part.reagents?.trans_to(this_food.reagents, crafted_part.reagents.maximum_volume, CRAFTED_FOOD_INGREDIENT_REAGENT_MODIFIER)
|
||||
@@ -208,13 +208,6 @@ Behavior that's still missing from this component that original food items had t
|
||||
|
||||
QDEL_LIST(objects_to_delete)
|
||||
|
||||
for(var/r_id in initial_reagents)
|
||||
var/amount = initial_reagents[r_id] * CRAFTED_FOOD_BASE_REAGENT_MODIFIER
|
||||
if(r_id == /datum/reagent/consumable/nutriment || r_id == /datum/reagent/consumable/nutriment/vitamin || r_id == /datum/reagent/consumable/nutriment/protein)
|
||||
this_food.reagents.add_reagent(r_id, amount, tastes)
|
||||
else
|
||||
this_food.reagents.add_reagent(r_id, amount)
|
||||
|
||||
SSblackbox.record_feedback("tally", "food_made", 1, type)
|
||||
|
||||
/datum/component/edible/proc/OnMicrowaved(datum/source, obj/machinery/microwave/used_microwave)
|
||||
@@ -245,17 +238,10 @@ Behavior that's still missing from this component that original food items had t
|
||||
|
||||
var/atom/this_food = parent
|
||||
|
||||
this_food.reagents.clear_reagents()
|
||||
this_food.reagents.multiply_reagents(cooking_efficiency * CRAFTED_FOOD_BASE_REAGENT_MODIFIER)
|
||||
|
||||
source_item.reagents?.trans_to(this_food, source_item.reagents.total_volume)
|
||||
|
||||
for(var/r_id in initial_reagents)
|
||||
var/amount = initial_reagents[r_id] * cooking_efficiency * CRAFTED_FOOD_BASE_REAGENT_MODIFIER
|
||||
if(r_id == /datum/reagent/consumable/nutriment || r_id == /datum/reagent/consumable/nutriment/vitamin || r_id == /datum/reagent/consumable/nutriment/protein)
|
||||
this_food.reagents.add_reagent(r_id, amount, tastes)
|
||||
else
|
||||
this_food.reagents.add_reagent(r_id, amount)
|
||||
|
||||
///Makes sure the thing hasn't been destroyed or fully eaten to prevent eating phantom edibles
|
||||
/datum/component/edible/proc/IsFoodGone(atom/owner, mob/living/feeder)
|
||||
if(QDELETED(owner)|| !(IS_EDIBLE(owner)))
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
/datum/element/food_trash/proc/open_trash(datum/source, mob/user)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
to_chat(user, "<span class='notice'>You open the [src]\'s shell, revealing \a [initial(trash.name)].</span>")
|
||||
to_chat(user, "<span class='notice'>You open the [source], revealing \a [initial(trash.name)].</span>")
|
||||
|
||||
INVOKE_ASYNC(src, .proc/async_generate_trash, source)
|
||||
qdel(source)
|
||||
|
||||
Reference in New Issue
Block a user