- Slightly rewrote the diseases. Spreading, stage updates, etc. Check the diffs if you want details.

- Fixed wizarditis teleport lagggggg

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@339 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
panurgomatic
2010-10-21 03:23:10 +00:00
parent fa12986b97
commit c0c940db6a
27 changed files with 369 additions and 301 deletions

View File

@@ -387,6 +387,9 @@
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>"
dat += "<b>Contains antibodies to:</b> "
if(Blood.data["resistances"])
var/list/res = Blood.data["resistances"]

View File

@@ -74,9 +74,9 @@ datum
var/datum/disease/V = self.data["virus"]
if(M.resistances.Find(V.type)) return
if(method == TOUCH)//respect all protective clothing...
M.contract_disease(new V.type)
M.contract_disease(V)
else //injected
M.contract_disease(new V.type, 1)
M.contract_disease(V, 1)
return
@@ -84,6 +84,7 @@ datum
var/datum/reagent/blood/self = src
src = null
if(!istype(T, /turf/simulated/)) return
var/datum/disease/D = self.data["virus"]
if(istype(self.data["donor"], /mob/living/carbon/human) || !self.data["donor"])
var/turf/simulated/source2 = T
var/list/objsonturf = range(0,T)
@@ -94,19 +95,36 @@ datum
var/obj/decal/cleanable/blood/blood_prop = new /obj/decal/cleanable/blood(source2)
blood_prop.blood_DNA = self.data["blood_DNA"]
blood_prop.blood_type = self.data["blood_type"]
blood_prop.virus = self.data["virus"]
if(D)
blood_prop.virus = new D.type
blood_prop.virus.holder = blood_prop
if(istype(T, /turf/simulated/floor))
blood_prop.virus.spread_type = CONTACT_FEET
else
blood_prop.virus.spread_type = CONTACT_HANDS
else if(istype(self.data["donor"], /mob/living/carbon/monkey))
var/turf/simulated/source1 = T
var/obj/decal/cleanable/blood/blood_prop = new /obj/decal/cleanable/blood(source1)
blood_prop.blood_DNA = self.data["blood_DNA"]
blood_prop.virus = self.data["virus"]
if(D)
blood_prop.virus = new D.type
blood_prop.virus.holder = blood_prop
if(istype(T, /turf/simulated/floor))
blood_prop.virus.spread_type = CONTACT_FEET
else
blood_prop.virus.spread_type = CONTACT_HANDS
else if(istype(self.data["donor"], /mob/living/carbon/alien))
var/turf/simulated/source2 = T
var/obj/decal/cleanable/xenoblood/blood_prop = new /obj/decal/cleanable/xenoblood(source2)
blood_prop.virus = self.data["virus"]
if(D)
blood_prop.virus = new D.type
blood_prop.virus.holder = blood_prop
if(istype(T, /turf/simulated/floor))
blood_prop.virus.spread_type = CONTACT_FEET
else
blood_prop.virus.spread_type = CONTACT_HANDS
return
vaccine
@@ -119,8 +137,8 @@ datum
var/datum/reagent/vaccine/self = src
src = null
if(self.data&&method == INGEST)
if(M.resistances.Find(self.data)) return
M.resistances += self.data
if(M.virus&&M.virus.type == self.data)
M.virus.cure()
return
@@ -967,9 +985,9 @@ datum
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
src = null
if( (prob(10) && method==TOUCH) || method==INGEST)
if(!M.virus)
M.virus = new /datum/disease/robotic_transformation
M.virus.affected_mob = M
var/datum/disease/D = new /datum/disease/robotic_transformation
M.contract_disease(D,1)
del(D)
xenomicrobes
name = "Xenomicrobes"
@@ -979,9 +997,9 @@ datum
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
src = null
if( (prob(10) && method==TOUCH) || method==INGEST)
if(!M.virus)
M.virus = new /datum/disease/xeno_transformation
M.virus.affected_mob = M
var/datum/disease/D = new /datum/disease/xeno_transformation
M.contract_disease(D,1)
del(D)
//foam precursor

View File

@@ -357,6 +357,18 @@
amount_per_transfer_from_this = 10
flags = FPRINT | TABLEPASS | OPENCONTAINER
var/list/can_be_placed_into = list(
/obj/machinery/chem_master/,
/obj/table,
/obj/secure_closet,
/obj/closet,
/obj/item/weapon/storage,
/obj/machinery/atmospherics/unary/cryo_cell,
/obj/item/weapon/chem_grenade,
/obj/machinery/bot/medbot,
/obj/machinery/pandemic,
/obj/item/weapon/secstorage/ssafe)
examine()
set src in view(2)
..()
@@ -374,7 +386,8 @@
R.my_atom = src
afterattack(obj/target, mob/user , flag)
if(src.can_be_placed_into.Find(target.type))
return
if(ismob(target) && target.reagents && reagents.total_volume)
user << "\blue You splash the solution onto [target]."
for(var/mob/O in viewers(world.view, user))
@@ -407,7 +420,7 @@
var/trans = src.reagents.trans_to(target, 10)
user << "\blue You transfer [trans] units of the solution to [target]."
else if(reagents.total_volume && !istype(target,/obj/machinery/chem_master/) && !istype(target,/obj/table) && !istype(target,/obj/secure_closet) && !istype(target,/obj/closet) && !istype(target,/obj/item/weapon/storage) && !istype(target, /obj/machinery/atmospherics/unary/cryo_cell) && !istype(target, /obj/item/weapon/chem_grenade) && !istype(target, /obj/machinery/bot/medbot) &&!istype(target, /obj/machinery/pandemic))
else if(reagents.total_volume)
user << "\blue You splash the solution onto [target]."
src.reagents.reaction(target, TOUCH)
spawn(5) src.reagents.clear_reagents()
@@ -547,7 +560,7 @@
B.volume = amount
//set reagent data
B.data["donor"] = T
if(T.virus)
if(T.virus && T.virus.spread_type != SPECIAL)
B.data["virus"] = new T.virus.type
B.data["blood_DNA"] = copytext(T.dna.unique_enzymes,1,0)
if(T.resistances&&T.resistances.len)

View File

@@ -1,3 +1,18 @@
#define SPECIAL 0
#define CONTACT_GENERAL 1
#define CONTACT_HANDS 2
#define CONTACT_FEET 3
#define AIRBORNE 4
/*
IMPORTANT NOTE: Please delete the diseases by using cure() proc or del() instruction.
Diseases are referenced in global list, so simply setting mob or obj vars
to null does not delete the object itself. Thank you.
*/
/datum/disease
var/name = "No disease"
var/stage = 1 //all diseases start at stage 1
@@ -6,14 +21,19 @@
var/cure_id = null// reagent.id or list containing them
var/cure_chance = 8//chance for the cure to do its job
var/spread = null
var/spread_type = AIRBORNE
var/contagious_period = 0//the disease stage when it can be spread
var/list/affected_species = list()
var/mob/affected_mob = null
var/holder = null
var/carrier = 0.0 //there will be a small chance that the person will be a carrier
var/curable = 1 //can this disease be cured? (By itself...)
var/list/strain_data = list() //This is passed on to infectees
var/stage_prob = 5 // probability of advancing to next stage, default 5% per check
var/agent = "some microbes"//name of the disease agent
var/permeability_mod = 0//permeability modifier. Positive gives better chance, negative - worse.
var/permeability_mod = 1//permeability modifier coefficient.
var/desc = null//description. Leave it null and this disease won't show in med records.
var/severity = null//severity descr
/datum/disease/proc/stage_act()
@@ -32,9 +52,8 @@
stage++
if(stage != 1 && (prob(1) || (cure_present && prob(cure_chance))))
stage--
else if(stage == 1 && ((prob(1) && affected_mob.virus.curable) || (cure_present && prob(cure_chance))))
affected_mob.resistances += affected_mob.virus.type
affected_mob.virus = null
else if(stage <= 1 && ((prob(1) && src.curable) || (cure_present && prob(cure_chance))))
src.cure()
return
return
@@ -51,18 +70,25 @@
/mob/proc/contract_disease(var/datum/disease/virus, var/skip_this = 0)
world << "Contract_disease called by [src] with virus [virus]"
if(src.resistances.Find(virus.type))
if(prob(99)) return
src.resistances.Remove(virus.type)//the resistance is futile
//For alien egg and stuff
if(skip_this == 1)
src.virus = virus
if(src.virus)
src.virus.cure(0)
src.virus = new virus.type
src.virus.affected_mob = src
src.virus.strain_data = virus.strain_data.Copy()
src.virus.holder = src
if(prob(5))
src.virus.carrier = 1
return
if(src.virus) return
if(src.resistances.Find(virus.type))
if(prob(99.9)) return
src.resistances.Remove(virus.type)//the resistance is futile
/*
var/list/clothing_areas = list()
var/list/covers = list(UPPER_TORSO,LOWER_TORSO,LEGS,FEET,ARMS,HANDS)
@@ -76,11 +102,36 @@
clothing_areas[Covers] += Clothing
*/
if(prob(15)) return
if(prob(15/virus.permeability_mod)) return
var/obj/item/clothing/Cl = null
var/passed = 1
var/target_zone = pick(1,2,50;3,50;4)//1 - head, 2 - body, 3 - hands, 4- feet
//chances to target this zone
var/head_ch
var/body_ch
var/hands_ch
var/feet_ch
switch(virus.spread_type)
if(CONTACT_HANDS)
head_ch = 0
body_ch = 0
hands_ch = 100
feet_ch = 0
if(CONTACT_FEET)
head_ch = 0
body_ch = 0
hands_ch = 0
feet_ch = 100
else
head_ch = 100
body_ch = 100
hands_ch = 25
feet_ch = 25
var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4)//1 - head, 2 - body, 3 - hands, 4- feet
if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
@@ -89,38 +140,38 @@
if(1)
if(H.head)
Cl = H.head
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
//world << "Head pass [passed]"
if(passed && H.wear_mask)
Cl = H.wear_mask
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
//world << "Mask pass [passed]"
if(2)//arms and legs included
if(H.wear_suit)
Cl = H.wear_suit
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
//world << "Suit pass [passed]"
if(passed && H.slot_w_uniform)
Cl = H.slot_w_uniform
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
//world << "Uniform pass [passed]"
if(3)
if(H.wear_suit && H.wear_suit.body_parts_covered&HANDS)
Cl = H.wear_suit
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
if(passed && H.gloves)
Cl = H.gloves
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
//world << "Gloves pass [passed]"
if(4)
if(H.wear_suit && H.wear_suit.body_parts_covered&FEET)
Cl = H.wear_suit
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
if(passed && H.shoes)
Cl = H.shoes
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
//world << "Shoes pass [passed]"
else
src << "Something strange's going on, something's wrong."
@@ -141,8 +192,8 @@
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
//world << "Mask pass [passed]"
if(passed && virus.spread=="Airborne" && src.internals)
passed = prob(60)
if(passed && virus.spread_type == AIRBORNE && src.internals)
passed = (prob(50*virus.permeability_mod))
if(passed)
// world << "Infection in the mob [src]. YAY"
@@ -175,9 +226,64 @@
else if(prob(15))
return
else*/
src.virus = virus
src.virus = new virus.type
src.virus.strain_data = virus.strain_data.Copy()
src.virus.affected_mob = src
src.virus.holder = src
if(prob(5))
src.virus.carrier = 1
return
return
/datum/disease/proc/spread(var/source=null)
//world << "Disease [src] proc spread was called from holder [source]"
if(src.spread_type == SPECIAL)//does not spread
return
if(src.stage < src.contagious_period) //the disease is not contagious at this stage
return
if(!source)//no holder specified
if(src.affected_mob)//no mob affected holder
source = src.affected_mob
else //no source and no mob affected. Rogue disease. Break
return
var/check_range = AIRBORNE//defaults to airborne - range 4
if(src.spread_type != AIRBORNE)
check_range = 1
for(var/mob/living/carbon/M in oviewers(check_range, source))
for(var/name in src.affected_species)
var/mob_type = text2path("/mob/living/carbon/[lowertext(name)]")
if(mob_type && istype(M, mob_type))
M.contract_disease(src)
break
return
/datum/disease/proc/process()
if(!src.holder) return
if(prob(40))
src.spread(holder)
if(src.holder == src.affected_mob)
src.stage_act()
return
/datum/disease/proc/cure(var/resistance=1)
var/datum/disease/D = src
src = null
if(resistance && src.affected_mob && !affected_mob.resistances.Find(D.type))
affected_mob.resistances += D.type
del(D)
/datum/disease/New()
active_diseases += src
/*
/datum/disease/Del()
active_diseases.Remove(src)
*/

View File

@@ -10,10 +10,12 @@
name = "Unidentified Foreign Body"
max_stages = 5
spread = "None"
spread_type = SPECIAL
cure = "Unknown"
cure_id = list("lexorin","toxin","gargleblaster")
cure_chance = 20
affected_species = list("Human", "Monkey")
permeability_mod = 3//likely to infect
/datum/disease/alien_embryo/stage_act()
..()

View File

@@ -1,13 +1,16 @@
/datum/disease/brainrot
name = "Brainrot"
max_stages = 4
spread = "Airborne"
spread = "On contact"
spread_type = CONTACT_GENERAL
cure = "Spaceacillin & Alkysine"
cure_id = list("alkysine","spaceacillin")
agent = "Cryptococcus Cosmosis"
affected_species = list("Human")
curable = 0
cure_chance = 10
cure_chance = 15//higher chance to cure, since two reagents are required
desc = "This disease destroys the braincells, causing brain fever, brain necrosis and general intoxication."
severity = "Major"
/datum/disease/brainrot/stage_act() //Removed toxloss because damaging diseases are pretty horrible. Last round it killed the entire station because the cure didn't work -- Urist
..()

View File

@@ -2,11 +2,13 @@
name = "The Cold"
max_stages = 3
spread = "Airborne"
cure = "Rest"
cure = "spaceacillin"
cure = "Rest & Spaceacillin"
cure_id = "spaceacillin"
agent = "XY-rhinovirus"
affected_species = list("Human", "Monkey")
permeability_mod = -10
permeability_mod = 0.5
desc = "If left untreated the subject will contract the flu."
severity = "Minor"
/datum/disease/cold/stage_act()
..()
@@ -14,13 +16,11 @@
if(2)
if(affected_mob.sleeping && prob(40))
affected_mob << "\blue You feel better."
affected_mob.resistances += affected_mob.virus.type
affected_mob.virus = null
affected_mob.virus.cure()
return
if(prob(1) && prob(10))
affected_mob << "\blue You feel better."
affected_mob.resistances += affected_mob.virus.type
affected_mob.virus = null
affected_mob.virus.cure()
return
if(prob(1))
affected_mob.emote("sneeze")
@@ -33,13 +33,11 @@
if(3)
if(affected_mob.sleeping && prob(25))
affected_mob << "\blue You feel better."
affected_mob.resistances += affected_mob.virus.type
affected_mob.virus = null
affected_mob.virus.cure()
return
if(prob(1) && prob(10))
affected_mob << "\blue You feel better."
affected_mob.resistances += affected_mob.virus.type
affected_mob.virus = null
affected_mob.virus.cure()
if(prob(1))
affected_mob.emote("sneeze")
if(prob(1))
@@ -49,4 +47,6 @@
if(prob(1))
affected_mob << "\red Mucous runs down the back of your throat."
if(prob(1) && prob(50))
affected_mob.contract_disease(new /datum/disease/flu)
var/datum/disease/Flu = new /datum/disease/flu
affected_mob.contract_disease(Flu,1)
del(Flu)

View File

@@ -1,7 +1,8 @@
/datum/disease/dnaspread
name = "Space Retrovirus"
max_stages = 4
spread = "Airborne"
spread = "On contact"
spread_type = CONTACT_GENERAL
cure = "Ryetalin"
cure = "ryetalyn"
curable = 0
@@ -9,6 +10,8 @@
affected_species = list("Human")
var/list/original_dna = list()
var/transformed = 0
desc = "This disease transplants the genetic code of the intial vector into new hosts."
severity = "Medium"
/datum/disease/dnaspread/stage_act()
@@ -32,7 +35,7 @@
if(4)
if(!src.transformed)
if ((!strain_data["name"]) || (!strain_data["UI"]) || (!strain_data["SE"]))
affected_mob.virus = null
del(affected_mob.virus)
return
//Save original dna for when the disease is cured.

View File

@@ -1,11 +1,14 @@
/datum/disease/fake_gbs
name = "GBS"
max_stages = 5
spread = "Airborne"
spread = "On contact"
spread_type = CONTACT_GENERAL
cure = "Synaptizine & Sulfur"
cure_id = list("synaptizine","sulfur")
agent = "Gravitokinetic Bipotential SADS-"
affected_species = list("Human")
desc = "If left untreated death will occur."
severity = "Major"
/datum/disease/fake_gbs/stage_act()
..()

View File

@@ -4,10 +4,12 @@
spread = "Airborne"
cure = "Spaceacillin"
cure_id = "spaceacillin"
cure_chance = 10
agent = "H13N1 flu virion"
affected_species = list("Human")
curable = 0
permeability_mod = -5
permeability_mod = 0.75
desc = "If left untreated the subject will feel quite unwell."
severity = "Medium"
/datum/disease/flu/stage_act()
..()

View File

@@ -1,7 +1,8 @@
/datum/disease/gbs
name = "GBS"
max_stages = 5
spread = "Airborne"
spread = "On contact"
spread_type = CONTACT_GENERAL
cure = "Synaptizine & Sulfur"
cure_id = list("synaptizine","sulfur")
agent = "Gravitokinetic Bipotential SADS+"

View File

@@ -2,6 +2,9 @@
name = "Jungle Fever"
max_stages = 1
cure = "None"
spread = "Airborne"
spread = "Bites"
spread_type = SPECIAL
affected_species = list("Monkey")
curable = 0
desc = "Monkies with this disease will bite humans, causing humans to spontaneously mutate into a monkey."
severity = "Medium"

View File

@@ -7,6 +7,9 @@
agent = "Fukkos Miracos"
affected_species = list("Human")
curable = 0
permeability_mod = 0.75
desc = "This disease disrupts the magnetic field of your body, making it act as if a powerful magnet. Injections of iron help stabilize the field."
severity = "Medium"
/datum/disease/magnitis/stage_act()
..()

View File

@@ -4,9 +4,12 @@
name = "Robotic Transformation"
max_stages = 5
spread = "Syringe"
spread_type = SPECIAL
cure = "None"
agent = "R2D2 Nanomachines"
affected_species = list("Human")
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
severity = "Major"
/datum/disease/robotic_transformation/stage_act()
..()

View File

@@ -7,7 +7,9 @@
agent = "Rincewindus Vulgaris"
affected_species = list("Human")
curable = 0
permeability_mod = -5
permeability_mod = 0.75
desc = "Some speculate, that this virus is the cause of Wizard Federation existance. Subjects affected show the signs of mental retardation, yelling obscure sentences or total gibberish. On late stages subjects sometime express the feelings of inner power, and, cite, 'the ability to control the forces of cosmos themselves!' A gulp of strong, manly spirits usually reverts them to normal, humanlike, condition."
severity = "Minor"
/*
BIRUZ BENNAR
@@ -24,7 +26,7 @@ STI KALY - blind
switch(stage)
if(2)
if(prob(4))
affected_mob.say(pick("You shall not pass!", "Expeliarmus!", "By Merlins beard!", ""))
affected_mob.say(pick("You shall not pass!", "Expeliarmus!", "By Merlins beard!", "Feel the power of the Dark Side!"))
if(prob(2))
affected_mob << "\red You feel [pick("that you don't have enough mana.", "that the winds of magic are gone.", "an urge to summon familiar.")]"
@@ -43,43 +45,15 @@ STI KALY - blind
return
if(prob(2))
affected_mob << "\red You feel [pick("the tidal wave of raw power building inside","that this location gives you a +2 to INT and +1 to WIS","an urge to teleport")]."
/* if(prob(5))
if(prob(5))
teleport()
var/list/theareas = new/list()
for(var/area/AR in world)
if(theareas.Find(AR)) continue
var/turf/picked = pick(get_area_turfs(AR.type))
if (picked.z == affected_mob.z)
theareas += AR
var/area/thearea = pick(theareas)
affected_mob.say("SCYAR NILA [uppertext(thearea.name)]")
var/datum/effects/system/harmless_smoke_spread/smoke = new /datum/effects/system/harmless_smoke_spread()
smoke.set_up(5, 0, affected_mob.loc)
smoke.attach(affected_mob)
smoke.start()
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
if(T.z != affected_mob.z) continue
if(!T.density)
var/clear = 1
for(var/obj/O in T)
if(O.density)
clear = 0
break
if(clear)
L+=T
affected_mob.loc = pick(L)
smoke.start()
//Apparently it created a lagspike every time it was called -- Urist
return */
return
/datum/disease/wizarditis/proc/spawn_wizard_clothes(var/chance=5)
if(istype(affected_mob, /mob/living/carbon/human))
var/mob/living/carbon/human/H = affected_mob
if(prob(chance))
if(!istype(H.head, /obj/item/clothing/head/wizard))
@@ -102,6 +76,8 @@ STI KALY - blind
H.shoes = new /obj/item/clothing/shoes/sandal(H)
H.shoes.layer = 20
return
else
var/mob/living/carbon/H = affected_mob
if(prob(chance))
if(!istype(H.r_hand, /obj/item/weapon/staff))
if(H.r_hand)
@@ -110,3 +86,47 @@ STI KALY - blind
H.r_hand.layer = 20
return
return
/datum/disease/wizarditis/proc/teleport()
/*
var/list/theareas = new/list()
for(var/area/AR in world)
if(theareas.Find(AR)) continue
var/turf/picked = pick(get_area_turfs(AR.type)
if (picked && picked.z == affected_mob.z)
theareas += AR
var/area/thearea = pick(theareas)
*/
var/list/theareas = new/list()
for(var/area/AR in orange(80, affected_mob))
if(theareas.Find(AR)) continue
theareas += AR
var/area/thearea = pick(theareas)
var/datum/effects/system/harmless_smoke_spread/smoke = new /datum/effects/system/harmless_smoke_spread()
smoke.set_up(5, 0, affected_mob.loc)
smoke.attach(affected_mob)
smoke.start()
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
if(T.z != affected_mob.z) continue
if(!T.density)
var/clear = 1
for(var/obj/O in T)
if(O.density)
clear = 0
break
if(clear)
L+=T
affected_mob.say("SCYAR NILA [uppertext(thearea.name)]!")
affected_mob.loc = pick(L)
smoke.start()
//Apparently it created a lagspike every time it was called -- Urist
return

View File

@@ -4,6 +4,7 @@
name = "Xenomorph Transformation"
max_stages = 5
spread = "Syringe"
spread_type = SPECIAL
cure = "None"
agent = "Rip-LEY Alien Microbes"
affected_species = list("Human")

View File

@@ -7,6 +7,7 @@ var/global
list/machines = list()
list/processing_items = list()
list/active_diseases = list()
//items that ask to be called every cycle
defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event

View File

@@ -28,6 +28,11 @@
blood_DNA = null
blood_type = null
Del()
if(virus)
virus.cure(0)
..()
/obj/decal/cleanable/xenoblood
name = "Xeno blood"
desc = "It's green."
@@ -39,6 +44,11 @@
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
var/datum/disease/virus = null
Del()
if(virus)
virus.cure(0)
..()
/obj/decal/cleanable/blood/splatter
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
@@ -89,6 +99,11 @@
var/datum/disease/virus = null
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
Del()
if(virus)
virus.cure(0)
..()
/obj/decal/cleanable/oil/streak
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5")

View File

@@ -101,7 +101,8 @@
var/obj/decal/cleanable/blood/this = new /obj/decal/cleanable/blood(source2)
this.blood_DNA = M.dna.unique_enzymes
this.blood_type = M.b_type
this.virus = M.virus
this.virus = new M.virus.type
this.virus.holder = this
else if (istype(src, /mob/living/carbon/human))
src.blood_DNA = M.dna.unique_enzymes
src.blood_type = M.b_type
@@ -124,19 +125,22 @@
var/turf/simulated/source1 = src
var/obj/decal/cleanable/blood/this = new /obj/decal/cleanable/blood(source1)
this.blood_DNA = M.dna.unique_enzymes
this.virus = M.virus
this.virus = new M.virus.type
this.virus.holder = this
else if( istype(M, /mob/living/carbon/alien ))
if( istype(src, /turf/simulated) )
var/turf/simulated/source2 = src
var/obj/decal/cleanable/xenoblood/this = new /obj/decal/cleanable/xenoblood(source2)
this.virus = M.virus
this.virus = new M.virus.type
this.virus.holder = this
else if( istype(M, /mob/living/silicon/robot ))
if( istype(src, /turf/simulated) )
var/turf/simulated/source2 = src
var/obj/decal/cleanable/oil/this = new /obj/decal/cleanable/oil(source2)
this.virus = M.virus
this.virus = new M.virus.type
this.virus.holder = this
/atom/proc/clean_blood()

View File

@@ -83,17 +83,15 @@
dat += text("<A href='?src=\ref[src];new=1'>New Record</A><BR><BR>")
dat += text("\n<A href='?src=\ref[];print_p=1'>Print Record</A><BR>\n<A href='?src=\ref[];screen=2'>Back</A><BR>", src, src)
if(5.0)
dat += {"<CENTER><B>Virus Database</B></CENTER>
<br><a href='?src=\ref[src];vir=gbs'>GBS</a>
<br><a href='?src=\ref[src];vir=cc'>Common Cold</a>
<br><a href='?src=\ref[src];vir=f'>Flu</A>
<br><a href='?src=\ref[src];vir=jf'>Jungle Fever</a>
<br><a href='?src=\ref[src];vir=ca'>Clowning Around</a>
<br><a href='?src=\ref[src];vir=p'>Plasmatoid</a>
<br><a href='?src=\ref[src];vir=dna'>Space Rhinovirus</a>
<br><a href='?src=\ref[src];vir=bot'>Robot Transformation</a>
<br><a href='?src=\ref[src];vir=mgn'>Magnitis</A>
<br><a href='?src=\ref[src];screen=1'>Back</a>"}
dat += "<CENTER><B>Virus Database</B></CENTER>"
for(var/Dt in typesof(/datum/disease/))
var/datum/disease/Dis = new Dt
if(!Dis.desc)
del(Dis)
continue
dat += "<br><a href='?src=\ref[src];vir=[Dt]'>[Dis.name]</a>"
del(Dis)
dat += "<br><a href='?src=\ref[src];screen=1'>Back</a>"
if(6.0)
dat += "<center><b>Medical Robot Monitor</b></center>"
dat += "<a href='?src=\ref[src];screen=1'>Back</a>"
@@ -170,97 +168,21 @@
src.active2 = null
if(href_list["vir"])
switch(href_list["vir"])
if("gbs")
src.temp = {"<b>Name:</b> GBS
<BR><b>Number of stages:</b> 5
<BR><b>Spread:</b> Airborne Transmission
<BR><b>Possible Cure:</b> Spaceacillin
<BR><b>Affected Species:</b> Human
var/type = href_list["vir"]
var/datum/disease/Dis = new type
var/AfS = ""
for(var/Str in Dis.affected_species)
AfS += " [Str];"
src.temp = {"<b>Name:</b> [Dis.name]
<BR><b>Number of stages:</b> [Dis.max_stages]
<BR><b>Spread:</b> [Dis.spread] Transmission
<BR><b>Possible Cure:</b> [(Dis.cure||"none")]
<BR><b>Affected Species:</b>[AfS]
<BR>
<BR><b>Notes:</b> If left untreated death will occur.
<BR><b>Notes:</b> [Dis.desc]
<BR>
<BR><b>Severity:</b> Major"}
if("cc")
src.temp = {"<b>Name:</b> Common Cold
<BR><b>Number of stages:</b> 3
<BR><b>Spread:</b> Airborne Transmission
<BR><b>Possible Cure:</b> Rest
<BR><b>Affected Species:</b> Human
<BR>
<BR><b>Notes:</b> If left untreated the subject will contract the flu.
<BR>
<BR><b>Severity:</b> Minor"}
if("f")
src.temp = {"<b>Name:</b> The Flu
<BR><b>Number of stages:</b> 3
<BR><b>Spread:</b> Airborne Transmission
<BR><b>Possible Cure:</b> Rest
<BR><b>Affected Species:</b> Human
<BR>
<BR><b>Notes:</b> If left untreated the subject will feel quite unwell.
<BR>
<BR><b>Severity:</b> Medium"}
if("jf")
src.temp = {"<b>Name:</b> Jungle Fever
<BR><b>Number of stages:</b> 1
<BR><b>Spread:</b> Airborne Transmission
<BR><b>Possible Cure:</b> None
<BR><b>Affected Species:</b> Monkey
<BR>
<BR><b>Notes:</b> Monkies with this disease will bite humans, causing humans to spontaneously to mutate into a monkey.
<BR>
<BR><b>Severity:</b> Medium"}
if("ca")
src.temp = {"<b>Name:</b> Clowning Around
<BR><b>Number of stages:</b> 4
<BR><b>Spread:</b> Airborne Transmission
<BR><b>Possible Cure:</b> Spaceacillin
<BR><b>Affected Species:</b> Human
<BR>
<BR><b>Notes:</b> Subjects are affected by rampant honking and a fondness for shenanigans. They may also spontaneously phase through closed airlocks.
<BR>
<BR><b>Severity:</b> Laughable"}
if("p")
src.temp = {"<b>Name:</b> Plasmatoid
<BR><b>Number of stages:</b> 3
<BR><b>Spread:</b> Airborne Transmission
<BR><b>Possible Cure:</b> Inaprovaline
<BR><b>Affected Species:</b> Human and Monkey
<BR>
<BR><b>Notes:</b> With this disease the victim will need plasma to breathe.
<BR>
<BR><b>Severity:</b> Major"}
if("dna")
src.temp = {"<b>Name:</b> Space Rhinovirus
<BR><b>Number of stages:</b> 4
<BR><b>Spread:</b> Airborne Transmission
<BR><b>Possible Cure:</b> Spaceacillin
<BR><b>Affected Species:</b> Human
<BR>
<BR><b>Notes:</b> This disease transplants the genetic code of the intial vector into new hosts.
<BR>
<BR><b>Severity:</b> Medium"}
if("bot")
src.temp = {"<b>Name:</b> Robot Transformation
<BR><b>Number of stages:</b> 5
<BR><b>Spread:</b> Infected food
<BR><b>Possible Cure:</b> None
<BR><b>Affected Species:</b> Human
<BR>
<BR><b>Notes:</b> This disease, actually acute nanomachine infection, converts the victim into a cyborg.
<BR>
<BR><b>Severity:</b> Major"}
if("mgn")
src.temp = {"<b>Name:</b> Magnitis
<BR><b>Number of stages:</b> 4
<BR><b>Spread:</b> Airborne
<BR><b>Possible Cure:</b> Iron
<BR><b>Affected Species:</b> Human
<BR>
<BR><b>Notes:</b> This disease disrupts the magnetic field of your body, making it act as if a powerful magnet. Injections of iron help stabilize the field.
<BR>
<BR><b>Severity:</b> Medium"}
<BR><b>Severity:</b> [Dis.severity]"}
del(Dis)
if (href_list["del_all"])
src.temp = text("Are you sure you wish to delete all records?<br>\n\t<A href='?src=\ref[];temp=1;del_all2=1'>Yes</A><br>\n\t<A href='?src=\ref[];temp=1'>No</A><br>", src, src)

View File

@@ -68,6 +68,9 @@ datum/controller/game_controller
sleep(-1)
for(var/datum/disease/D in active_diseases)
D.process()
for(var/obj/machinery/machine in machines)
machine.process()

View File

@@ -247,7 +247,7 @@
target.alien_egg_flag = 1
var/mob/trg = target
src.death()
trg.contract_disease(new /datum/disease/alien_embryo, 1)
trg.contract_disease(new /datum/disease/alien_embryo)
return
else
sleep(50)

View File

@@ -280,8 +280,8 @@
//This is fine for the alien
handle_virus_updates()
if(src.bodytemperature > 406)
src.resistances += src.virus
src.virus = null
src.virus.cure()
return
if(!src.virus)
if(prob(40))

View File

@@ -534,8 +534,8 @@
handle_virus_updates()
if(src.bodytemperature > 406)
src.resistances += src.virus
src.virus = null
src.virus.cure()
return
if(!src.virus)
if(prob(40))

View File

@@ -456,7 +456,7 @@
handle_virus_updates()
if(src.bodytemperature > 406)
src.resistances += src.virus
src.virus = null
del(src.virus)
if(!src.virus)
if(prob(40))

View File

@@ -801,39 +801,9 @@
handle_virus_updates()
if(src.bodytemperature > 406)
src.resistances += src.virus
src.virus = null
src.virus.cure()
return
if(!src.virus)
if(prob(40))
for(var/mob/living/carbon/M in oviewers(4, src))
if(M.virus && M.virus.spread == "Airborne")
if(M.virus.affected_species.Find("Human"))
if(src.resistances.Find(M.virus.type))
continue
var/datum/disease/D = new M.virus.type //Making sure strain_data is preserved
D.strain_data = M.virus.strain_data
src.contract_disease(D)
for(var/obj/decal/cleanable/blood/B in view(4, src))
if(B.virus && B.virus.spread == "Airborne")
if(B.virus.affected_species.Find("Human"))
if(src.resistances.Find(B.virus.type))
continue
var/datum/disease/D = new B.virus.type
D.strain_data = B.virus.strain_data
src.contract_disease(D)
for(var/obj/decal/cleanable/xenoblood/X in view(4, src))
if(X.virus && X.virus.spread == "Airborne")
if(X.virus.affected_species.Find("Human"))
if(src.resistances.Find(X.virus.type))
continue
var/datum/disease/D = new X.virus.type
D.strain_data = X.virus.strain_data
src.contract_disease(D)
else
src.virus.stage_act()
check_if_buckled()
if (src.buckled)

View File

@@ -554,39 +554,8 @@
handle_virus_updates()
if(src.bodytemperature > 406)
src.resistances += src.virus
src.virus = null
if(!src.virus)
if(prob(40))
for(var/mob/living/carbon/M in oviewers(4, src))
if(M.virus && M.virus.spread == "Airborne")
if(M.virus.affected_species.Find("Monkey"))
if(src.resistances.Find(M.virus.type))
continue
var/datum/disease/D = new M.virus.type //Making sure strain_data is preserved
D.strain_data = M.virus.strain_data
src.contract_disease(D)
for(var/obj/decal/cleanable/blood/B in view(4, src))
if(B.virus && B.virus.spread == "Airborne")
if(B.virus.affected_species.Find("Monkey"))
if(src.resistances.Find(B.virus.type))
continue
var/datum/disease/D = new B.virus.type
D.strain_data = B.virus.strain_data
src.contract_disease(D)
for(var/obj/decal/cleanable/xenoblood/X in view(4, src))
if(X.virus && X.virus.spread == "Airborne")
if(X.virus.affected_species.Find("Monkey"))
if(src.resistances.Find(X.virus.type))
continue
var/datum/disease/D = new X.virus.type
D.strain_data = X.virus.strain_data
src.contract_disease(D)
else
src.virus.stage_act()
src.virus.cure()
return
check_if_buckled()
if (src.buckled)