mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Fixes blood being left in a mob's bloodstream after insertion (#70439)
* Fixes blood being left in a mob's bloodstream after insertion * Replaces baked-in typepath with type variable instead
This commit is contained in:
@@ -34,12 +34,14 @@
|
||||
|
||||
if(iscarbon(exposed_mob))
|
||||
var/mob/living/carbon/exposed_carbon = exposed_mob
|
||||
if(exposed_carbon.get_blood_id() == /datum/reagent/blood && ((methods & INJECT) || ((methods & INGEST) && exposed_carbon.dna && exposed_carbon.dna.species && (DRINKSBLOOD in exposed_carbon.dna.species.species_traits))))
|
||||
if(exposed_carbon.get_blood_id() == type && ((methods & INJECT) || ((methods & INGEST) && exposed_carbon.dna && exposed_carbon.dna.species && (DRINKSBLOOD in exposed_carbon.dna.species.species_traits))))
|
||||
if(!data || !(data["blood_type"] in get_safe_blood(exposed_carbon.dna.blood_type)))
|
||||
exposed_carbon.reagents.add_reagent(/datum/reagent/toxin, reac_volume * 0.5)
|
||||
else
|
||||
exposed_carbon.blood_volume = min(exposed_carbon.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM)
|
||||
|
||||
exposed_carbon.reagents.remove_reagent(type, reac_volume) // Because we don't want blood to just lie around in the patient's blood, makes no sense.
|
||||
|
||||
|
||||
/datum/reagent/blood/on_new(list/data)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user