From 439a1fe8b17e842f012ef1d4e9763190030ac9d1 Mon Sep 17 00:00:00 2001 From: Heroman Date: Thu, 8 Jul 2021 16:36:19 +1000 Subject: [PATCH] Fixes blood being not injectable in any container of /food subtype --- code/modules/food/food/drinks.dm | 3 --- code/modules/food/food/drinks_vr.dm | 5 +---- code/modules/reagents/holder/holder.dm | 23 +---------------------- 3 files changed, 2 insertions(+), 29 deletions(-) diff --git a/code/modules/food/food/drinks.dm b/code/modules/food/food/drinks.dm index 1f7bbc23d1d..db8a9216058 100644 --- a/code/modules/food/food/drinks.dm +++ b/code/modules/food/food/drinks.dm @@ -409,6 +409,3 @@ volume = 30 center_of_mass = list("x"=15, "y"=13) -/obj/item/weapon/reagent_containers/food/drinks/britcup/on_reagent_change() - ..() - diff --git a/code/modules/food/food/drinks_vr.dm b/code/modules/food/food/drinks_vr.dm index 9f088c4434c..37dcb58c5f6 100644 --- a/code/modules/food/food/drinks_vr.dm +++ b/code/modules/food/food/drinks_vr.dm @@ -4,7 +4,4 @@ icon = 'icons/obj/drinks_vr.dmi' icon_state = "textmug" volume = 30 - center_of_mass = list("x"=15, "y"=13) - -/obj/item/weapon/reagent_containers/food/drinks/britcup/on_reagent_change() - ..() \ No newline at end of file + center_of_mass = list("x"=15, "y"=13) \ No newline at end of file diff --git a/code/modules/reagents/holder/holder.dm b/code/modules/reagents/holder/holder.dm index 8ddf4752b58..40766754b66 100644 --- a/code/modules/reagents/holder/holder.dm +++ b/code/modules/reagents/holder/holder.dm @@ -111,27 +111,6 @@ update_total() amount = min(amount, get_free_space()) - if(istype(my_atom,/obj/item/weapon/reagent_containers/food)) //The following code is targeted specifically at getting allergen reagents into food items, since for the most part they're not applied by default. - var/list/add_reagents = list() - var/totalnum = 0 - - for(var/item in data) //Try to find the ID - var/add_reagent_id = null - if(item in SSchemistry.chemical_reagents) - add_reagent_id = item - else if("[item]juice" in SSchemistry.chemical_reagents) - add_reagent_id = "[item]juice" - if(add_reagent_id) //If we did find it, add it to our list of reagents to add, and add the number to our total. - add_reagents[add_reagent_id] += data[item] - totalnum += data[item] - - if(totalnum) - var/multconst = amount/totalnum //We're going to add these extra reagents so that they share the ratio described, but only add up to 1x the existing amount at the most - for(var/item in add_reagents) - add_reagent(item,add_reagents[item]*multconst) - - - for(var/datum/reagent/current in reagent_list) if(current.id == id) @@ -517,7 +496,7 @@ trans_to(T, total_volume, multiplier, copy) if (total_volume <= 0) qdel(src) - + /** * Calls [/datum/reagent/proc/on_update] on every reagent in this holder *