mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-15 20:52:41 +00:00
Fixed monkeys not getting space rabies via syringes.
This commit is contained in:
@@ -189,18 +189,11 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
|||||||
. = ..()
|
. = ..()
|
||||||
vessel.remove_reagent("blood",amount) // Removes blood if human
|
vessel.remove_reagent("blood",amount) // Removes blood if human
|
||||||
|
|
||||||
//Transfers blood from container ot vessels, respecting blood types compatability.
|
//Transfers blood from container ot vessels
|
||||||
/mob/living/carbon/human/proc/inject_blood(obj/item/weapon/reagent_containers/container, var/amount)
|
/mob/living/carbon/proc/inject_blood(obj/item/weapon/reagent_containers/container, var/amount)
|
||||||
var/datum/reagent/blood/our = get_blood(vessel)
|
|
||||||
var/datum/reagent/blood/injected = get_blood(container.reagents)
|
var/datum/reagent/blood/injected = get_blood(container.reagents)
|
||||||
if (!injected)
|
if (!injected)
|
||||||
return
|
return
|
||||||
if(blood_incompatible(injected.data["blood_type"],our.data["blood_type"]) )
|
|
||||||
reagents.add_reagent("toxin",amount * 0.5)
|
|
||||||
reagents.update_total()
|
|
||||||
else
|
|
||||||
vessel.add_reagent("blood", amount, injected.data)
|
|
||||||
vessel.update_total()
|
|
||||||
src.virus2 |= virus_copylist(injected.data["virus2"])
|
src.virus2 |= virus_copylist(injected.data["virus2"])
|
||||||
if (injected.data["antibodies"] && prob(5))
|
if (injected.data["antibodies"] && prob(5))
|
||||||
antibodies |= injected.data["antibodies"]
|
antibodies |= injected.data["antibodies"]
|
||||||
@@ -208,11 +201,24 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
|||||||
chems = params2list(injected.data["trace_chem"])
|
chems = params2list(injected.data["trace_chem"])
|
||||||
for(var/C in chems)
|
for(var/C in chems)
|
||||||
src.reagents.add_reagent(C, (text2num(chems[C]) / 560) * amount)//adds trace chemicals to owner's blood
|
src.reagents.add_reagent(C, (text2num(chems[C]) / 560) * amount)//adds trace chemicals to owner's blood
|
||||||
//world << "added [(text2num(chems[C])/560) * amount] = [text2num(chems[C])]/560*[amount] units of [C] to [src]" //DEBUG
|
|
||||||
reagents.update_total()
|
reagents.update_total()
|
||||||
|
|
||||||
container.reagents.remove_reagent("blood", amount)
|
container.reagents.remove_reagent("blood", amount)
|
||||||
|
|
||||||
|
//Transfers blood from container ot vessels, respecting blood types compatability.
|
||||||
|
/mob/living/carbon/human/inject_blood(obj/item/weapon/reagent_containers/container, var/amount)
|
||||||
|
var/datum/reagent/blood/our = get_blood(vessel)
|
||||||
|
var/datum/reagent/blood/injected = get_blood(container.reagents)
|
||||||
|
if (!injected || !our)
|
||||||
|
return
|
||||||
|
if(blood_incompatible(injected.data["blood_type"],our.data["blood_type"]) )
|
||||||
|
reagents.add_reagent("toxin",amount * 0.5)
|
||||||
|
reagents.update_total()
|
||||||
|
else
|
||||||
|
vessel.add_reagent("blood", amount, injected.data)
|
||||||
|
vessel.update_total()
|
||||||
|
..()
|
||||||
|
|
||||||
//Gets human's own blood.
|
//Gets human's own blood.
|
||||||
/mob/living/carbon/proc/get_blood(datum/reagents/container)
|
/mob/living/carbon/proc/get_blood(datum/reagents/container)
|
||||||
var/datum/reagent/blood/res = locate() in container.reagent_list //Grab some blood
|
var/datum/reagent/blood/res = locate() in container.reagent_list //Grab some blood
|
||||||
|
|||||||
@@ -154,9 +154,9 @@
|
|||||||
B = d
|
B = d
|
||||||
break
|
break
|
||||||
var/trans
|
var/trans
|
||||||
if(B && ishuman(target))
|
if(B && istype(target,/mob/living/carbon))
|
||||||
var/mob/living/carbon/human/H = target
|
var/mob/living/carbon/C = target
|
||||||
H.inject_blood(src,5)
|
C.inject_blood(src,5)
|
||||||
else
|
else
|
||||||
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||||
user << "\blue You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units."
|
user << "\blue You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units."
|
||||||
|
|||||||
Reference in New Issue
Block a user