Fixes blood transfusion, QOL to IV drippers

This commit is contained in:
Poojawa
2019-10-16 09:15:04 -05:00
parent 14e0087fbd
commit 4ee608e0c7
2 changed files with 20 additions and 14 deletions
+5 -2
View File
@@ -146,10 +146,11 @@
if(!amount)
if(prob(5))
visible_message("[src] pings.")
playsound(loc, 'sound/machines/beep.ogg', 50, 1)
return
// If the human is losing too much blood, beep.
if(attached.blood_volume < ((BLOOD_VOLUME_SAFE*attached.blood_ratio) && prob(5)))
if(attached.blood_volume < ((BLOOD_VOLUME_SAFE*attached.blood_ratio) && prob(5) && ishuman(attached))) //really couldn't care less about monkeys
visible_message("[src] beeps loudly.")
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
attached.transfer_blood_to(beaker, amount)
@@ -183,7 +184,9 @@
if(usr.incapacitated())
return
if(beaker)
beaker.forceMove(drop_location())
if(usr && Adjacent(usr) && !issiliconoradminghost(usr))
if(!usr.put_in_hands(beaker))
beaker.forceMove(drop_location())
beaker = null
update_icon()
@@ -26,19 +26,22 @@
else //ingest, patch or inject
L.ForceContractDisease(D)
/datum/reagent/blood/on_mob_life(mob/living/carbon/C, method=INJECT, reac_volume) //needed so we don't nuke people with massive toxins now. Because apparently being hyperlethal is preferable to stamina drain
if(!istype(C))
return
var/blood_id = C.get_blood_id()
if((blood_id == "blood" || blood_id == "jellyblood") && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits))))
if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type)))
C.adjustToxLoss(2*REM, TRUE, TRUE) //forced to ensure people don't use it to gain tox as slime person
C.blood_volume = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM) //but it should still refill blood
else
C.blood_volume = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM)
if(iscarbon(L))
var/mob/living/carbon/C = L
var/blood_id = C.get_blood_id()
if((blood_id == "blood" || blood_id == "jellyblood") && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits))))
C.blood_volume = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM * C.blood_ratio)
// we don't care about bloodtype here, we're just refilling the mob
holder.remove_reagent(id, 1)
return TRUE
if(reac_volume >= 10 && istype(L) && method != INJECT)
L.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
/datum/reagent/blood/on_mob_life(mob/living/carbon/C) //Because lethals are preferred over stamina. damnifino.
var/blood_id = C.get_blood_id()
if((blood_id == "blood" || blood_id == "jellyblood"))
if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type))) //we only care about bloodtype here because this is where the poisoning should be
C.adjustToxLoss(rand(2,8)*REM, TRUE, TRUE) //forced to ensure people don't use it to gain beneficial toxin as slime person
..()
/datum/reagent/blood/reaction_obj(obj/O, volume)
if(volume >= 3 && istype(O))