mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
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:
@@ -274,6 +274,13 @@ datum
|
||||
R.volume += amount
|
||||
update_total()
|
||||
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
|
||||
|
||||
for(var/A in typesof(/datum/reagent) - /datum/reagent)
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
B.icon_state = "bottle3"
|
||||
var/type = text2path(href_list["create_virus_culture"])//the path is received as string - converting
|
||||
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))
|
||||
if(!name || name == " ") name = D.name
|
||||
B.name = "[name] culture bottle"
|
||||
@@ -416,11 +416,17 @@
|
||||
dat += "<h3>Blood sample data:</h3>"
|
||||
dat += "<b>Blood DNA:</b> [(Blood.data["blood_DNA"]||"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)
|
||||
dat += "<b>Common name:</b> [(D.name||"none")]<BR>"
|
||||
dat += "<b>Possible cure:</b> [(D.cure||"none")]<BR>"
|
||||
|
||||
|
||||
if(Blood.data["viruses"])
|
||||
var/list/vir = Blood.data["viruses"]
|
||||
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> "
|
||||
if(Blood.data["resistances"])
|
||||
var/list/res = Blood.data["resistances"]
|
||||
|
||||
@@ -15,6 +15,7 @@ datum
|
||||
var/data = null
|
||||
var/volume = 0
|
||||
var/nutriment_factor = 0
|
||||
//var/list/viruses = list()
|
||||
|
||||
proc
|
||||
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
|
||||
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"
|
||||
id = "blood"
|
||||
reagent_state = LIQUID
|
||||
|
||||
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
|
||||
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"])
|
||||
var/datum/disease/V = self.data["virus"]
|
||||
if(M.resistances.Find(V.type)) return
|
||||
@@ -85,52 +93,67 @@ datum
|
||||
else //injected
|
||||
M.contract_disease(V, 1, 0)
|
||||
return
|
||||
*/
|
||||
|
||||
|
||||
reaction_turf(var/turf/simulated/T, var/volume)//splash the blood all over the place
|
||||
if(!istype(T)) return
|
||||
var/datum/reagent/blood/self = src
|
||||
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))
|
||||
var/obj/decal/cleanable/blood/blood_prop = locate() in T //find some blood here
|
||||
if(!blood_prop) //first blood!
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA = self.data["blood_DNA"]
|
||||
blood_prop.blood_type = self.data["blood_type"]
|
||||
if(D && !blood_prop.virus) //TODO: multiple viruses
|
||||
blood_prop.virus = new D.type
|
||||
blood_prop.virus.holder = blood_prop
|
||||
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
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)
|
||||
blood_prop.virus.spread_type = CONTACT_FEET
|
||||
newVirus.spread_type = CONTACT_FEET
|
||||
else
|
||||
blood_prop.virus.spread_type = CONTACT_HANDS
|
||||
newVirus.spread_type = CONTACT_HANDS
|
||||
*/
|
||||
|
||||
else if(istype(self.data["donor"], /mob/living/carbon/monkey))
|
||||
var/obj/decal/cleanable/blood/blood_prop = locate() in T
|
||||
if(!blood_prop)
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA = self.data["blood_DNA"]
|
||||
if(D && !blood_prop.virus)
|
||||
blood_prop.virus = new D.type
|
||||
blood_prop.virus.holder = blood_prop
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/newVirus = new D.type
|
||||
blood_prop.viruses += newVirus
|
||||
newVirus.holder = blood_prop
|
||||
|
||||
/*
|
||||
if(T.density==0)
|
||||
blood_prop.virus.spread_type = CONTACT_FEET
|
||||
newVirus.spread_type = CONTACT_FEET
|
||||
else
|
||||
blood_prop.virus.spread_type = CONTACT_HANDS
|
||||
newVirus.spread_type = CONTACT_HANDS
|
||||
*/
|
||||
|
||||
else if(istype(self.data["donor"], /mob/living/carbon/alien))
|
||||
var/obj/decal/cleanable/xenoblood/blood_prop = locate() in T
|
||||
if(!blood_prop)
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA = self.data["blood_DNA"]
|
||||
if(D && !blood_prop.virus)
|
||||
blood_prop.virus = new D.type
|
||||
blood_prop.virus.holder = blood_prop
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/newVirus = new D.type
|
||||
blood_prop.viruses += newVirus
|
||||
newVirus.holder = blood_prop
|
||||
/*
|
||||
if(T.density==0)
|
||||
blood_prop.virus.spread_type = CONTACT_FEET
|
||||
newVirus.spread_type = CONTACT_FEET
|
||||
else
|
||||
blood_prop.virus.spread_type = CONTACT_HANDS
|
||||
newVirus.spread_type = CONTACT_HANDS
|
||||
*/
|
||||
return
|
||||
|
||||
/* 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
|
||||
src = null
|
||||
if(self.data&&method == INGEST)
|
||||
if(M.virus && M.virus.type == self.data)
|
||||
M.virus.cure()
|
||||
else if(!(self.data in M.resistances))
|
||||
M.resistances += self.data
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(M.virus && D.type == self.data["viruses"])
|
||||
D.cure()
|
||||
|
||||
M.resistances += self.data
|
||||
return
|
||||
|
||||
|
||||
@@ -997,10 +1021,11 @@ datum
|
||||
M:confused = 0
|
||||
M:sleeping = 0
|
||||
M:jitteriness = 0
|
||||
M.virus.spread = "Remissive"
|
||||
M.virus.stage--
|
||||
if(M.virus.stage < 1)
|
||||
M.virus.cure()
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
D.spread = "Remissive"
|
||||
D.stage--
|
||||
if(D.stage < 1)
|
||||
D.cure()
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1532,8 +1557,10 @@ datum
|
||||
M:heal_organ_damage(1,1)
|
||||
..()
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
|
||||
dry_ramen
|
||||
name = "Dry Ramen"
|
||||
id = "dry_ramen"
|
||||
@@ -1775,6 +1802,7 @@ datum
|
||||
if(data >= 40 && prob(33))
|
||||
if (!M:confused) M:confused = 1
|
||||
M:confused += 2
|
||||
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1960,6 +1988,9 @@ datum
|
||||
reagent_state = LIQUID
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
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--
|
||||
M:nutrition++
|
||||
..()
|
||||
@@ -2027,6 +2058,12 @@ datum
|
||||
..()
|
||||
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
|
||||
name = "Hooch"
|
||||
id = "hooch"
|
||||
|
||||
@@ -783,8 +783,20 @@
|
||||
B.volume = amount
|
||||
//set reagent data
|
||||
B.data["donor"] = T
|
||||
/*
|
||||
if(T.virus && T.virus.spread_type != SPECIAL)
|
||||
B.data["virus"] = new T.virus.type(0)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
for(var/datum/disease/D in T.viruses)
|
||||
if(!B.data["viruses"])
|
||||
B.data["viruses"] = list()
|
||||
|
||||
|
||||
B.data["virus"] += new D.type
|
||||
|
||||
B.data["blood_DNA"] = copytext(T.dna.unique_enzymes,1,0)
|
||||
if(T.resistances&&T.resistances.len)
|
||||
B.data["resistances"] = T.resistances.Copy()
|
||||
@@ -1611,7 +1623,7 @@
|
||||
New()
|
||||
..()
|
||||
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)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat
|
||||
@@ -1622,7 +1634,7 @@
|
||||
New()
|
||||
..()
|
||||
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)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/cold
|
||||
@@ -1633,7 +1645,7 @@
|
||||
New()
|
||||
..()
|
||||
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)
|
||||
|
||||
/*
|
||||
@@ -1660,7 +1672,7 @@
|
||||
New()
|
||||
..()
|
||||
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)
|
||||
/*
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/rhumba_beat
|
||||
@@ -1687,7 +1699,7 @@
|
||||
New()
|
||||
..()
|
||||
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)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/magnitis
|
||||
@@ -1698,7 +1710,7 @@
|
||||
New()
|
||||
..()
|
||||
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)
|
||||
|
||||
|
||||
@@ -1710,7 +1722,7 @@
|
||||
New()
|
||||
..()
|
||||
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)
|
||||
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
else if (dd_hasprefix(objholder, "/mob") && !(usr.client.holder.rank in list("Game Master", "Game Admin", "Badmin")))
|
||||
objholder = "/obj/closet"
|
||||
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")
|
||||
if(master.buildmode.varholder in locked && !(usr.client.holder.rank in list("Game Master", "Game Admin")))
|
||||
|
||||
@@ -318,6 +318,9 @@
|
||||
if ((!subject.ckey) || (!subject.client))
|
||||
src.temp = "Error: Mental interface failure."
|
||||
return
|
||||
if (subject.mutations & HUSK)
|
||||
src.temp = "Error: Mental interface failure."
|
||||
return
|
||||
if (!isnull(find_record(subject.ckey)))
|
||||
src.temp = "Subject already in database."
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user