From d14a05f7b08c4a3ee9d256e88adbfe5e4fe05b49 Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Sun, 8 Apr 2012 09:23:49 +0100 Subject: [PATCH] Hotfix for virology. --- code/modules/chemical/Chemistry-Tools.dm | 76 +++++++++++------------- 1 file changed, 35 insertions(+), 41 deletions(-) diff --git a/code/modules/chemical/Chemistry-Tools.dm b/code/modules/chemical/Chemistry-Tools.dm index b27b58e7338..96f23bfdf44 100644 --- a/code/modules/chemical/Chemistry-Tools.dm +++ b/code/modules/chemical/Chemistry-Tools.dm @@ -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)