diff --git a/code/datums/diseases/vampire.dm b/code/datums/diseases/vampire.dm
index 29b90816d3d..924c9b9c639 100644
--- a/code/datums/diseases/vampire.dm
+++ b/code/datums/diseases/vampire.dm
@@ -8,6 +8,7 @@
cure_prob = 8
severity = DANGEROUS
can_immunity = FALSE
+ visibility_flags = HIDDEN_PANDEMIC
/datum/disease/vampire/stage_act()
if(!..())
diff --git a/code/datums/diseases/viruses/_virus.dm b/code/datums/diseases/viruses/_virus.dm
index a560c24a097..f850fbb40ab 100644
--- a/code/datums/diseases/viruses/_virus.dm
+++ b/code/datums/diseases/viruses/_virus.dm
@@ -60,6 +60,9 @@
while(TRUE)
if(V == T)
var/a_type = (spread_range == 1) ? CONTACT : CONTACT|AIRBORNE
+ //if we wear bio suit, for example, we won't be able to contract anyone
+ if(affected_mob.CheckVirusProtection(src, a_type))
+ return
Contract(C, act_type = a_type, need_protection_check = TRUE)
break
var/turf/Temp = get_step_towards(V, T)
diff --git a/code/datums/diseases/viruses/advance/advance.dm b/code/datums/diseases/viruses/advance/advance.dm
index a0e1c579e45..13d9ce41175 100644
--- a/code/datums/diseases/viruses/advance/advance.dm
+++ b/code/datums/diseases/viruses/advance/advance.dm
@@ -82,6 +82,12 @@ GLOBAL_LIST_EMPTY(archive_diseases)
/datum/disease/virus/advance/cure(id, need_immunity)
..(GetDiseaseID(), need_immunity)
+/datum/disease/virus/advance/Contract(mob/living/M, act_type, is_carrier = FALSE, need_protection_check = FALSE, zone)
+ var/datum/disease/virus/advance/A = ..()
+ if(!istype(A))
+ return FALSE
+ A.Refresh(update_properties = FALSE)
+
// Returns the advance disease with a different reference memory.
/datum/disease/virus/advance/Copy()
var/datum/disease/virus/advance/copy = new
@@ -335,12 +341,12 @@ GLOBAL_LIST_EMPTY(archive_diseases)
/proc/SetViruses(datum/reagent/R, list/data)
if(data)
var/list/preserve = list()
- if(istype(data) && data["viruses"])
- for(var/datum/disease/virus/A in data["viruses"])
- preserve += A.Copy()
+ if(istype(data) && data["diseases"])
+ for(var/datum/disease/D in data["diseases"])
+ preserve += D.Copy()
R.data = data.Copy()
if(preserve.len)
- R.data["viruses"] = preserve
+ R.data["diseases"] = preserve
/proc/AdminCreateVirus(client/user)
diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm
index d33e99eea46..b9e443e19b0 100644
--- a/code/modules/reagents/chemistry/holder.dm
+++ b/code/modules/reagents/chemistry/holder.dm
@@ -394,7 +394,7 @@
var/datum/chemical_reaction/C = reaction
var/total_required_reagents = length(C.required_reagents)
var/total_matching_reagents = 0
- var/total_required_catalysts = length(C.required_catalysts)
+ var/total_required_catalysts = C.count_of_catalysts == -1 ? length(C.required_catalysts) : C.count_of_catalysts
var/total_matching_catalysts = 0
var/matching_container = FALSE
var/matching_other = FALSE
@@ -414,9 +414,8 @@
total_matching_reagents++
multipliers += round(get_reagent_amount(B) / C.required_reagents[B])
for(var/B in C.required_catalysts)
- if(!has_reagent(B, C.required_catalysts[B]))
- break
- total_matching_catalysts++
+ if(has_reagent(B, C.required_catalysts[B]))
+ total_matching_catalysts++
if(!C.required_container)
matching_container = TRUE
@@ -437,7 +436,7 @@
if(min_temp == 0)
min_temp = chem_temp
- if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other && chem_temp <= max_temp && chem_temp >= min_temp)
+ if(total_matching_reagents == total_required_reagents && total_matching_catalysts >= total_required_catalysts && matching_container && matching_other && chem_temp <= max_temp && chem_temp >= min_temp)
var/multiplier = min(multipliers)
var/preserved_data = null
for(var/B in C.required_reagents)
@@ -807,11 +806,11 @@
// Technically we should probably copy all data lists, but
// that could possibly eat up a lot of memory needlessly
// if most data lists are read-only.
- if(trans_data["viruses"])
+ if(trans_data["diseases"])
var/list/temp = list()
- for(var/datum/disease/v in trans_data["viruses"])
- temp.Add(v.Copy())
- trans_data["viruses"] = temp
+ for(var/datum/disease/D in trans_data["diseases"])
+ temp += D.Copy()
+ trans_data["diseases"] = temp
return trans_data
/datum/reagents/proc/generate_taste_message(minimum_percent = TASTE_SENSITIVITY_NORMAL)
diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm
index 799410ad9ec..26013cb1f57 100644
--- a/code/modules/reagents/chemistry/machinery/pandemic.dm
+++ b/code/modules/reagents/chemistry/machinery/pandemic.dm
@@ -23,26 +23,22 @@
overlays.Cut()
stat |= BROKEN
-/obj/machinery/computer/pandemic/proc/GetVirusByIndex(index)
- if(beaker && beaker.reagents)
- if(beaker.reagents.reagent_list.len)
- var/datum/reagent/blood/BL = locate() in beaker.reagents.reagent_list
- if(BL)
- if(BL.data && BL.data["viruses"])
- var/list/viruses = BL.data["viruses"]
- return viruses[index]
+/obj/machinery/computer/pandemic/proc/GetDiseaseByIndex(index)
+ if(beaker?.reagents?.reagent_list.len)
+ for(var/datum/reagent/BL in beaker.reagents.reagent_list)
+ if(BL?.data && BL.data["diseases"])
+ var/list/diseases = BL.data["diseases"]
+ return diseases[index]
/obj/machinery/computer/pandemic/proc/GetResistancesByIndex(index)
- if(beaker && beaker.reagents)
- if(beaker.reagents.reagent_list.len)
- var/datum/reagent/blood/BL = locate() in beaker.reagents.reagent_list
- if(BL)
- if(BL.data && BL.data["resistances"])
- var/list/resistances = BL.data["resistances"]
- return resistances[index]
-
-/obj/machinery/computer/pandemic/proc/GetVirusTypeByIndex(index)
- var/datum/disease/D = GetVirusByIndex(index)
+ if(beaker?.reagents?.reagent_list.len)
+ for(var/datum/reagent/BL in beaker.reagents.reagent_list)
+ if(BL?.data && BL.data["resistances"])
+ var/list/resistances = BL.data["resistances"]
+ return resistances[index]
+
+/obj/machinery/computer/pandemic/proc/GetDiseaseTypeByIndex(index)
+ var/datum/disease/D = GetDiseaseByIndex(index)
if(D)
return D.GetDiseaseID()
@@ -103,10 +99,10 @@
temp_html = "The replicator is not ready yet."
updateUsrDialog()
return
- else if(href_list["create_virus_culture"])
+ else if(href_list["create_disease_culture"])
if(!wait)
- var/datum/disease/D = GetVirusByIndex(text2num(href_list["create_virus_culture"]))
- var/datum/disease/copy = null
+ var/datum/disease/D = GetDiseaseByIndex(text2num(href_list["create_disease_culture"]))
+ var/datum/disease/copy
if(istype(D, /datum/disease/virus/advance))
var/datum/disease/virus/advance/A = GLOB.archive_diseases[D.GetDiseaseID()]
if(A)
@@ -118,12 +114,12 @@
var/name = stripped_input(usr,"Name:","Name the culture",copy.name,MAX_NAME_LEN)
if(name == null || wait)
return
- var/obj/item/reagent_containers/glass/bottle/B = new/obj/item/reagent_containers/glass/bottle(loc)
+ var/obj/item/reagent_containers/glass/bottle/B = new(loc)
B.icon_state = "round_bottle"
B.pixel_x = rand(-3, 3)
B.pixel_y = rand(-3, 3)
replicator_cooldown(50)
- var/list/data = list("viruses"=list(copy))
+ var/list/data = list("diseases"=list(copy))
B.name = "[name] culture bottle"
B.desc = "A small bottle. Contains [copy.agent] culture in synthblood medium."
B.reagents.add_reagent("blood",20,data)
@@ -151,15 +147,15 @@
return
if(..())
return
- var/id = GetVirusTypeByIndex(text2num(href_list["name_disease"]))
+ var/id = GetDiseaseTypeByIndex(text2num(href_list["name_disease"]))
if(GLOB.archive_diseases[id])
var/datum/disease/virus/advance/A = GLOB.archive_diseases[id]
A.AssignName(new_name)
for(var/datum/disease/virus/advance/AD in GLOB.active_diseases)
- AD.Refresh()
+ AD.Refresh(update_properties = FALSE)
updateUsrDialog()
else if(href_list["print_form"])
- var/datum/disease/D = GetVirusByIndex(text2num(href_list["print_form"]))
+ var/datum/disease/D = GetDiseaseByIndex(text2num(href_list["print_form"]))
D = GLOB.archive_diseases[D.GetDiseaseID()]//We know it's advanced no need to check
print_form(D, usr)
@@ -229,10 +225,13 @@
dat += "Закрыть"
else
var/datum/reagents/R = beaker.reagents
- var/datum/reagent/blood/Blood = null
- for(var/datum/reagent/blood/B in R.reagent_list)
- if(B)
+ var/datum/reagent/Blood = null
+
+ for(var/datum/reagent/B in R.reagent_list)
+ if(B.id in GLOB.diseases_carrier_reagents)
Blood = B
+ if(!Blood.data)
+ continue
break
if(!R.total_volume||!R.reagent_list.len)
dat += "Мензурка пуста
"
@@ -246,54 +245,52 @@
dat += "Тип крови: [(Blood.data["blood_type"]||"нет")]
"
dat += "Тип расовой крови: [(Blood.data["blood_species"]||"нет")]
"
-
- if(Blood.data["viruses"])
- var/list/vir = Blood.data["viruses"]
- if(vir.len)
- var/i = 0
- for(var/thing in Blood.data["viruses"])
- var/datum/disease/D = thing
- i++
- if(!(D.visibility_flags & HIDDEN_PANDEMIC))
-
- if(istype(D, /datum/disease/virus/advance))
-
- var/datum/disease/virus/advance/A = D
- D = GLOB.archive_diseases[A.GetDiseaseID()]
- if(D)
- if(D.name == "Unknown")
- dat += "Назвать вирус
"
- else
- dat += "Напечатать форму выпуска
"
-
- if(!D)
- CRASH("We weren't able to get the advance disease from the archive.")
-
- dat += "Болезнетворный агент: [D?"[D.agent] — Создать бутылёк с вирусной культурой":"нет"]
"
- dat += "Общепринятое название: [(D.name||"нет")]
"
- dat += "Описание: [(D.desc||"нет")]
"
- dat += "Путь передачи: [(D.additional_info||"нет")]
"
- dat += "Возможное лекарство: [(D.cure_text||"нет")]
"
- dat += "Возможность выработки антител: [(D.can_immunity ? "Присутствует" : "Отсутствует")]
"
-
- if(istype(D, /datum/disease/virus/advance))
- var/datum/disease/virus/advance/A = D
- dat += "Симптомы: "
- var/english_symptoms = list()
- for(var/datum/symptom/S in A.symptoms)
- english_symptoms += S.name
- dat += english_list(english_symptoms)
-
+ dat += "
Данные о заболеваниях:
"
+ if(Blood.data["diseases"])
+ var/i = 0
+ for(var/datum/disease/D in Blood.data["diseases"])
+ i++
+ if(!(D.visibility_flags & HIDDEN_PANDEMIC))
+
+ dat += "Общепринятое название: "
+
+ if(istype(D, /datum/disease/virus/advance))
+ var/datum/disease/virus/advance/A = D
+ D = GLOB.archive_diseases[A.GetDiseaseID()]
+ if(D)
+ if(D.name == "Unknown")
+ dat += "Назвать вирус
"
+ else
+ dat += "[D.name] Напечатать форму выпуска
"
else
- dat += "В образце не обнаружен вирус."
+ dat += "[D.name]
"
+
+ if(!D)
+ CRASH("We weren't able to get the advance disease from the archive.")
+
+ dat += "Болезнетворный агент: [D?"[D.agent] — Создать образец":"нет"]
"
+ dat += "Описание: [(D.desc||"нет")]
"
+ dat += "Путь передачи: [(D.additional_info||"нет")]
"
+ dat += "Возможное лекарство: [(D.cure_text||"нет")]
"
+ dat += "Возможность выработки антител: [(D.can_immunity ? "Присутствует" : "Отсутствует")]
"
+
+ if(istype(D, /datum/disease/virus/advance))
+ var/datum/disease/virus/advance/A = D
+ dat += "
Симптомы: "
+ var/english_symptoms = list()
+ for(var/datum/symptom/S in A.symptoms)
+ english_symptoms += S.name
+ dat += english_list(english_symptoms)
+ dat += "
"
+ if(i == 0)
+ dat += "В образце не обнаружен вирус."
else
dat += "В образце не обнаружен вирус."
- dat += "
Содержит антитела к: "
if(Blood.data["resistances"])
var/list/res = Blood.data["resistances"]
if(res.len)
- dat += ""
+ dat += "
Содержит антитела к:"
var/i = 0
for(var/type in Blood.data["resistances"])
i++
@@ -310,13 +307,13 @@
dat += "- [disease_name] - Создать бутылёк с вакциной
"
dat += "
"
else
- dat += "ничему
"
+ dat += "
Не содержит антител
"
else
- dat += "nothing
"
+ dat += "
Не содержит антител
"
dat += "
Извлечь мензурку[((R.total_volume&&R.reagent_list.len) ? "-- Очистить и извлечь мензурку":"")]
"
dat += "Закрыть"
- var/datum/browser/popup = new(user, "pandemic", name, 575, 400)
+ var/datum/browser/popup = new(user, "pandemic", name, 575, 480)
popup.set_content(dat)
popup.open(0)
onclose(user, "pandemic")
diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm
index b0d5f9d549a..be2e8521ccf 100644
--- a/code/modules/reagents/chemistry/reagents.dm
+++ b/code/modules/reagents/chemistry/reagents.dm
@@ -134,6 +134,37 @@
/datum/reagent/proc/on_merge(data)
return
+// Called in on_merge() proc if reagent can carry diseases
+/datum/reagent/proc/merge_diseases_data(list/mix_data)
+ if(!(id in GLOB.diseases_carrier_reagents))
+ return
+
+ if(data && mix_data)
+ if(data["diseases"] || mix_data["diseases"])
+
+ var/list/mix1 = data["diseases"]
+ var/list/mix2 = mix_data["diseases"]
+
+ var/list/to_mix = list()
+
+ for(var/datum/disease/virus/advance/AD in mix1)
+ to_mix += AD
+ for(var/datum/disease/virus/advance/AD in mix2)
+ to_mix += AD
+
+ var/datum/disease/virus/advance/AD = Advance_Mix(to_mix)
+ var/list/preserve = list()
+
+ if(istype(AD))
+ preserve += AD
+
+ for(var/datum/disease/D in data["diseases"] + mix_data["diseases"])
+ if(!istype(D, /datum/disease/virus/advance))
+ preserve += D.Copy()
+ data["diseases"] = preserve
+
+ return
+
/datum/reagent/proc/on_update(atom/A)
return
diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm
index a0a2d0450dd..9f104dbc241 100644
--- a/code/modules/reagents/chemistry/reagents/medicine.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine.dm
@@ -118,6 +118,7 @@
Org.rejuvenate()
/datum/reagent/medicine/cryoxadone
+ data = list("diseases" = null)
name = "Cryoxadone"
id = "cryoxadone"
description = "A plasma mixture with almost magical healing powers. Its main limitation is that the targets body temperature must be under 265K for it to metabolise correctly."
@@ -141,6 +142,9 @@
head.disfigured = FALSE
return ..() | update_flags
+/datum/reagent/medicine/cryoxadone/on_merge(list/mix_data)
+ merge_diseases_data(mix_data)
+
/datum/reagent/medicine/rezadone
name = "Rezadone"
id = "rezadone"
diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm
index 7a95340c09e..1329cdd3dca 100644
--- a/code/modules/reagents/chemistry/reagents/toxins.dm
+++ b/code/modules/reagents/chemistry/reagents/toxins.dm
@@ -94,6 +94,7 @@
return ..()
/datum/reagent/slimejelly
+ data = list("diseases" = null)
name = "Slime Jelly"
id = "slimejelly"
description = "A gooey semi-liquid produced from one of the deadliest lifeforms in existence. SO REAL."
@@ -112,9 +113,9 @@
return ..() | update_flags
/datum/reagent/slimejelly/on_merge(list/mix_data)
- if(data && mix_data)
- if(mix_data["colour"])
- color = mix_data["colour"]
+ merge_diseases_data(mix_data)
+ if(data && mix_data && mix_data["colour"])
+ color = mix_data["colour"]
/datum/reagent/slimejelly/reaction_turf(turf/T, volume, color)
if(volume >= 3 && !isspaceturf(T) && !locate(/obj/effect/decal/cleanable/blood/slime) in T)
diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm
index 84b1bd05779..1b6e9a91087 100644
--- a/code/modules/reagents/chemistry/reagents/water.dm
+++ b/code/modules/reagents/chemistry/reagents/water.dm
@@ -5,7 +5,11 @@
//
*/
-
+GLOBAL_LIST_INIT(diseases_carrier_reagents, list(
+ "blood",
+ "slimejelly",
+ "cryoxadone",
+ ))
/datum/reagent/water
name = "Water"
@@ -90,7 +94,7 @@
M.clean_blood()
/datum/reagent/blood
- data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"blood_species"=null,"blood_colour"="#A10808","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null, "dna" = null)
+ data = list("donor"=null,"diseases"=null,"blood_DNA"=null,"blood_type"=null,"blood_species"=null,"blood_colour"="#A10808","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null, "dna" = null)
name = "Blood"
id = "blood"
reagent_state = LIQUID
@@ -103,9 +107,8 @@
taste_mult = 1.3
/datum/reagent/blood/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
- if(data && data["viruses"])
- for(var/thing in data["viruses"])
- var/datum/disease/virus/V = thing
+ if(data && data["diseases"])
+ for(var/datum/disease/virus/V in data["diseases"])
if(V.spread_flags < BLOOD)
continue
@@ -128,32 +131,9 @@
SetViruses(src, data)
/datum/reagent/blood/on_merge(list/mix_data)
+ merge_diseases_data(mix_data)
if(data && mix_data)
data["cloneable"] = 0 //On mix, consider the genetic sampling unviable for pod cloning, or else we won't know who's even getting cloned, etc
- if(data["viruses"] || mix_data["viruses"])
-
- var/list/mix1 = data["viruses"]
- var/list/mix2 = mix_data["viruses"]
-
- // Stop issues with the list changing during mixing.
- var/list/to_mix = list()
-
- for(var/datum/disease/virus/advance/AD in mix1)
- to_mix += AD
- for(var/datum/disease/virus/advance/AD in mix2)
- to_mix += AD
-
- var/datum/disease/virus/advance/AD = Advance_Mix(to_mix)
- var/list/preserve = list()
-
- if(istype(AD))
- preserve += AD
-
- for(var/datum/disease/D in data["viruses"] + mix_data["viruses"])
- if(!istype(D, /datum/disease/virus/advance))
- preserve += D.Copy()
- data["viruses"] = preserve
-
if(mix_data["blood_color"])
color = mix_data["blood_color"]
return 1
@@ -184,9 +164,8 @@
id = "sblood"
/datum/reagent/blood/synthetic/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
- if(data && data["viruses"])
- for(var/thing in data["viruses"])
- var/datum/disease/virus/V = thing
+ if(data && data["diseases"])
+ for(var/datum/disease/virus/V in data["diseases"])
if(V.spread_flags < BLOOD)
continue
@@ -199,7 +178,7 @@
/datum/reagent/blood/synthetic/vox
name = "Synthetic Blood"
id = "sbloodvox"
- data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"blood_species"=null,"blood_colour"="#6093dc","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null, "dna" = null)
+ data = list("donor"=null,"diseases"=null,"blood_DNA"=null,"blood_type"=null,"blood_species"=null,"blood_colour"="#6093dc","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null, "dna" = null)
color = "#6093dc"
/datum/reagent/blood/synthetic/vox/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
@@ -218,7 +197,7 @@
/datum/reagent/blood/synthetic/oxy
name = "Synthetic Blood"
id = "sbloodoxy"
- data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"blood_species"=null,"blood_colour"="#e8479d","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null, "dna" = null)
+ data = list("donor"=null,"diseases"=null,"blood_DNA"=null,"blood_type"=null,"blood_species"=null,"blood_colour"="#e8479d","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null, "dna" = null)
color = "#e8479d"
/datum/reagent/blood/synthetic/oxy/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm
index 21abb0a8b80..c5d7ba10773 100644
--- a/code/modules/reagents/chemistry/recipes.dm
+++ b/code/modules/reagents/chemistry/recipes.dm
@@ -5,6 +5,8 @@
var/result = null
var/list/required_reagents = list()
var/list/required_catalysts = list()
+ /// Count of required catalysts. -1 if required all catalysts
+ var/count_of_catalysts = -1
var/list/required_blood_group = null //requested blood groups, for example, "A+"
var/list/required_blood_species = null //requested blood's species name, for example, "Vox"
diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm
index ef5fe406b31..bc89ed37e49 100644
--- a/code/modules/reagents/chemistry/recipes/others.dm
+++ b/code/modules/reagents/chemistry/recipes/others.dm
@@ -673,16 +673,18 @@
name = "Mix Virus"
id = "mixvirus"
required_reagents = list("virusfood" = 1)
- required_catalysts = list("blood" = 1)
+ required_catalysts = list("blood" = 1, "slimejelly" = 1, "cryoxadone" = 1)
+ count_of_catalysts = 1
var/level_min = 0
var/level_max = 2
/datum/chemical_reaction/mix_virus/on_reaction(datum/reagents/holder, created_volume)
- var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list
- if(B && B.data)
- var/datum/disease/virus/advance/D = locate(/datum/disease/virus/advance) in B.data["viruses"]
- if(D)
- D.Evolve(level_min, level_max)
+ for(var/datum/reagent/R in holder.reagent_list)
+ if(R.data && R.data["diseases"])
+ var/datum/disease/virus/advance/D = locate(/datum/disease/virus/advance) in R.data["diseases"]
+ if(D)
+ D.Evolve(level_min, level_max)
+ return
/datum/chemical_reaction/mix_virus/mix_virus_2
@@ -745,11 +747,13 @@
name = "Devolve Virus"
id = "remvirus"
required_reagents = list("diphenhydramine" = 1)
- required_catalysts = list("blood" = 1)
+ required_catalysts = list("blood" = 1, "slimejelly" = 1, "cryoxadone" = 1)
+ count_of_catalysts = 1
/datum/chemical_reaction/mix_virus/rem_virus/on_reaction(datum/reagents/holder, created_volume)
- var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list
- if(B && B.data)
- var/datum/disease/virus/advance/D = locate(/datum/disease/virus/advance) in B.data["viruses"]
- if(D)
- D.Devolve()
+ for(var/datum/reagent/R in holder.reagent_list)
+ if(R.data && R.data["diseases"])
+ var/datum/disease/virus/advance/D = locate(/datum/disease/virus/advance) in R.data["diseases"]
+ if(D)
+ D.Devolve()
+ return
diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm
index a7c700da0ad..d00a4e0c6a4 100644
--- a/code/modules/reagents/reagent_containers.dm
+++ b/code/modules/reagents/reagent_containers.dm
@@ -77,7 +77,7 @@
. = ..()
if(spawned_disease)
var/datum/disease/F = new spawned_disease
- var/list/data = list("viruses" = list(F), "blood_color" = "#A10808")
+ var/list/data = list("diseases" = list(F), "blood_color" = "#A10808")
reagents.add_reagent("blood", disease_amount, data)
add_initial_reagents()
update_icon()
diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm
index 85e9dc7eaa1..1c9162c7280 100644
--- a/code/modules/reagents/reagent_containers/dropper.dm
+++ b/code/modules/reagents/reagent_containers/dropper.dm
@@ -123,9 +123,9 @@
for(var/datum/reagent/R in reagents.reagent_list)
injected += R.name
var/datum/reagent/blood/B = R
- if(istype(B) && B.data["viruses"])
+ if(istype(B) && B.data["diseases"])
var/virList = list()
- for(var/dis in B.data["viruses"])
+ for(var/dis in B.data["diseases"])
var/datum/disease/D = dis
var/virusData = D.name
var/english_symptoms = list()
diff --git a/code/modules/reagents/reagent_containers/iv_bag.dm b/code/modules/reagents/reagent_containers/iv_bag.dm
index 4dbcc889dd3..cb0f9e3f291 100644
--- a/code/modules/reagents/reagent_containers/iv_bag.dm
+++ b/code/modules/reagents/reagent_containers/iv_bag.dm
@@ -176,7 +176,7 @@
/obj/item/reagent_containers/iv_bag/blood/Initialize(mapload)
if(blood_type != null && blood_species != null)
name = "[initial(name)] - [blood_type] - [blood_species]"
- reagents.add_reagent("blood", 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=blood_type,"blood_species"=blood_species,"resistances"=null,"trace_chem"=null))
+ reagents.add_reagent("blood", 200, list("donor"=null,"diseases"=null,"blood_DNA"=null,"blood_type"=blood_type,"blood_species"=blood_species,"resistances"=null,"trace_chem"=null))
. = ..()
@@ -249,7 +249,7 @@
/obj/item/reagent_containers/iv_bag/bloodsynthetic/oxygenis/Initialize(mapload)
if(blood_type != null && blood_species != null)
- reagents.add_reagent("sbloodoxy", 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=blood_type,"blood_species"=blood_species,"resistances"=null,"trace_chem"=null))
+ reagents.add_reagent("sbloodoxy", 200, list("donor"=null,"diseases"=null,"blood_DNA"=null,"blood_type"=blood_type,"blood_species"=blood_species,"resistances"=null,"trace_chem"=null))
. = ..()
/obj/item/reagent_containers/iv_bag/bloodsynthetic/nitrogenis
@@ -258,7 +258,7 @@
/obj/item/reagent_containers/iv_bag/bloodsynthetic/nitrogenis/Initialize(mapload)
if(blood_type != null && blood_species != null)
- reagents.add_reagent("sbloodvox", 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=blood_type,"blood_species"=blood_species,"resistances"=null,"trace_chem"=null))
+ reagents.add_reagent("sbloodvox", 200, list("donor"=null,"diseases"=null,"blood_DNA"=null,"blood_type"=blood_type,"blood_species"=blood_species,"resistances"=null,"trace_chem"=null))
. = ..()
/obj/item/reagent_containers/iv_bag/slime
diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm
index 4df543e1d13..eb9b22df797 100644
--- a/code/modules/surgery/organs/blood.dm
+++ b/code/modules/surgery/organs/blood.dm
@@ -167,14 +167,13 @@
if(iscarbon(AM))
var/mob/living/carbon/C = AM
+ if(blood_data["diseases"])
+ for(var/datum/disease/virus/V in blood_data["diseases"])
+ if(V.spread_flags < BLOOD)
+ continue
+ V.Contract(C)
if(blood_id == C.get_blood_id())//both mobs have the same blood substance
if(blood_id == "blood") //normal blood
- if(blood_data["viruses"])
- for(var/thing in blood_data["viruses"])
- var/datum/disease/virus/V = thing
- if(V.spread_flags < BLOOD)
- continue
- V.Contract(C)
if(!(blood_data["blood_type"] in get_safe_blood(C.dna.blood_type)) || !(blood_data["blood_species"] == C.dna.species.blood_species))
C.reagents.add_reagent("toxin", amount * 0.5)
return 1
@@ -190,41 +189,40 @@
return
/mob/living/carbon/human/get_blood_data(blood_id)
- if(blood_id == "blood") //actual blood reagent
- var/blood_data = list()
- //set the blood data
- blood_data["donor"] = src
- blood_data["viruses"] = list()
-
- for(var/thing in diseases)
- var/datum/disease/D = thing
- blood_data["viruses"] += D.Copy()
-
- blood_data["blood_DNA"] = copytext(dna.unique_enzymes,1,0)
- if(resistances && resistances.len)
+ var/blood_data = list()
+ if(blood_id in GLOB.diseases_carrier_reagents)
+ blood_data["diseases"] = list()
+ for(var/datum/disease/D in diseases)
+ blood_data["diseases"] += D.Copy()
+ if(resistances?.len)
blood_data["resistances"] = resistances.Copy()
- var/list/temp_chem = list()
- for(var/datum/reagent/R in reagents.reagent_list)
- temp_chem[R.id] = R.volume
- blood_data["trace_chem"] = list2params(temp_chem)
- if(mind)
- blood_data["mind"] = mind
- if(ckey)
- blood_data["ckey"] = ckey
- if(!suiciding)
- blood_data["cloneable"] = 1
- blood_data["blood_type"] = copytext(src.dna.blood_type, 1, 0)
- blood_data["blood_species"] = dna.species.blood_species
- blood_data["gender"] = gender
- blood_data["real_name"] = real_name
- blood_data["blood_color"] = dna.species.blood_color
- blood_data["factions"] = faction
- blood_data["dna"] = dna.Clone()
- return blood_data
- if(blood_id == "slimejelly")
- var/blood_data = list()
- blood_data["colour"] = dna.species.blood_color
- return blood_data
+
+ switch(blood_id)
+ if("blood")
+ blood_data["donor"] = src
+ blood_data["blood_DNA"] = copytext(dna.unique_enzymes,1,0)
+ var/list/temp_chem = list()
+ for(var/datum/reagent/R in reagents.reagent_list)
+ temp_chem[R.id] = R.volume
+ blood_data["trace_chem"] = list2params(temp_chem)
+ if(mind)
+ blood_data["mind"] = mind
+ if(ckey)
+ blood_data["ckey"] = ckey
+ if(!suiciding)
+ blood_data["cloneable"] = 1
+ blood_data["blood_type"] = copytext(src.dna.blood_type, 1, 0)
+ blood_data["blood_species"] = dna.species.blood_species
+ blood_data["gender"] = gender
+ blood_data["real_name"] = real_name
+ blood_data["blood_color"] = dna.species.blood_color
+ blood_data["factions"] = faction
+ blood_data["dna"] = dna.Clone()
+
+ if("slimejelly")
+ blood_data["colour"] = dna.species.blood_color
+
+ return blood_data
//get the id of the substance this mob use as blood.
/mob/proc/get_blood_id()