mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
-Added advance diseases! Virology can create and mutate advance with different symptoms and effects. Read my comments if you're interested in each symptom.
This isn't done, I still need to add more symptoms and a way for virology to identify and name them. -Metroids will die in space again. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4987 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -155,7 +155,7 @@
|
||||
|
||||
/mob/living/carbon/metroid/proc/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
adjustFireLoss(rand(10,20))
|
||||
adjustToxLoss(rand(10,20))
|
||||
return
|
||||
|
||||
//var/environment_heat_capacity = environment.heat_capacity()
|
||||
@@ -199,9 +199,9 @@
|
||||
|
||||
if(bodytemperature <= (T0C - 50)) // hurt temperature
|
||||
if(bodytemperature <= 50) // sqrting negative numbers is bad
|
||||
adjustFireLoss(200)
|
||||
adjustToxLoss(200)
|
||||
else
|
||||
adjustFireLoss(round(sqrt(bodytemperature)) * 2)
|
||||
adjustToxLoss(round(sqrt(bodytemperature)) * 2)
|
||||
|
||||
else
|
||||
Tempstun = 0
|
||||
|
||||
@@ -3,25 +3,28 @@
|
||||
Put (mob/proc)s here that are in dire need of a code cleanup.
|
||||
*/
|
||||
|
||||
/mob/living/proc/has_disease(var/datum/disease/virus)
|
||||
/mob/proc/has_disease(var/datum/disease/virus)
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(istype(D, virus))
|
||||
if(D.IsSame(virus))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// This proc has some procs that should be extracted from it. I believe we can develop some helper procs from it - Rockdtben
|
||||
/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]"
|
||||
if(stat >=2 || src.resistances.Find(virus.type)) return
|
||||
if(stat >=2)
|
||||
return
|
||||
if(istype(virus, /datum/disease/advance))
|
||||
var/datum/disease/advance/A = virus
|
||||
if(A.GetDiseaseID() in resistances)
|
||||
return
|
||||
else
|
||||
if(src.resistances.Find(virus.type))
|
||||
return
|
||||
|
||||
//This gives a chance to re-infect cured/vaccinated mobs
|
||||
// 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(has_disease(virus))
|
||||
return
|
||||
|
||||
|
||||
if(force_species_check)
|
||||
@@ -37,7 +40,7 @@ Put (mob/proc)s here that are in dire need of a code cleanup.
|
||||
//if(src.virus) < -- this used to replace the current disease. Not anymore!
|
||||
//src.virus.cure(0)
|
||||
|
||||
var/datum/disease/v = new virus.type
|
||||
var/datum/disease/v = new virus.type(D = virus)
|
||||
src.viruses += v
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
|
||||
@@ -349,17 +349,19 @@ datum
|
||||
// mix dem viruses
|
||||
if(R.id == "blood" && reagent == "blood")
|
||||
if(R.data && data)
|
||||
if(R.data && R.data["viruses"] || data && data["viruses"])
|
||||
var/list/this = R.data["viruses"]
|
||||
var/list/that = data["viruses"]
|
||||
this += that // combine the two
|
||||
if((R.data && R.data["viruses"]) || (data && data["viruses"]))
|
||||
|
||||
R.data["viruses"] |= data["viruses"]
|
||||
var/datum/disease/advance/AD = Advance_Mix(R.data["viruses"])
|
||||
|
||||
if(AD)
|
||||
for(var/datum/disease/advance/D in R.data["viruses"])
|
||||
R.data["viruses"] -= D
|
||||
|
||||
R.data["viruses"] |= new/datum/disease/advance(0, AD)
|
||||
|
||||
|
||||
|
||||
/* -- Turns out this code was buggy and unnecessary ---- Doohl
|
||||
for(var/datum/disease/D in this) // makes sure no two viruses are in the reagent at the same time
|
||||
for(var/datum/disease/d in this)//Something in here can cause an inf loop and I am tired so someone else will have to fix it.
|
||||
if(d != D)
|
||||
D.cure(0)
|
||||
*/
|
||||
|
||||
handle_reactions()
|
||||
return 0
|
||||
|
||||
@@ -100,7 +100,7 @@ datum
|
||||
var/datum/reagent/blood/self = src
|
||||
src = null
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/virus = new D.type
|
||||
var/datum/disease/virus = new D.type(D)
|
||||
// We don't spread.
|
||||
if(virus.spread_type == SPECIAL || virus.spread_type == NON_CONTAGIOUS) continue
|
||||
|
||||
@@ -135,7 +135,7 @@ datum
|
||||
blood_prop.blood_DNA[self.data["blood_DNA"]] = self.data["blood_type"]
|
||||
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/newVirus = new D.type
|
||||
var/datum/disease/newVirus = new D.type(D)
|
||||
blood_prop.viruses += newVirus
|
||||
newVirus.holder = blood_prop
|
||||
|
||||
@@ -146,7 +146,7 @@ datum
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA["Non-Human DNA"] = "A+"
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/newVirus = new D.type
|
||||
var/datum/disease/newVirus = new D.type(D)
|
||||
blood_prop.viruses += newVirus
|
||||
newVirus.holder = blood_prop
|
||||
|
||||
@@ -163,7 +163,7 @@ datum
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*"
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/newVirus = new D.type
|
||||
var/datum/disease/newVirus = new D.type(D)
|
||||
blood_prop.viruses += newVirus
|
||||
newVirus.holder = blood_prop
|
||||
/*
|
||||
|
||||
@@ -448,6 +448,36 @@ datum
|
||||
new /obj/item/stack/sheet/plasma(location)
|
||||
return
|
||||
|
||||
virus_food
|
||||
name = "Virus Food"
|
||||
id = "virusfood"
|
||||
result = "virusfood"
|
||||
required_reagents = list("water" = 5, "milk" = 5, "oxygen" = 5)
|
||||
result_amount = 15
|
||||
|
||||
mix_virus
|
||||
name = "Mix Virus"
|
||||
id = "mixvirus"
|
||||
result = "blood"
|
||||
required_reagents = list("blood" = 5, "virusfood" = 5)
|
||||
result_amount = 5
|
||||
var/level = 2
|
||||
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
|
||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list
|
||||
if(B && B.data)
|
||||
var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"]
|
||||
if(D)
|
||||
D.Evolve(level - rand(0, 1))
|
||||
|
||||
holder.del_reagent(id)
|
||||
|
||||
mix_virus_2
|
||||
|
||||
required_reagents = list("blood" = 5, "mutagen" = 5)
|
||||
level = 4
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// foam and foam precursor
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
icon_state = "bottle3"
|
||||
New()
|
||||
..()
|
||||
var/datum/disease/F = new /datum/disease/flu(0)
|
||||
var/datum/disease/F = new /datum/disease/advance/flu(0)
|
||||
var/list/data = list("viruses"= list(F))
|
||||
reagents.add_reagent("blood", 20, data)
|
||||
|
||||
@@ -126,7 +126,18 @@
|
||||
icon_state = "bottle3"
|
||||
New()
|
||||
..()
|
||||
var/datum/disease/F = new /datum/disease/cold(0)
|
||||
var/datum/disease/advance/F = new /datum/disease/advance/cold(0)
|
||||
var/list/data = list("viruses"= list(F))
|
||||
reagents.add_reagent("blood", 20, data)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/random
|
||||
name = "Random culture bottle"
|
||||
desc = "A small bottle. Contains a random disease."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle3"
|
||||
New()
|
||||
..()
|
||||
var/datum/disease/advance/F = new(0)
|
||||
var/list/data = list("viruses"= list(F))
|
||||
reagents.add_reagent("blood", 20, data)
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
B.data["viruses"] = list()
|
||||
|
||||
|
||||
B.data["viruses"] += new D.type
|
||||
B.data["viruses"] += new D.type(D)
|
||||
|
||||
|
||||
B.data["blood_DNA"] = copytext(T.dna.unique_enzymes,1,0)
|
||||
|
||||
Reference in New Issue
Block a user