Okay, this is a pretty big revision!

Viruses:
     The virus system was COMPLETELY reworked.

     Good news, Virologists! This means people can now be infected by multiple viruses at once. Some of the virus-spreading protocols were tweaked to support this change, and as a result, they are now considerably more infectious. I also changed some background reagent variables to better support DNA, blood type, and virus combination.


Turrets:
     Fixed some lingering bugs that would bog down the global event processor.


Changelings:
     People turned into "husks" after being drained of their DNA by changelings can no longer be cloned.


Miscellaneous:
     I tweaked a LOT of mob code. This shouldn't have any noticeable impact on anything, but was required in order support the virus overhaul.



git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1753 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
vageyenaman@gmail.com
2011-07-02 04:00:25 +00:00
parent dfc0156af7
commit eee36e4f7e
43 changed files with 432 additions and 234 deletions

View File

@@ -274,6 +274,13 @@ datum
R.volume += amount R.volume += amount
update_total() update_total()
my_atom.on_reagent_change() my_atom.on_reagent_change()
// mix dem viruses
if(R.data["viruses"] || data["viruses"])
var/list/this = R.data["viruses"]
var/list/that = data["viruses"]
this += that // combine the two
return 0 return 0
for(var/A in typesof(/datum/reagent) - /datum/reagent) for(var/A in typesof(/datum/reagent) - /datum/reagent)

View File

@@ -349,7 +349,7 @@
B.icon_state = "bottle3" B.icon_state = "bottle3"
var/type = text2path(href_list["create_virus_culture"])//the path is received as string - converting var/type = text2path(href_list["create_virus_culture"])//the path is received as string - converting
var/datum/disease/D = new type var/datum/disease/D = new type
var/list/data = list("virus"=D) var/list/data = list("viruses"=list(D))
var/name = sanitize(input(usr,"Name:","Name the culture",D.name)) var/name = sanitize(input(usr,"Name:","Name the culture",D.name))
if(!name || name == " ") name = D.name if(!name || name == " ") name = D.name
B.name = "[name] culture bottle" B.name = "[name] culture bottle"
@@ -416,11 +416,17 @@
dat += "<h3>Blood sample data:</h3>" dat += "<h3>Blood sample data:</h3>"
dat += "<b>Blood DNA:</b> [(Blood.data["blood_DNA"]||"none")]<BR>" dat += "<b>Blood DNA:</b> [(Blood.data["blood_DNA"]||"none")]<BR>"
dat += "<b>Blood Type:</b> [(Blood.data["blood_type"]||"none")]<BR>" dat += "<b>Blood Type:</b> [(Blood.data["blood_type"]||"none")]<BR>"
var/datum/disease/D = Blood.data["virus"]
dat += "<b>Agent of disease:</b> [D?"[D.agent] - <A href='?src=\ref[src];create_virus_culture=[D.type]'>Create virus culture bottle</A>":"none"]<BR>"
if(D) if(Blood.data["viruses"])
dat += "<b>Common name:</b> [(D.name||"none")]<BR>" var/list/vir = Blood.data["viruses"]
dat += "<b>Possible cure:</b> [(D.cure||"none")]<BR>" if(vir.len)
for(var/datum/disease/D in Blood.data["viruses"])
dat += "<b>Disease Agent:</b> [D?"[D.agent] - <A href='?src=\ref[src];create_virus_culture=[D.type]'>Create virus culture bottle</A>":"none"]<BR>"
dat += "<b>Common name:</b> [(D.name||"none")]<BR>"
dat += "<b>Possible cure:</b> [(D.cure||"none")]<BR><BR>"
dat += "<b>Contains antibodies to:</b> " dat += "<b>Contains antibodies to:</b> "
if(Blood.data["resistances"]) if(Blood.data["resistances"])
var/list/res = Blood.data["resistances"] var/list/res = Blood.data["resistances"]

View File

@@ -15,6 +15,7 @@ datum
var/data = null var/data = null
var/volume = 0 var/volume = 0
var/nutriment_factor = 0 var/nutriment_factor = 0
//var/list/viruses = list()
proc proc
reaction_mob(var/mob/M, var/method=TOUCH, var/volume) //By default we have a chance to transfer some reaction_mob(var/mob/M, var/method=TOUCH, var/volume) //By default we have a chance to transfer some
@@ -68,15 +69,22 @@ datum
blood blood
data = new/list("donor"=null,"virus"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null) data = new/list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null)
name = "Blood" name = "Blood"
id = "blood" id = "blood"
reagent_state = LIQUID reagent_state = LIQUID
reaction_mob(var/mob/M, var/method=TOUCH, var/volume) reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(M.virus) return //to prevent the healing of some serious shit with common cold injection.
var/datum/reagent/blood/self = src var/datum/reagent/blood/self = src
src = null src = null
for(var/datum/disease/D in self.data["viruses"])
var/datum/disease/virus = new D.type
if(method == TOUCH)
M.contract_disease(virus)
else //injected
M.contract_disease(virus, 1, 0)
/*
if(self.data["virus"]) if(self.data["virus"])
var/datum/disease/V = self.data["virus"] var/datum/disease/V = self.data["virus"]
if(M.resistances.Find(V.type)) return if(M.resistances.Find(V.type)) return
@@ -85,52 +93,67 @@ datum
else //injected else //injected
M.contract_disease(V, 1, 0) M.contract_disease(V, 1, 0)
return return
*/
reaction_turf(var/turf/simulated/T, var/volume)//splash the blood all over the place reaction_turf(var/turf/simulated/T, var/volume)//splash the blood all over the place
if(!istype(T)) return if(!istype(T)) return
var/datum/reagent/blood/self = src var/datum/reagent/blood/self = src
src = null src = null
var/datum/disease/D = self.data["virus"] //var/datum/disease/D = self.data["virus"]
if(!self.data["donor"] || istype(self.data["donor"], /mob/living/carbon/human)) if(!self.data["donor"] || istype(self.data["donor"], /mob/living/carbon/human))
var/obj/decal/cleanable/blood/blood_prop = locate() in T //find some blood here var/obj/decal/cleanable/blood/blood_prop = locate() in T //find some blood here
if(!blood_prop) //first blood! if(!blood_prop) //first blood!
blood_prop = new(T) blood_prop = new(T)
blood_prop.blood_DNA = self.data["blood_DNA"] blood_prop.blood_DNA = self.data["blood_DNA"]
blood_prop.blood_type = self.data["blood_type"] blood_prop.blood_type = self.data["blood_type"]
if(D && !blood_prop.virus) //TODO: multiple viruses
blood_prop.virus = new D.type for(var/datum/disease/D in self.data["viruses"])
blood_prop.virus.holder = blood_prop var/datum/disease/newVirus = new D.type
blood_prop.viruses += newVirus
newVirus.holder = blood_prop
// this makes it almost impossible for airborne diseases to spread
// THIS SHIT HAS TO GO, SORRY!
/*
if(T.density==0) if(T.density==0)
blood_prop.virus.spread_type = CONTACT_FEET newVirus.spread_type = CONTACT_FEET
else else
blood_prop.virus.spread_type = CONTACT_HANDS newVirus.spread_type = CONTACT_HANDS
*/
else if(istype(self.data["donor"], /mob/living/carbon/monkey)) else if(istype(self.data["donor"], /mob/living/carbon/monkey))
var/obj/decal/cleanable/blood/blood_prop = locate() in T var/obj/decal/cleanable/blood/blood_prop = locate() in T
if(!blood_prop) if(!blood_prop)
blood_prop = new(T) blood_prop = new(T)
blood_prop.blood_DNA = self.data["blood_DNA"] blood_prop.blood_DNA = self.data["blood_DNA"]
if(D && !blood_prop.virus) for(var/datum/disease/D in self.data["viruses"])
blood_prop.virus = new D.type var/datum/disease/newVirus = new D.type
blood_prop.virus.holder = blood_prop blood_prop.viruses += newVirus
newVirus.holder = blood_prop
/*
if(T.density==0) if(T.density==0)
blood_prop.virus.spread_type = CONTACT_FEET newVirus.spread_type = CONTACT_FEET
else else
blood_prop.virus.spread_type = CONTACT_HANDS newVirus.spread_type = CONTACT_HANDS
*/
else if(istype(self.data["donor"], /mob/living/carbon/alien)) else if(istype(self.data["donor"], /mob/living/carbon/alien))
var/obj/decal/cleanable/xenoblood/blood_prop = locate() in T var/obj/decal/cleanable/xenoblood/blood_prop = locate() in T
if(!blood_prop) if(!blood_prop)
blood_prop = new(T) blood_prop = new(T)
blood_prop.blood_DNA = self.data["blood_DNA"] blood_prop.blood_DNA = self.data["blood_DNA"]
if(D && !blood_prop.virus) for(var/datum/disease/D in self.data["viruses"])
blood_prop.virus = new D.type var/datum/disease/newVirus = new D.type
blood_prop.virus.holder = blood_prop blood_prop.viruses += newVirus
newVirus.holder = blood_prop
/*
if(T.density==0) if(T.density==0)
blood_prop.virus.spread_type = CONTACT_FEET newVirus.spread_type = CONTACT_FEET
else else
blood_prop.virus.spread_type = CONTACT_HANDS newVirus.spread_type = CONTACT_HANDS
*/
return return
/* Must check the transfering of reagents and their data first. They all can point to one disease datum. /* Must check the transfering of reagents and their data first. They all can point to one disease datum.
@@ -151,10 +174,11 @@ datum
var/datum/reagent/vaccine/self = src var/datum/reagent/vaccine/self = src
src = null src = null
if(self.data&&method == INGEST) if(self.data&&method == INGEST)
if(M.virus && M.virus.type == self.data) for(var/datum/disease/D in M.viruses)
M.virus.cure() if(M.virus && D.type == self.data["viruses"])
else if(!(self.data in M.resistances)) D.cure()
M.resistances += self.data
M.resistances += self.data
return return
@@ -997,10 +1021,11 @@ datum
M:confused = 0 M:confused = 0
M:sleeping = 0 M:sleeping = 0
M:jitteriness = 0 M:jitteriness = 0
M.virus.spread = "Remissive" for(var/datum/disease/D in M.viruses)
M.virus.stage-- D.spread = "Remissive"
if(M.virus.stage < 1) D.stage--
M.virus.cure() if(D.stage < 1)
D.cure()
..() ..()
return return
@@ -1532,8 +1557,10 @@ datum
M:heal_organ_damage(1,1) M:heal_organ_damage(1,1)
..() ..()
return return
..() ..()
dry_ramen dry_ramen
name = "Dry Ramen" name = "Dry Ramen"
id = "dry_ramen" id = "dry_ramen"
@@ -1775,6 +1802,7 @@ datum
if(data >= 40 && prob(33)) if(data >= 40 && prob(33))
if (!M:confused) M:confused = 1 if (!M:confused) M:confused = 1
M:confused += 2 M:confused += 2
..() ..()
return return
@@ -1960,6 +1988,9 @@ datum
reagent_state = LIQUID reagent_state = LIQUID
on_mob_life(var/mob/living/M as mob) on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
if(M:oxyloss && prob(20)) M:oxyloss--
if(M:bruteloss && prob(20)) M:heal_organ_damage(1,0)
if(M:fireloss && prob(20)) M:heal_organ_damage(0,1)
if(M:toxloss && prob(20)) M:toxloss-- if(M:toxloss && prob(20)) M:toxloss--
M:nutrition++ M:nutrition++
..() ..()
@@ -2027,6 +2058,12 @@ datum
..() ..()
return return
cream
name = "Cream"
id = "cream"
description = "The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh?"
reagent_state = LIQUID
hooch hooch
name = "Hooch" name = "Hooch"
id = "hooch" id = "hooch"

View File

@@ -783,8 +783,20 @@
B.volume = amount B.volume = amount
//set reagent data //set reagent data
B.data["donor"] = T B.data["donor"] = T
/*
if(T.virus && T.virus.spread_type != SPECIAL) if(T.virus && T.virus.spread_type != SPECIAL)
B.data["virus"] = new T.virus.type(0) B.data["virus"] = new T.virus.type(0)
*/
for(var/datum/disease/D in T.viruses)
if(!B.data["viruses"])
B.data["viruses"] = list()
B.data["virus"] += new D.type
B.data["blood_DNA"] = copytext(T.dna.unique_enzymes,1,0) B.data["blood_DNA"] = copytext(T.dna.unique_enzymes,1,0)
if(T.resistances&&T.resistances.len) if(T.resistances&&T.resistances.len)
B.data["resistances"] = T.resistances.Copy() B.data["resistances"] = T.resistances.Copy()
@@ -1611,7 +1623,7 @@
New() New()
..() ..()
var/datum/disease/F = new /datum/disease/flu(0) var/datum/disease/F = new /datum/disease/flu(0)
var/list/data = list("virus"= F) var/list/data = list("viruses"= list(F))
reagents.add_reagent("blood", 20, data) reagents.add_reagent("blood", 20, data)
/obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat /obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat
@@ -1622,7 +1634,7 @@
New() New()
..() ..()
var/datum/disease/F = new /datum/disease/pierrot_throat(0) var/datum/disease/F = new /datum/disease/pierrot_throat(0)
var/list/data = list("virus"= F) var/list/data = list("viruses"= list(F))
reagents.add_reagent("blood", 20, data) reagents.add_reagent("blood", 20, data)
/obj/item/weapon/reagent_containers/glass/bottle/cold /obj/item/weapon/reagent_containers/glass/bottle/cold
@@ -1633,7 +1645,7 @@
New() New()
..() ..()
var/datum/disease/F = new /datum/disease/cold(0) var/datum/disease/F = new /datum/disease/cold(0)
var/list/data = list("virus"= F) var/list/data = list("viruses"= list(F))
reagents.add_reagent("blood", 20, data) reagents.add_reagent("blood", 20, data)
/* /*
@@ -1660,7 +1672,7 @@
New() New()
..() ..()
var/datum/disease/F = new /datum/disease/fake_gbs(0) var/datum/disease/F = new /datum/disease/fake_gbs(0)
var/list/data = list("virus"= F) var/list/data = list("viruses"= list(F))
reagents.add_reagent("blood", 20, data) reagents.add_reagent("blood", 20, data)
/* /*
/obj/item/weapon/reagent_containers/glass/bottle/rhumba_beat /obj/item/weapon/reagent_containers/glass/bottle/rhumba_beat
@@ -1687,7 +1699,7 @@
New() New()
..() ..()
var/datum/disease/F = new /datum/disease/brainrot(0) var/datum/disease/F = new /datum/disease/brainrot(0)
var/list/data = list("virus"= F) var/list/data = list("viruses"= list(F))
reagents.add_reagent("blood", 20, data) reagents.add_reagent("blood", 20, data)
/obj/item/weapon/reagent_containers/glass/bottle/magnitis /obj/item/weapon/reagent_containers/glass/bottle/magnitis
@@ -1698,7 +1710,7 @@
New() New()
..() ..()
var/datum/disease/F = new /datum/disease/magnitis(0) var/datum/disease/F = new /datum/disease/magnitis(0)
var/list/data = list("virus"= F) var/list/data = list("viruses"= list(F))
reagents.add_reagent("blood", 20, data) reagents.add_reagent("blood", 20, data)
@@ -1710,7 +1722,7 @@
New() New()
..() ..()
var/datum/disease/F = new /datum/disease/wizarditis(0) var/datum/disease/F = new /datum/disease/wizarditis(0)
var/list/data = list("virus"= F) var/list/data = list("viruses"= list(F))
reagents.add_reagent("blood", 20, data) reagents.add_reagent("blood", 20, data)

View File

@@ -154,7 +154,7 @@
else if (dd_hasprefix(objholder, "/mob") && !(usr.client.holder.rank in list("Game Master", "Game Admin", "Badmin"))) else if (dd_hasprefix(objholder, "/mob") && !(usr.client.holder.rank in list("Game Master", "Game Admin", "Badmin")))
objholder = "/obj/closet" objholder = "/obj/closet"
if(3) if(3)
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "urine") var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name") master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name")
if(master.buildmode.varholder in locked && !(usr.client.holder.rank in list("Game Master", "Game Admin"))) if(master.buildmode.varholder in locked && !(usr.client.holder.rank in list("Game Master", "Game Admin")))

View File

@@ -318,6 +318,9 @@
if ((!subject.ckey) || (!subject.client)) if ((!subject.ckey) || (!subject.client))
src.temp = "Error: Mental interface failure." src.temp = "Error: Mental interface failure."
return return
if (subject.mutations & HUSK)
src.temp = "Error: Mental interface failure."
return
if (!isnull(find_record(subject.ckey))) if (!isnull(find_record(subject.ckey)))
src.temp = "Subject already in database." src.temp = "Subject already in database."
return return

View File

@@ -84,6 +84,13 @@ to null does not delete the object itself. Thank you.
/mob/proc/contract_disease(var/datum/disease/virus, var/skip_this = 0, var/force_species_check=1) /mob/proc/contract_disease(var/datum/disease/virus, var/skip_this = 0, var/force_species_check=1)
// world << "Contract_disease called by [src] with virus [virus]" // world << "Contract_disease called by [src] with virus [virus]"
if(stat >=2) return if(stat >=2) return
if(virus.type in resistances)
if(prob(99.9)) return
resistances.Remove(virus.type)//the resistance is futile
for(var/datum/disease/D in viruses)
if(istype(D, virus.type))
return // two viruses of the same kind can't infect a body at once!!
if(force_species_check) if(force_species_check)
@@ -95,23 +102,21 @@ to null does not delete the object itself. Thank you.
break break
if(fail) return if(fail) return
if(skip_this == 1)//be wary, it replaces the current disease... if(skip_this == 1)
if(src.virus) //if(src.virus) < -- this used to replace the current disease. Not anymore!
src.virus.cure(0) //src.virus.cure(0)
src.virus = new virus.type
src.virus.affected_mob = src var/datum/disease/v = new virus.type
src.virus.strain_data = virus.strain_data.Copy() src.viruses += v
src.virus.holder = src v.affected_mob = src
v.strain_data = v.strain_data.Copy()
v.holder = src
if(prob(5)) if(prob(5))
src.virus.carrier = 1 v.carrier = 1
return return
if(src.virus) //if(src.virus) //
return //return //
if(virus.type in resistances)
if(prob(99.9)) return
resistances.Remove(virus.type)//the resistance is futile
/* /*
@@ -223,7 +228,7 @@ to null does not delete the object itself. Thank you.
passed = (prob(50*virus.permeability_mod)) passed = (prob(50*virus.permeability_mod))
if(passed) if(passed)
// world << "Infection in the mob [src]. YAY" //world << "Infection in the mob [src]. YAY"
/* /*
@@ -253,18 +258,20 @@ to null does not delete the object itself. Thank you.
else if(prob(15)) else if(prob(15))
return return
else*/ else*/
src.virus = new virus.type var/datum/disease/v = new virus.type
src.virus.strain_data = virus.strain_data.Copy() src.viruses += v
src.virus.affected_mob = src v.affected_mob = src
src.virus.holder = src v.strain_data = v.strain_data.Copy()
v.holder = src
if(prob(5)) if(prob(5))
src.virus.carrier = 1 v.carrier = 1
return return
return return
/datum/disease/proc/spread(var/source=null) /datum/disease/proc/spread(var/atom/source=null)
//world << "Disease [src] proc spread was called from holder [source]" //world << "Disease [src] proc spread was called from holder [source]"
if(spread_type == SPECIAL)//does not spread if(spread_type == SPECIAL)//does not spread
return return
@@ -279,8 +286,9 @@ to null does not delete the object itself. Thank you.
var/check_range = AIRBORNE//defaults to airborne - range 4 var/check_range = AIRBORNE//defaults to airborne - range 4
if(spread_type != AIRBORNE) if(spread_type != AIRBORNE)
check_range = 0 check_range = 0 // everything else, like infect-on-contact things, only infect things on top of it
for(var/mob/living/carbon/M in oviewers(check_range, source)) for(var/mob/living/carbon/M in oviewers(check_range, source))
M.contract_disease(src) M.contract_disease(src)
@@ -290,8 +298,15 @@ to null does not delete the object itself. Thank you.
/datum/disease/proc/process() /datum/disease/proc/process()
if(!holder) return if(!holder) return
if(prob(40)) if(prob(65))
spread(holder) spread(holder)
if(affected_mob)
for(var/datum/disease/D in affected_mob.viruses)
if(D != src)
if(istype(src, D.type))
del(D) // if there are somehow two viruses of the same kind in the system, delete the other one
if(holder == affected_mob) if(holder == affected_mob)
if(affected_mob.stat < 2) //he's alive if(affected_mob.stat < 2) //he's alive
stage_act() stage_act()
@@ -301,8 +316,19 @@ to null does not delete the object itself. Thank you.
affected_mob = null affected_mob = null
if(!affected_mob) //the virus is in inanimate obj if(!affected_mob) //the virus is in inanimate obj
// world << "[src] longevity = [longevity]" // world << "[src] longevity = [longevity]"
if(--longevity<=0) /*
cure(0) if(holder)
// spreads the love. Why hasn't anyone coded this in yet?!?!?!?
for(var/mob/living/M in view(1, holder))
if(M.stat != 2)
if(prob(90))
M.contract_disease(src)
*/
if(prob(70))
if(--longevity<=0)
cure(0)
return return
/datum/disease/proc/cure(var/resistance=1)//if resistance = 0, the mob won't develop resistance to disease /datum/disease/proc/cure(var/resistance=1)//if resistance = 0, the mob won't develop resistance to disease

View File

@@ -181,10 +181,15 @@ datum/mind
if (istype(current, /mob/living/carbon/human)) if (istype(current, /mob/living/carbon/human))
text += "<a href='?src=\ref[src];monkey=healthy'>healthy</a>|<a href='?src=\ref[src];monkey=infected'>infected</a>|<b>HUMAN</b>|other" text += "<a href='?src=\ref[src];monkey=healthy'>healthy</a>|<a href='?src=\ref[src];monkey=infected'>infected</a>|<b>HUMAN</b>|other"
else if (istype(current, /mob/living/carbon/monkey)) else if (istype(current, /mob/living/carbon/monkey))
if(istype(current.virus, /datum/disease/jungle_fever)) var/found = 0
for(var/datum/disease/D in current.viruses)
if(istype(D, /datum/disease/jungle_fever)) found = 1
if(found)
text += "<a href='?src=\ref[src];monkey=healthy'>healthy</a>|<b>INFECTED</b>|<a href='?src=\ref[src];monkey=human'>human</a>|other" text += "<a href='?src=\ref[src];monkey=healthy'>healthy</a>|<b>INFECTED</b>|<a href='?src=\ref[src];monkey=human'>human</a>|other"
else else
text += "<b>HEALTHY</b>|<a href='?src=\ref[src];monkey=infected'>infected</a>|<a href='?src=\ref[src];monkey=human'>human</a>|other" text += "<b>HEALTHY</b>|<a href='?src=\ref[src];monkey=infected'>infected</a>|<a href='?src=\ref[src];monkey=human'>human</a>|other"
else else
text += "healthy|infected|human|<b>OTHER</b>" text += "healthy|infected|human|<b>OTHER</b>"
sections["monkey"] = text sections["monkey"] = text
@@ -675,9 +680,10 @@ datum/mind
M = H.monkeyize() M = H.monkeyize()
src = M.mind src = M.mind
//world << "DEBUG: \"healthy\": M=[M], M.mind=[M.mind], src=[src]!" //world << "DEBUG: \"healthy\": M=[M], M.mind=[M.mind], src=[src]!"
else if (istype(M) && M.virus) else if (istype(M) && length(M.viruses))
M.virus.cure(0) for(var/datum/disease/D in M.viruses)
sleep(0) //because deleting of virus is doing throught spawn(0) D.cure(0)
sleep(0) //because deleting of virus is done through spawn(0)
if("infected") if("infected")
if (usr.client.holder.level >= 3) if (usr.client.holder.level >= 3)
var/mob/living/carbon/human/H = current var/mob/living/carbon/human/H = current
@@ -694,9 +700,10 @@ datum/mind
if("human") if("human")
var/mob/living/carbon/monkey/M = current var/mob/living/carbon/monkey/M = current
if (istype(M)) if (istype(M))
if (istype(M.virus,/datum/disease/jungle_fever)) for(var/datum/disease/D in M.viruses)
M.virus.cure(0) if (istype(D,/datum/disease/jungle_fever))
sleep(0) //because deleting of virus is doing throught spawn(0) D.cure(0)
sleep(0) //because deleting of virus is doing throught spawn(0)
log_admin("[key_name(usr)] attempting to humanize [key_name(current)]") log_admin("[key_name(usr)] attempting to humanize [key_name(current)]")
message_admins("\blue [key_name_admin(usr)] attempting to humanize [key_name_admin(current)]", 1) message_admins("\blue [key_name_admin(usr)] attempting to humanize [key_name_admin(current)]", 1)
var/obj/item/weapon/dnainjector/m2h/m2h = new var/obj/item/weapon/dnainjector/m2h/m2h = new

View File

@@ -184,6 +184,10 @@
//Wizard mode, but can be used in other modes thanks to the brand new "Give Spell" badmin button //Wizard mode, but can be used in other modes thanks to the brand new "Give Spell" badmin button
var/obj/proc_holder/spell/list/spell_list = list() var/obj/proc_holder/spell/list/spell_list = list()
//List of active diseases
var/viruses = list() // replaces var/datum/disease/virus
//Monkey/infected mode //Monkey/infected mode
var/list/resistances = list() var/list/resistances = list()
var/datum/disease/virus = null var/datum/disease/virus = null

View File

@@ -47,13 +47,13 @@
icon = 'blood.dmi' icon = 'blood.dmi'
icon_state = "floor1" icon_state = "floor1"
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7") random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
var/datum/disease/virus = null var/list/viruses = list()
blood_DNA = null blood_DNA = null
blood_type = null blood_type = null
Del() Del()
if(virus) for(var/datum/disease/D in viruses)
virus.cure(0) D.cure(0)
..() ..()
/obj/decal/cleanable/blood/splatter /obj/decal/cleanable/blood/splatter
@@ -99,11 +99,11 @@
icon = 'blood.dmi' icon = 'blood.dmi'
icon_state = "xfloor1" icon_state = "xfloor1"
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7") random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
var/datum/disease/virus = null var/list/viruses = list()
Del() Del()
if(virus) for(var/datum/disease/D in viruses)
virus.cure(0) D.cure(0)
..() ..()
/obj/decal/cleanable/xenoblood/xsplatter /obj/decal/cleanable/xenoblood/xsplatter
@@ -164,12 +164,12 @@
layer = 2 layer = 2
icon = 'robots.dmi' icon = 'robots.dmi'
icon_state = "floor1" icon_state = "floor1"
var/datum/disease/virus = null var/viruses = list()
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7") random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
Del() Del()
if(virus) for(var/datum/disease/D in viruses)
virus.cure(0) D.cure(0)
..() ..()
/obj/decal/cleanable/oil/streak /obj/decal/cleanable/oil/streak

View File

@@ -111,9 +111,10 @@
var/obj/decal/cleanable/blood/this = new /obj/decal/cleanable/blood(source2) var/obj/decal/cleanable/blood/this = new /obj/decal/cleanable/blood(source2)
this.blood_DNA = M.dna.unique_enzymes this.blood_DNA = M.dna.unique_enzymes
this.blood_type = M.b_type this.blood_type = M.b_type
if (M.virus) for(var/datum/disease/D in M.viruses)
this.virus = new M.virus.type var/datum/disease/newDisease = new D.type
this.virus.holder = this this.viruses += newDisease
newDisease.holder = this
else if (istype(src, /mob/living/carbon/human)) else if (istype(src, /mob/living/carbon/human))
src.blood_DNA = M.dna.unique_enzymes src.blood_DNA = M.dna.unique_enzymes
src.blood_type = M.b_type src.blood_type = M.b_type
@@ -136,25 +137,28 @@
var/turf/simulated/source1 = src var/turf/simulated/source1 = src
var/obj/decal/cleanable/blood/this = new /obj/decal/cleanable/blood(source1) var/obj/decal/cleanable/blood/this = new /obj/decal/cleanable/blood(source1)
this.blood_DNA = M.dna.unique_enzymes this.blood_DNA = M.dna.unique_enzymes
if(M.virus) for(var/datum/disease/D in M.viruses)
this.virus = new M.virus.type var/datum/disease/newDisease = new D.type
this.virus.holder = this this.viruses += newDisease
newDisease.holder = this
else if( istype(M, /mob/living/carbon/alien )) else if( istype(M, /mob/living/carbon/alien ))
if( istype(src, /turf/simulated) ) if( istype(src, /turf/simulated) )
var/turf/simulated/source2 = src var/turf/simulated/source2 = src
var/obj/decal/cleanable/xenoblood/this = new /obj/decal/cleanable/xenoblood(source2) var/obj/decal/cleanable/xenoblood/this = new /obj/decal/cleanable/xenoblood(source2)
if(M.virus) for(var/datum/disease/D in M.viruses)
this.virus = new M.virus.type var/datum/disease/newDisease = new D.type
this.virus.holder = this this.viruses += newDisease
newDisease.holder = this
else if( istype(M, /mob/living/silicon/robot )) else if( istype(M, /mob/living/silicon/robot ))
if( istype(src, /turf/simulated) ) if( istype(src, /turf/simulated) )
var/turf/simulated/source2 = src var/turf/simulated/source2 = src
var/obj/decal/cleanable/oil/this = new /obj/decal/cleanable/oil(source2) var/obj/decal/cleanable/oil/this = new /obj/decal/cleanable/oil(source2)
if(M.virus) for(var/datum/disease/D in M.viruses)
this.virus = new M.virus.type var/datum/disease/newDisease = new D.type
this.virus.holder = this this.viruses += newDisease
newDisease.holder = this

View File

@@ -368,10 +368,10 @@
M.dna = null M.dna = null
O.virus = M.virus for(var/datum/disease/D in M.viruses)
M.virus = null O.viruses += D
if (O.virus) D.affected_mob = O
O.virus.affected_mob = O M.viruses -= D
for(var/obj/T in (M.contents-implants)) for(var/obj/T in (M.contents-implants))
@@ -433,10 +433,10 @@
O.dna = M.dna O.dna = M.dna
M.dna = null M.dna = null
O.virus = M.virus for(var/datum/disease/D in M.viruses)
M.virus = null O.viruses += D
if (O.virus) D.affected_mob = O
O.virus.affected_mob = O M.viruses -= D
//for(var/obj/T in M) //for(var/obj/T in M)
// del(T) // del(T)

View File

@@ -242,8 +242,13 @@
if("pierrot's throat") if("pierrot's throat")
virus_type = /datum/disease/pierrot_throat virus_type = /datum/disease/pierrot_throat
for(var/mob/living/carbon/human/H in world) for(var/mob/living/carbon/human/H in world)
if((H.virus) || (H.stat == 2))
var/foundAlready = 0 // don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
if(H.stat == 2 || foundAlready)
continue continue
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work. if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
if((!H.dna) || (H.sdisabilities & 1)) //A blindness disease would be the worst. if((!H.dna) || (H.sdisabilities & 1)) //A blindness disease would be the worst.
continue continue
@@ -254,13 +259,14 @@
D.carrier = 1 D.carrier = 1
D.holder = H D.holder = H
D.affected_mob = H D.affected_mob = H
H.virus = D H.viruses += D
break break
else else
H.virus = new virus_type var/datum/disease/D = new virus_type
H.virus.affected_mob = H D.carrier = 1
H.virus.holder = H D.holder = H
H.virus.carrier = 1 D.affected_mob = H
H.viruses += D
break break
/proc/alien_infestation() // -- TLE /proc/alien_infestation() // -- TLE

View File

@@ -293,8 +293,9 @@ ________________________________________________________________________________
dat += " | Brute trauma: [U.bruteloss]<br>" dat += " | Brute trauma: [U.bruteloss]<br>"
dat += "Radiation Level: [U.radiation] rad<br>" dat += "Radiation Level: [U.radiation] rad<br>"
dat += "Body Temperature: [U.bodytemperature-T0C]&deg;C ([U.bodytemperature*1.8-459.67]&deg;F)<br>" dat += "Body Temperature: [U.bodytemperature-T0C]&deg;C ([U.bodytemperature*1.8-459.67]&deg;F)<br>"
if(U.virus)
dat += "Warning Virus Detected. Name: [U.virus.name].Type: [U.virus.spread]. Stage: [U.virus.stage]/[U.virus.max_stages]. Possible Cure: [U.virus.cure].<br>" for(var/datum/disease/D in U.viruses)
dat += "Warning: Virus Detected. Name: [D.name].Type: [D.spread]. Stage: [D.stage]/[D.max_stages]. Possible Cure: [D.cure].<br>"
dat += "<ul>" dat += "<ul>"
for(var/datum/reagent/R in reagents.reagent_list) for(var/datum/reagent/R in reagents.reagent_list)
if(R.id=="radium"&&s_control)//Can only directly inject radium when AI is in control. if(R.id=="radium"&&s_control)//Can only directly inject radium when AI is in control.

View File

@@ -340,9 +340,12 @@
if((C.toxloss >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_tox))) if((C.toxloss >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_tox)))
return 1 return 1
if(C.virus && ((C.virus.stage > 1) || (C.virus.spread_type == AIRBORNE)))
if (!C.reagents.has_reagent(src.treatment_virus)) for(var/datum/disease/D in C.viruses)
return 1 //STOP DISEASE FOREVER if((D.stage > 1) || (D.spread_type == AIRBORNE))
if (!C.reagents.has_reagent(src.treatment_virus))
return 1 //STOP DISEASE FOREVER
return 0 return 0
@@ -375,7 +378,11 @@
if(src.emagged) //Emagged! Time to poison everybody. if(src.emagged) //Emagged! Time to poison everybody.
reagent_id = "toxin" reagent_id = "toxin"
if (!reagent_id && (C.virus)) var/virus = 0
for(var/datum/disease/D in C.viruses)
virus = 1
if (!reagent_id && (virus))
if(!C.reagents.has_reagent(src.treatment_virus)) if(!C.reagents.has_reagent(src.treatment_virus))
reagent_id = src.treatment_virus reagent_id = src.treatment_virus

View File

@@ -74,8 +74,11 @@
B.volume = 70 B.volume = 70
//set reagent data //set reagent data
B.data["donor"] = O B.data["donor"] = O
if(O.virus && O.virus.spread_type != SPECIAL)
B.data["virus"] = new O.virus.type(0) for(var/datum/disease/D in O.viruses)
if(D.spread_type != SPECIAL)
B.data["viruses"] = new D.type(0)
B.data["blood_DNA"] = copytext(O.dna.unique_enzymes,1,0) B.data["blood_DNA"] = copytext(O.dna.unique_enzymes,1,0)
if(O.resistances&&O.resistances.len) if(O.resistances&&O.resistances.len)
B.data["resistances"] = O.resistances.Copy() B.data["resistances"] = O.resistances.Copy()

View File

@@ -355,17 +355,17 @@ Neutralize All Unidentified Life Signs: []<BR>"},
if (istype(t, /mob/living)) // if a mob if (istype(t, /mob/living)) // if a mob
var/mob/living/M = t // simple typecasting var/mob/living/M = t // simple typecasting
if (M.stat!=2) // if the target is not dead if (M.stat!=2) // if the target is not dead
popUp() // pop the turret up if it's not already up. spawn() popUp() // pop the turret up if it's not already up.
dir=get_dir(src,M) // even if you can't shoot, follow the target dir=get_dir(src,M) // even if you can't shoot, follow the target
shootAt(M) // shoot the target, finally spawn() shootAt(M) // shoot the target, finally
else else
if (istype(t, /obj/livestock)) // shoot other things, same process as above if (istype(t, /obj/livestock)) // shoot other things, same process as above
var/obj/livestock/L = t var/obj/livestock/L = t
if (L.alive==1) if (L.alive==1)
popUp() spawn() popUp()
dir=get_dir(src,L) dir=get_dir(src,L)
shootAt(L) spawn() shootAt(L)
else else
@@ -373,11 +373,11 @@ Neutralize All Unidentified Life Signs: []<BR>"},
var/mob/t = pick(secondarytargets) var/mob/t = pick(secondarytargets)
if (istype(t, /mob/living)) if (istype(t, /mob/living))
if (t.stat!=2) if (t.stat!=2)
popUp() spawn() popUp()
dir=get_dir(src,t) dir=get_dir(src,t)
shootAt(t) shootAt(t)
else else
popDown() spawn() popDown()
/obj/machinery/porta_turret/proc /obj/machinery/porta_turret/proc
popUp() // pops the turret up popUp() // pops the turret up
@@ -396,6 +396,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
popDown() // pops the turret down popDown() // pops the turret down
if(raising || !raised) return if(raising || !raised) return
if(stat & BROKEN) return if(stat & BROKEN) return
layer=3
raising=1 raising=1
flick("popdown",cover) flick("popdown",cover)
sleep(10) sleep(10)
@@ -404,7 +405,6 @@ Neutralize All Unidentified Life Signs: []<BR>"},
raised=0 raised=0
invisibility=2 invisibility=2
icon_state="grey_target_prism" icon_state="grey_target_prism"
layer=3
/obj/machinery/porta_turret/proc/assess_perp(mob/living/carbon/human/perp as mob) /obj/machinery/porta_turret/proc/assess_perp(mob/living/carbon/human/perp as mob)
@@ -466,6 +466,9 @@ Neutralize All Unidentified Life Signs: []<BR>"},
if (!istype(T) || !istype(U)) if (!istype(T) || !istype(U))
return return
if (!raised) // the turret has to be raised in order to fire - makes sense, right?
return
// any emagged turrets will shoot extremely fast! This not only is deadly, but drains a lot power! // any emagged turrets will shoot extremely fast! This not only is deadly, but drains a lot power!
@@ -475,6 +478,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
A = new /obj/item/projectile/electrode( loc ) A = new /obj/item/projectile/electrode( loc )
use_power(200) use_power(200)
playsound(src.loc, 'Taser.ogg', 75, 1) playsound(src.loc, 'Taser.ogg', 75, 1)
icon_state = "orange_target_prism"
else else
// Shooting Code: // Shooting Code:
var/obj/item/weapon/gun/energy/E=new installation var/obj/item/weapon/gun/energy/E=new installation
@@ -492,7 +496,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
else if(istype(E, /obj/item/weapon/gun/energy/taser)) else if(istype(E, /obj/item/weapon/gun/energy/taser))
A = new /obj/item/projectile/electrode( loc ) A = new /obj/item/projectile/electrode( loc )
icon_state = "target_prism" icon_state = "orange_target_prism"
use_power(200) use_power(200)
else // Energy gun shots else // Energy gun shots
@@ -511,7 +515,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
A.current = T A.current = T
A.yo = U.y - T.y A.yo = U.y - T.y
A.xo = U.x - T.x A.xo = U.x - T.x
spawn( 0 ) spawn( 1 )
A.process() A.process()
return return

View File

@@ -251,11 +251,12 @@
if (!lamarr) if (!lamarr)
var/mob/trg = target var/mob/trg = target
death() death()
if(trg.virus)//Viruses are stored in a global database. //if(trg.virus)//Viruses are stored in a global database.
trg.virus.cure(0)//You need to either cure() or del() them to stop their processing. //trg.virus.cure(0)//You need to either cure() or del() them to stop their processing.
trg.contract_disease(new /datum/disease/alien_embryo(0))//So after that you need to infect the target anew. trg.contract_disease(new /datum/disease/alien_embryo(0))//So after that you need to infect the target anew.
if(target.virus)//If they actually get infected. They may not. for(var/datum/disease/alien_embryo/A in trg.viruses)
target.alien_egg_flag = 1//We finally set their flag to 1. if(target.virus)//If they actually get infected. They may not.
target.alien_egg_flag = 1//We finally set their flag to 1.
return return
else else
sleep(50) sleep(50)

View File

@@ -20,8 +20,8 @@
sleep(3) sleep(3)
if (i > 0) if (i > 0)
var/obj/decal/cleanable/blood/b = new /obj/decal/cleanable/blood/splatter(src.loc) var/obj/decal/cleanable/blood/b = new /obj/decal/cleanable/blood/splatter(src.loc)
if (src.virus) for(var/datum/disease/D in src.viruses)
b.virus = src.virus b.viruses += D
if (step_to(src, get_step(src, direction), 0)) if (step_to(src, get_step(src, direction), 0))
break break
@@ -32,8 +32,8 @@
sleep(3) sleep(3)
if (i > 0) if (i > 0)
var/obj/decal/cleanable/xenoblood/b = new /obj/decal/cleanable/xenoblood/xsplatter(src.loc) var/obj/decal/cleanable/xenoblood/b = new /obj/decal/cleanable/xenoblood/xsplatter(src.loc)
if (src.virus) for(var/datum/disease/D in src.viruses)
b.virus = src.virus b.viruses += D
if (step_to(src, get_step(src, direction), 0)) if (step_to(src, get_step(src, direction), 0))
break break

View File

@@ -690,8 +690,8 @@
user.show_message("\blue \t Damage Specifics: [C.oxyloss > 50 ? "\red" : "\blue"][C.oxyloss]-[C.toxloss > 50 ? "\red" : "\blue"][C.toxloss]-[C.fireloss > 50 ? "\red" : "\blue"][C.fireloss]-[C.bruteloss > 50 ? "\red" : "\blue"][C.bruteloss]", 1) user.show_message("\blue \t Damage Specifics: [C.oxyloss > 50 ? "\red" : "\blue"][C.oxyloss]-[C.toxloss > 50 ? "\red" : "\blue"][C.toxloss]-[C.fireloss > 50 ? "\red" : "\blue"][C.fireloss]-[C.bruteloss > 50 ? "\red" : "\blue"][C.bruteloss]", 1)
user.show_message("\blue \t Key: Suffocation/Toxin/Burns/Brute", 1) user.show_message("\blue \t Key: Suffocation/Toxin/Burns/Brute", 1)
user.show_message("\blue \t Body Temperature: [C.bodytemperature-T0C]&deg;C ([C.bodytemperature*1.8-459.67]&deg;F)", 1) user.show_message("\blue \t Body Temperature: [C.bodytemperature-T0C]&deg;C ([C.bodytemperature*1.8-459.67]&deg;F)", 1)
if(C.virus) for(var/datum/disease/D in C.viruses)
user.show_message(text("\red <b>Warning Virus Detected.</b>\nName: [C.virus.name].\nType: [C.virus.spread].\nStage: [C.virus.stage]/[C.virus.max_stages].\nPossible Cure: [C.virus.cure]")) user.show_message(text("\red <b>Warning Virus Detected.</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]"))
if(2) if(2)
if (!istype(C:dna, /datum/dna) || !isnull(C:gloves)) if (!istype(C:dna, /datum/dna) || !isnull(C:gloves))

View File

@@ -114,8 +114,6 @@ MASS SPECTROMETER
if (istype(A, /obj/decal/cleanable/blood) || istype(A, /obj/rune)) if (istype(A, /obj/decal/cleanable/blood) || istype(A, /obj/rune))
if(A.blood_DNA) if(A.blood_DNA)
user << "\blue Blood type: [A.blood_type]\nDNA: [A.blood_DNA]" user << "\blue Blood type: [A.blood_type]\nDNA: [A.blood_DNA]"
if(A:virus)
user << "\red Warning, virus found in the blood! Name: [A:virus.name]"
else if (A.blood_DNA) else if (A.blood_DNA)
user << "\blue Blood found on [A]. Analysing..." user << "\blue Blood found on [A]. Analysing..."
sleep(15) sleep(15)
@@ -175,8 +173,8 @@ MASS SPECTROMETER
user.show_message(text("\blue [] | [] | [] | []", M.oxyloss > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.toxloss > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.fireloss > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.bruteloss > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1) user.show_message(text("\blue [] | [] | [] | []", M.oxyloss > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.toxloss > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.fireloss > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.bruteloss > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1)
if (M.cloneloss) if (M.cloneloss)
user.show_message(text("\red Subject appears to have been imperfectly cloned."), 1) user.show_message(text("\red Subject appears to have been imperfectly cloned."), 1)
if (M.virus) for(var/datum/disease/D in M.viruses)
user.show_message(text("\red <b>Warning: Virus Detected.</b>\nName: [M.virus.name].\nType: [M.virus.spread].\nStage: [M.virus.stage]/[M.virus.max_stages].\nPossible Cure: [M.virus.cure]")) user.show_message(text("\red <b>Warning: Virus Detected</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]"))
if (M.reagents && M.reagents.get_reagent_amount("inaprovaline")) if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
user.show_message(text("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals."), 1) user.show_message(text("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals."), 1)
if (M.brainloss >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0) if (M.brainloss >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0)

View File

@@ -1,13 +1,13 @@
//HUMANS //HUMANS
/proc/gibs(atom/location, var/datum/disease/virus) /proc/gibs(atom/location, var/list/viruses)
new /obj/gibspawner/human(get_turf(location),virus) new /obj/gibspawner/human(get_turf(location),viruses)
/proc/xgibs(atom/location, var/datum/disease/virus) /proc/xgibs(atom/location, var/list/viruses)
new /obj/gibspawner/xeno(get_turf(location),virus) new /obj/gibspawner/xeno(get_turf(location),viruses)
/proc/robogibs(atom/location, var/datum/disease/virus) /proc/robogibs(atom/location, var/list/viruses)
new /obj/gibspawner/robot(get_turf(location),virus) new /obj/gibspawner/robot(get_turf(location),viruses)
/obj/gibspawner /obj/gibspawner
var/sparks = 0 //whether sparks spread on Gib() var/sparks = 0 //whether sparks spread on Gib()
@@ -16,20 +16,21 @@
var/list/gibamounts = list() var/list/gibamounts = list()
var/list/gibdirections = list() //of lists var/list/gibdirections = list() //of lists
New(location, var/datum/disease/virus = null) New(location, var/list/viruses)
..() ..()
if(istype(loc,/turf)) //basically if a badmin spawns it if(istype(loc,/turf)) //basically if a badmin spawns it
Gib(loc,virus) Gib(loc,viruses)
proc/Gib(atom/location, var/datum/disease/virus = null) proc/Gib(atom/location, var/list/viruses = list())
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len) if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
world << "\red Gib list length mismatch!" world << "\red Gib list length mismatch!"
return return
var/obj/decal/cleanable/blood/gibs/gib = null var/obj/decal/cleanable/blood/gibs/gib = null
if(virus && virus.spread_type == SPECIAL) for(var/datum/disease/D in viruses)
virus = null if(D.spread_type == SPECIAL)
del(D)
if(sparks) if(sparks)
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
@@ -41,13 +42,17 @@
for(var/j = 1, j<= gibamounts[i], j++) for(var/j = 1, j<= gibamounts[i], j++)
var/gibType = gibtypes[i] var/gibType = gibtypes[i]
gib = new gibType(location) gib = new gibType(location)
if(virus && prob(virusProb))
gib.virus = new virus.type if(viruses.len > 0)
gib.virus.holder = gib for(var/datum/disease/D in viruses)
gib.virus.spread_type = CONTACT_FEET if(prob(virusProb))
var/list/directions = gibdirections[i] var/datum/disease/viruus = new D.type
if(directions.len) gib.viruses += viruus
gib.streak(directions) viruus.holder = gib
viruus.spread_type = CONTACT_FEET
var/list/directions = gibdirections[i]
if(directions.len)
gib.streak(directions)
del(src) del(src)

View File

@@ -90,11 +90,11 @@
O2.icon = 'objects.dmi' O2.icon = 'objects.dmi'
O2.icon_state = "shards" O2.icon_state = "shards"
for(var/mob/living/carbon/human/H in view(5, sourceloc)) for(var/mob/living/carbon/human/H in view(5, sourceloc))
if(!H.virus) H.contract_disease(new /datum/disease/gbs,1) H.contract_disease(new /datum/disease/gbs,1)
var/i var/i
for(i=0, i<5, i++) for(i=0, i<5, i++)
for(var/mob/living/carbon/human/H in view(5, sourceloc)) for(var/mob/living/carbon/human/H in view(5, sourceloc))
if(!H.virus) H.contract_disease(new /datum/disease/gbs,1) H.contract_disease(new /datum/disease/gbs,1)
sleep(20) sleep(20)
flick("greenshatter2",O) flick("greenshatter2",O)
O.icon_state = "nothing" O.icon_state = "nothing"

View File

@@ -2163,10 +2163,12 @@ var/showadminmessages = 1
if (ticker.mode.config_tag == "changeling") if (ticker.mode.config_tag == "changeling")
return 2 return 2
return 1 return 1
if(istype(M.virus, /datum/disease/jungle_fever))
if (ticker.mode.config_tag == "monkey") for(var/datum/disease/D in M.viruses)
return 2 if(istype(D, /datum/disease/jungle_fever))
return 1 if (ticker.mode.config_tag == "monkey")
return 2
return 1
if(isrobot(M)) if(isrobot(M))
var/mob/living/silicon/robot/R = M var/mob/living/silicon/robot/R = M
if(R.emagged) if(R.emagged)

View File

@@ -96,7 +96,7 @@
/client/proc/mod_list(var/list/L) /client/proc/mod_list(var/list/L)
if(!istype(L,/list)) src << "Not a List." if(!istype(L,/list)) src << "Not a List."
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state") var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state")
var/list/names = sortList(L) var/list/names = sortList(L)

View File

@@ -725,8 +725,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1) message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1)
if (istype(M, /mob/dead/observer)) if (istype(M, /mob/dead/observer))
var/virus = M.virus gibs(M.loc, M.viruses)
gibs(M.loc, virus)
return return
M.gib() M.gib()

View File

@@ -255,7 +255,7 @@
..() ..()
/* /*
var/datum/disease/F = new /datum/disease/pierrot_throat(0) var/datum/disease/F = new /datum/disease/pierrot_throat(0)
var/list/data = list("virus"= F) var/list/data = list("viruses"= list(F))
reagents.add_reagent("blood", 4, data) reagents.add_reagent("blood", 4, data)
*/ */
reagents.add_reagent("nutriment", 6) reagents.add_reagent("nutriment", 6)

View File

@@ -154,7 +154,7 @@
return return
else if (stat == 2 && !client) else if (stat == 2 && !client)
gibs(loc, virus) gibs(loc, viruses)
del(src) del(src)
return return

View File

@@ -533,8 +533,9 @@
return 1 return 1
handle_virus_updates() handle_virus_updates()
if(src.bodytemperature > 406 && src.virus) if(src.bodytemperature > 406)
src.virus.cure() for(var/datum/disease/D in viruses)
D.cure()
return return
check_if_buckled() check_if_buckled()

View File

@@ -139,7 +139,7 @@
return return
else if (stat == 2 && !client) else if (stat == 2 && !client)
gibs(loc, virus) gibs(loc, viruses)
del(src) del(src)
return return

View File

@@ -465,8 +465,9 @@
return return
handle_virus_updates() handle_virus_updates()
if(bodytemperature > 406 && virus) if(bodytemperature > 406)
virus.cure() for(var/datum/disease/D in viruses)
D.cure()
return return
check_if_buckled() check_if_buckled()

View File

@@ -295,6 +295,7 @@
return 1 return 1
handle_virus_updates() handle_virus_updates()
if(bodytemperature > 406 && virus) if(bodytemperature > 409)
virus.cure() for(var/datum/disease/D in viruses)
D.cure()
return return

View File

@@ -47,6 +47,24 @@
/mob/living/carbon/attack_hand(mob/M as mob) /mob/living/carbon/attack_hand(mob/M as mob)
if(!istype(M, /mob/living/carbon)) return if(!istype(M, /mob/living/carbon)) return
for(var/datum/disease/D in viruses)
var/s_spread_type
if(D.spread_type!=SPECIAL && D.spread_type!=AIRBORNE)
s_spread_type = D.spread_type
D.spread_type = CONTACT_HANDS
M.contract_disease(D)
D.spread_type = s_spread_type
for(var/datum/disease/D in M.viruses)
var/s_spread_type
if(D.spread_type!=SPECIAL && D.spread_type!=AIRBORNE)
s_spread_type = D.spread_type
D.spread_type = CONTACT_HANDS
contract_disease(D)
D.spread_type = s_spread_type
/* // old code: doesn't support multiple viruses
if(src.virus || M.virus) if(src.virus || M.virus)
var/s_spread_type var/s_spread_type
if(src.virus && src.virus.spread_type!=SPECIAL && src.virus.spread_type!=AIRBORNE) if(src.virus && src.virus.spread_type!=SPECIAL && src.virus.spread_type!=AIRBORNE)
@@ -60,11 +78,32 @@
M.virus.spread_type = CONTACT_GENERAL M.virus.spread_type = CONTACT_GENERAL
src.contract_disease(M.virus) src.contract_disease(M.virus)
M.virus.spread_type = s_spread_type M.virus.spread_type = s_spread_type
*/
return return
/mob/living/carbon/attack_paw(mob/M as mob) /mob/living/carbon/attack_paw(mob/M as mob)
if(!istype(M, /mob/living/carbon)) return if(!istype(M, /mob/living/carbon)) return
for(var/datum/disease/D in viruses)
var/s_spread_type
if(D.spread_type!=SPECIAL && D.spread_type!=AIRBORNE)
s_spread_type = D.spread_type
D.spread_type = CONTACT_HANDS
M.contract_disease(D)
D.spread_type = s_spread_type
for(var/datum/disease/D in M.viruses)
var/s_spread_type
if(D.spread_type!=SPECIAL && D.spread_type!=AIRBORNE)
s_spread_type = D.spread_type
D.spread_type = CONTACT_HANDS
contract_disease(D)
D.spread_type = s_spread_type
/*
if(src.virus || M.virus) if(src.virus || M.virus)
var/s_spread_type var/s_spread_type
if(src.virus && src.virus.spread_type!=SPECIAL && src.virus.spread_type!=AIRBORNE) if(src.virus && src.virus.spread_type!=SPECIAL && src.virus.spread_type!=AIRBORNE)
@@ -78,6 +117,7 @@
M.virus.spread_type = CONTACT_GENERAL M.virus.spread_type = CONTACT_GENERAL
src.contract_disease(M.virus) src.contract_disease(M.virus)
M.virus.spread_type = s_spread_type M.virus.spread_type = s_spread_type
*/
return return
/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0) /mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0)

View File

@@ -459,7 +459,7 @@
return return
else if (stat == 2 && !client) else if (stat == 2 && !client)
gibs(loc, virus) gibs(loc, viruses)
del(src) del(src)
return return
@@ -1440,11 +1440,13 @@
else else
UpdateDamage() UpdateDamage()
updatehealth() updatehealth()
if(istype(M.virus, /datum/disease/jungle_fever))
var/mob/living/carbon/human/H = src for(var/datum/disease/D in M.viruses)
src = null if(istype(D, /datum/disease/jungle_fever))
src = H.monkeyize() var/mob/living/carbon/human/H = src
contract_disease(M.virus,1,0) src = null
src = H.monkeyize()
contract_disease(D,1,0)
return return
@@ -1493,11 +1495,13 @@
else else
UpdateDamage() UpdateDamage()
updatehealth() updatehealth()
if(istype(M.virus, /datum/disease/jungle_fever))
var/mob/living/carbon/human/H = src for(var/datum/disease/D in M.viruses)
src = null if(istype(D, /datum/disease/jungle_fever))
src = H.monkeyize() var/mob/living/carbon/human/H = src
contract_disease(M.virus,1,0) src = null
src = H.monkeyize()
contract_disease(D,1,0)
return return
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M as mob) /mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M as mob)

View File

@@ -838,14 +838,20 @@
see_invisible = 0 see_invisible = 0
else if (istype(glasses, /obj/item/clothing/glasses/hud/health)) else if (istype(glasses, /obj/item/clothing/glasses/hud/health))
if(client) if(client)
var/icon/tempHud = 'hud.dmi' var/icon/tempHud = 'hud.dmi'
for(var/mob/living/carbon/human/patient in view(src)) for(var/mob/living/carbon/human/patient in view(src))
var/foundVirus = 0
for(var/datum/disease/D in patient.viruses)
foundVirus++
client.images += image(tempHud,patient,"hud[RoundHealth(patient.health)]") client.images += image(tempHud,patient,"hud[RoundHealth(patient.health)]")
if(patient.stat == 2) if(patient.stat == 2)
client.images += image(tempHud,patient,"huddead") client.images += image(tempHud,patient,"huddead")
else if(patient.alien_egg_flag) else if(patient.alien_egg_flag)
client.images += image(tempHud,patient,"hudxeno") client.images += image(tempHud,patient,"hudxeno")
else if(patient.virus) else if(foundVirus)
client.images += image(tempHud,patient,"hudill") client.images += image(tempHud,patient,"hudill")
else else
client.images += image(tempHud,patient,"hudhealthy") client.images += image(tempHud,patient,"hudhealthy")
@@ -986,8 +992,9 @@
return return
handle_virus_updates() handle_virus_updates()
if(bodytemperature > 406 && virus) if(bodytemperature > 406)
virus.cure() for(var/datum/disease/D in viruses)
D.cure()
return return

View File

@@ -12,18 +12,21 @@
var/imax = rand(5,20) var/imax = rand(5,20)
for(var/i = 0,i<imax,i++) for(var/i = 0,i<imax,i++)
message += "E" message += "E"
if(istype(src.virus, /datum/disease/pierrot_throat))
var/list/temp_message = dd_text2list(message, " ") for(var/datum/disease/D in viruses)
var/list/pick_list = list() if(istype(D, /datum/disease/pierrot_throat))
for(var/i = 1, i <= temp_message.len, i++) var/list/temp_message = dd_text2list(message, " ")
pick_list += i var/list/pick_list = list()
for(var/i=1, ((i <= src.virus.stage) && (i <= temp_message.len)), i++) for(var/i = 1, i <= temp_message.len, i++)
if(prob(5 * src.virus.stage)) pick_list += i
var/H = pick(pick_list) for(var/i=1, ((i <= src.virus.stage) && (i <= temp_message.len)), i++)
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue if(prob(5 * src.virus.stage))
temp_message[H] = "HONK" var/H = pick(pick_list)
pick_list -= H if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
message = dd_list2text(temp_message, " ") temp_message[H] = "HONK"
pick_list -= H
message = dd_list2text(temp_message, " ")
//Ninja mask obscures text and voice if set to do so. //Ninja mask obscures text and voice if set to do so.
//Would make it more global but it's sort of ninja specific. //Would make it more global but it's sort of ninja specific.
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown") if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")

View File

@@ -558,8 +558,9 @@
return return
handle_virus_updates() handle_virus_updates()
if(src.bodytemperature > 406 && src.virus) if(src.bodytemperature > 406)
src.virus.cure() for(var/datum/disease/D in viruses)
D.cure()
return return
check_if_buckled() check_if_buckled()

View File

@@ -160,8 +160,10 @@
if (mutations & HULK) damage += 10 if (mutations & HULK) damage += 10
bruteloss += damage bruteloss += damage
updatehealth() updatehealth()
if(istype(M.virus, /datum/disease/jungle_fever))
contract_disease(M.virus,1,0) for(var/datum/disease/D in M.viruses)
if(istype(D, /datum/disease/jungle_fever))
contract_disease(D,1,0)
else else
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has attempted to bite []!</B>", src), 1) O.show_message(text("\red <B>[M.name] has attempted to bite []!</B>", src), 1)
@@ -181,8 +183,9 @@
var/damage = rand(1, 5) var/damage = rand(1, 5)
bruteloss += damage bruteloss += damage
health = 100 - oxyloss - toxloss - fireloss - bruteloss health = 100 - oxyloss - toxloss - fireloss - bruteloss
if(istype(M.virus, /datum/disease/jungle_fever)) for(var/datum/disease/D in M.viruses)
contract_disease(M.virus,1,0) if(istype(D, /datum/disease/jungle_fever))
contract_disease(D,1,0)
else else
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M.name] has attempted to bite [name]!</B>", 1) O.show_message("\red <B>[M.name] has attempted to bite [name]!</B>", 1)

View File

@@ -34,12 +34,16 @@
var/icon/tempHud = 'hud.dmi' var/icon/tempHud = 'hud.dmi'
var/turf/T = get_turf_or_move(src.loc) var/turf/T = get_turf_or_move(src.loc)
for(var/mob/living/carbon/human/patient in view(T)) for(var/mob/living/carbon/human/patient in view(T))
var/foundVirus = 0
for(var/datum/disease/D in patient.viruses) foundVirus = 1
client.images += image(tempHud,patient,"hud[RoundHealth(patient.health)]") client.images += image(tempHud,patient,"hud[RoundHealth(patient.health)]")
if(patient.stat == 2) if(patient.stat == 2)
client.images += image(tempHud,patient,"huddead") client.images += image(tempHud,patient,"huddead")
else if(patient.alien_egg_flag) else if(patient.alien_egg_flag)
client.images += image(tempHud,patient,"hudxeno") client.images += image(tempHud,patient,"hudxeno")
else if(patient.virus) else if(foundVirus)
client.images += image(tempHud,patient,"hudill") client.images += image(tempHud,patient,"hudill")
else else
client.images += image(tempHud,patient,"hudhealthy") client.images += image(tempHud,patient,"hudhealthy")

View File

@@ -469,12 +469,12 @@
Structural Integrity: [M.bruteloss > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.bruteloss]</font><br> Structural Integrity: [M.bruteloss > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.bruteloss]</font><br>
Body Temperature: [M.bodytemperature-T0C]&deg;C ([M.bodytemperature*1.8-459.67]&deg;F)<br> Body Temperature: [M.bodytemperature-T0C]&deg;C ([M.bodytemperature*1.8-459.67]&deg;F)<br>
"} "}
if(M.virus) for(var/datum/disease/D in M.viruses)
dat += {"<h4>Infection Detected.</h4><br> dat += {"<h4>Infection Detected.</h4><br>
Name: [M.virus.name]<br> Name: [D.name]<br>
Type: [M.virus.spread]<br> Type: [D.spread]<br>
Stage: [M.virus.stage]/[M.virus.max_stages]<br> Stage: [D.stage]/[D.max_stages]<br>
Possible Cure: [M.virus.cure]<br> Possible Cure: [D.cure]<br>
"} "}
dat += "<a href='byond://?src=\ref[src];software=medicalhud;sub=0'>Visual Status Overlay</a><br>" dat += "<a href='byond://?src=\ref[src];software=medicalhud;sub=0'>Visual Status Overlay</a><br>"
return dat return dat

View File

@@ -2008,8 +2008,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
/mob/proc/gib() /mob/proc/gib()
if (istype(src, /mob/dead/observer)) if (istype(src, /mob/dead/observer))
var/V = virus gibs(loc, viruses)
gibs(loc, V)
return return
if(!isrobot(src))//Cyborgs no-longer "die" when gibbed. if(!isrobot(src))//Cyborgs no-longer "die" when gibbed.
death(1) death(1)
@@ -2033,22 +2032,20 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
flick("gibbed-r", animation) flick("gibbed-r", animation)
if(key) if(key)
var/V = virus
if (istype(src, /mob/living/silicon)) if (istype(src, /mob/living/silicon))
robogibs(loc, V) robogibs(loc, viruses)
else if (istype(src, /mob/living/carbon/alien)) else if (istype(src, /mob/living/carbon/alien))
xgibs(loc, V) xgibs(loc, viruses)
else else
gibs(loc, V) gibs(loc, viruses)
else else
var/V = virus
if (istype(src, /mob/living/silicon)) if (istype(src, /mob/living/silicon))
robogibs(loc, V) robogibs(loc, viruses)
else if (istype(src, /mob/living/carbon/alien)) else if (istype(src, /mob/living/carbon/alien))
xgibs(loc, V) xgibs(loc, viruses)
else else
gibs(loc, V) gibs(loc, viruses)
sleep(15) sleep(15)
del(src) del(src)
@@ -2216,7 +2213,7 @@ note dizziness decrements automatically in the mob's Life() proc.
/client/proc/station_explosion_cinematic(var/derp) /client/proc/station_explosion_cinematic(var/derp)
if(!src.mob) if(!src.mob)
return return
var/mob/M = src.mob var/mob/M = src.mob
M.loc = null // HACK, but whatever, this works M.loc = null // HACK, but whatever, this works

View File

@@ -30,10 +30,11 @@
//O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8" //O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*13)]BB8" O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*13)]BB8"
O.loc = loc O.loc = loc
O.virus = virus O.viruses = viruses
virus = null viruses = list()
if (O.virus) for(var/datum/disease/D in O.viruses)
O.virus.affected_mob = O D.affected_mob = O
if (client) if (client)
client.mob = O client.mob = O
if(mind) if(mind)

View File

@@ -66,11 +66,13 @@
/datum/game_mode/monkey/proc/is_important_monkey(var/mob/living/carbon/monkey/M as mob) /datum/game_mode/monkey/proc/is_important_monkey(var/mob/living/carbon/monkey/M as mob)
var/turf/T = get_turf(M) var/turf/T = get_turf(M)
var/area/A = get_area(M) var/area/A = get_area(M)
return \ if(M.stat!=2)
M.stat!=2 && \
istype(M.virus, /datum/disease/jungle_fever) && \ for(var/datum/disease/D in M.viruses)
( T.z==1 || is_type_in_list(A, centcom_areas)) if(istype(D, /datum/disease/jungle_fever) && ( T.z==1 || is_type_in_list(A, centcom_areas)))
return 1
/datum/game_mode/monkey/check_win() /datum/game_mode/monkey/check_win()
if (state==MONKEY_MODE_SHUTTLE_CAPTURED || state==MONKEY_MODE_SHUTTLE_WITH_HUMANS) if (state==MONKEY_MODE_SHUTTLE_CAPTURED || state==MONKEY_MODE_SHUTTLE_WITH_HUMANS)
return return
@@ -117,8 +119,9 @@
/datum/game_mode/proc/auto_declare_completion_monkey() /datum/game_mode/proc/auto_declare_completion_monkey()
for(var/mob/living/carbon/monkey/monkey_player in world) for(var/mob/living/carbon/monkey/monkey_player in world)
if (istype(monkey_player.virus, /datum/disease/jungle_fever) && monkey_player.ckey) for(var/datum/disease/D in monkey_player.viruses)
world << "<B>[monkey_player.ckey] was played infested [monkey_player]. [monkey_player.stat == 2 ? "(DEAD)" : ""]</B>" if (istype(D, /datum/disease/jungle_fever) && monkey_player.ckey)
world << "<B>[monkey_player.ckey] was played infested [monkey_player]. [monkey_player.stat == 2 ? "(DEAD)" : ""]</B>"
return 1 return 1
#undef MONKEY_MODE_RUNNING #undef MONKEY_MODE_RUNNING