mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-26 18:13:35 +00:00
Hotfix for virology.
This commit is contained in:
@@ -962,61 +962,55 @@
|
||||
if(istype(target, /mob/living/carbon))//maybe just add a blood reagent to all mobs. Then you can suck them dry...With hundreds of syringes. Jolly good idea.
|
||||
var/amount = src.reagents.maximum_volume - src.reagents.total_volume
|
||||
var/mob/living/carbon/T = target
|
||||
var/datum/reagent/B = new /datum/reagent/blood
|
||||
if(!T.dna)
|
||||
usr << "You are unable to locate any blood. (To be specific, your target seems to be missing their DNA datum)"
|
||||
return
|
||||
if(T.mutations2 & NOCLONE) //target done been et, no more blood in him
|
||||
user << "\red You are unable to locate any blood."
|
||||
return
|
||||
if(ishuman(T))
|
||||
if(T:vessel.get_reagent_amount("blood") < amount)
|
||||
return
|
||||
T:vessel.trans_to(src, amount)
|
||||
on_reagent_change()
|
||||
else
|
||||
var/datum/reagent/B = new /datum/reagent/blood
|
||||
B.holder = src
|
||||
B.volume = amount
|
||||
//set reagent data
|
||||
B.data["donor"] = T
|
||||
/*
|
||||
if(T.virus && T.virus.spread_type != SPECIAL)
|
||||
B.data["virus"] = new T.virus.type(0)
|
||||
*/
|
||||
B.holder = src
|
||||
B.volume = amount
|
||||
//set reagent data
|
||||
B.data["donor"] = T
|
||||
/*
|
||||
if(T.virus && T.virus.spread_type != SPECIAL)
|
||||
B.data["virus"] = new T.virus.type(0)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
for(var/datum/disease/D in T.viruses)
|
||||
if(!B.data["viruses"])
|
||||
B.data["viruses"] = list()
|
||||
for(var/datum/disease/D in T.viruses)
|
||||
if(!B.data["viruses"])
|
||||
B.data["viruses"] = list()
|
||||
|
||||
|
||||
B.data["viruses"] += new D.type
|
||||
B.data["viruses"] += new D.type
|
||||
|
||||
// not sure why it was checking if(B.data["virus2"]), but it seemed wrong
|
||||
if(T.virus2)
|
||||
B.data["virus2"] = T.virus2.getcopy()
|
||||
// not sure why it was checking if(B.data["virus2"]), but it seemed wrong
|
||||
if(T.virus2)
|
||||
B.data["virus2"] = T.virus2.getcopy()
|
||||
|
||||
B.data["blood_DNA"] = copytext(T.dna.unique_enzymes,1,0)
|
||||
if(T.resistances&&T.resistances.len)
|
||||
B.data["resistances"] = T.resistances.Copy()
|
||||
if(istype(target, /mob/living/carbon/human))//I wish there was some hasproperty operation...
|
||||
B.data["blood_type"] = copytext(T.dna.b_type,1,0)
|
||||
var/list/temp_chem = list()
|
||||
for(var/datum/reagent/R in target.reagents.reagent_list)
|
||||
temp_chem += R.name
|
||||
temp_chem[R.name] = R.volume
|
||||
B.data["trace_chem"] = list2params(temp_chem)
|
||||
B.data["antibodies"] = T.antibodies
|
||||
//debug
|
||||
//for(var/D in B.data)
|
||||
// world << "Data [D] = [B.data[D]]"
|
||||
//debug
|
||||
B.data["blood_DNA"] = copytext(T.dna.unique_enzymes,1,0)
|
||||
if(T.resistances&&T.resistances.len)
|
||||
B.data["resistances"] = T.resistances.Copy()
|
||||
if(istype(target, /mob/living/carbon/human))//I wish there was some hasproperty operation...
|
||||
B.data["blood_type"] = copytext(T.dna.b_type,1,0)
|
||||
var/list/temp_chem = list()
|
||||
for(var/datum/reagent/R in target.reagents.reagent_list)
|
||||
temp_chem += R.name
|
||||
temp_chem[R.name] = R.volume
|
||||
B.data["trace_chem"] = list2params(temp_chem)
|
||||
B.data["antibodies"] = T.antibodies
|
||||
//debug
|
||||
//for(var/D in B.data)
|
||||
// world << "Data [D] = [B.data[D]]"
|
||||
//debug
|
||||
|
||||
src.reagents.reagent_list += B
|
||||
src.reagents.update_total()
|
||||
src.on_reagent_change()
|
||||
src.reagents.handle_reactions()
|
||||
src.reagents.reagent_list += B
|
||||
src.reagents.update_total()
|
||||
src.on_reagent_change()
|
||||
src.reagents.handle_reactions()
|
||||
user << "\blue You take a blood sample from [target]"
|
||||
for(var/mob/O in viewers(4, user))
|
||||
O.show_message("\red [user] takes a blood sample from [target].", 1)
|
||||
|
||||
Reference in New Issue
Block a user