From af523d3e8fb12c8d2ec15414efab892756f78386 Mon Sep 17 00:00:00 2001 From: "giacomand@gmail.com" Date: Sun, 25 Nov 2012 21:32:07 +0000 Subject: [PATCH] Added a new symptom with a high level, so that it's not possible to gain through mutations. Gave the high level symptoms their own preset diseases and added them to the virus crate, along with a bottle of mutagen. Several disease fixes, such as disease stages going below 0. Diseases which spread by blood will longer spread when you touch someone (i.e: click on someone) I also did some cleaning up with comments. Made handheld radios broadcast if their messages aren't sent on the same level as they're on, meaning that turning off the relay to the station will not make it impossible to communicate with others with radios. Made some events only effect people on the station Z level. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5192 316c924e-a436-60f5-8080-3fe189b3f50e --- code/datums/disease.dm | 13 +++- code/datums/diseases/advance/cold.dm | 5 -- code/datums/diseases/advance/flu.dm | 5 -- code/datums/diseases/advance/presets.dm | 34 ++++++++++ .../advance/symptoms/damage_converter.dm | 2 +- .../diseases/advance/symptoms/voice_change.dm | 4 +- code/datums/supplypacks.dm | 5 +- code/game/gamemodes/events.dm | 9 +++ .../game/objects/items/devices/radio/radio.dm | 4 +- .../mob/living/carbon/alien/humanoid/life.dm | 3 - .../mob/living/carbon/alien/larva/life.dm | 3 - code/modules/mob/living/carbon/brain/life.dm | 3 - code/modules/mob/living/carbon/carbon.dm | 67 ++++--------------- .../modules/mob/living/carbon/metroid/life.dm | 3 - code/modules/reagents/Chemistry-Reagents.dm | 19 +----- .../reagent_containers/glass/bottle.dm | 22 ++++++ html/changelog.html | 10 ++- 17 files changed, 108 insertions(+), 103 deletions(-) delete mode 100644 code/datums/diseases/advance/cold.dm delete mode 100644 code/datums/diseases/advance/flu.dm create mode 100644 code/datums/diseases/advance/presets.dm diff --git a/code/datums/disease.dm b/code/datums/disease.dm index 0c4d3fb6f50..a05b945f6b7 100644 --- a/code/datums/disease.dm +++ b/code/datums/disease.dm @@ -63,13 +63,15 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease if(stage > max_stages) stage = max_stages - if(stage_prob != 0 && prob(stage_prob) && stage != max_stages && !cure_present) //now the disease shouldn't get back up to stage 4 in no time + + if(stage < max_stages && prob(stage_prob) && !cure_present) //now the disease shouldn't get back up to stage 4 in no time stage++ //world << "up" - if(cure_present && prob(cure_chance)) + if(stage > 0 && (cure_present && prob(cure_chance))) stage-- //world << "down" - else if(stage <= 1 && ((prob(1) && curable) || (cure_present && prob(cure_chance)))) + + if(stage <= 1 && ((prob(1) && curable) || (cure_present && prob(cure_chance)))) // world << "Cured as stage act" cure() return @@ -96,6 +98,11 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease return result +/datum/disease/proc/spread_by_touch() + switch(spread_type) + if(CONTACT_FEET, CONTACT_HANDS, CONTACT_GENERAL) + return 1 + return 0 /datum/disease/proc/spread(var/atom/source=null, var/airborne_range = 2, var/force_spread) //world << "Disease [src] proc spread was called from holder [source]" diff --git a/code/datums/diseases/advance/cold.dm b/code/datums/diseases/advance/cold.dm deleted file mode 100644 index 3392b5f7ecf..00000000000 --- a/code/datums/diseases/advance/cold.dm +++ /dev/null @@ -1,5 +0,0 @@ -/datum/disease/advance/cold/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0) - if(!D) - name = "Cold" - symptoms = list(new/datum/symptom/sneeze) - ..(process, D, copy) diff --git a/code/datums/diseases/advance/flu.dm b/code/datums/diseases/advance/flu.dm deleted file mode 100644 index b661f4f1bfd..00000000000 --- a/code/datums/diseases/advance/flu.dm +++ /dev/null @@ -1,5 +0,0 @@ -/datum/disease/advance/flu/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0) - if(!D) - name = "Flu" - symptoms = list(new/datum/symptom/cough) - ..(process, D, copy) diff --git a/code/datums/diseases/advance/presets.dm b/code/datums/diseases/advance/presets.dm new file mode 100644 index 00000000000..b0ff058950a --- /dev/null +++ b/code/datums/diseases/advance/presets.dm @@ -0,0 +1,34 @@ +// Cold + +/datum/disease/advance/cold/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0) + if(!D) + name = "Cold" + symptoms = list(new/datum/symptom/sneeze) + ..(process, D, copy) + + +// Flu + +/datum/disease/advance/flu/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0) + if(!D) + name = "Flu" + symptoms = list(new/datum/symptom/cough) + ..(process, D, copy) + + +// Voice Changing + +/datum/disease/advance/voice_change/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0) + if(!D) + name = "Epiglottis Mutation" + symptoms = list(new/datum/symptom/voice_change) + ..(process, D, copy) + + +// Toxin Filter + +/datum/disease/advance/heal/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0) + if(!D) + name = "Liver Enhancer" + symptoms = list(new/datum/symptom/heal) + ..(process, D, copy) \ No newline at end of file diff --git a/code/datums/diseases/advance/symptoms/damage_converter.dm b/code/datums/diseases/advance/symptoms/damage_converter.dm index adcce74aba8..6e31e363c8a 100644 --- a/code/datums/diseases/advance/symptoms/damage_converter.dm +++ b/code/datums/diseases/advance/symptoms/damage_converter.dm @@ -15,7 +15,7 @@ Bonus ////////////////////////////////////// */ -/datum/symptom/damage_converter // Not the egg +/datum/symptom/damage_converter name = "Toxic Compensation" stealth = 1 diff --git a/code/datums/diseases/advance/symptoms/voice_change.dm b/code/datums/diseases/advance/symptoms/voice_change.dm index 3ce187a2554..655cbc65c10 100644 --- a/code/datums/diseases/advance/symptoms/voice_change.dm +++ b/code/datums/diseases/advance/symptoms/voice_change.dm @@ -38,9 +38,9 @@ Bonus var/random_name = "" switch(H.gender) if(MALE) - random_name = (pick(first_names_male)) + random_name = pick(first_names_male) else - random_name = (pick(first_names_female)) + random_name = pick(first_names_female) random_name += " [pick(last_names)]" H.SetSpecialVoice(random_name) diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 5134c66178a..c67c2b1158a 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -280,12 +280,13 @@ name = "Virus crate" contains = list(/obj/item/weapon/reagent_containers/glass/bottle/flu_virion, /obj/item/weapon/reagent_containers/glass/bottle/cold, + /obj/item/weapon/reagent_containers/glass/bottle/epiglottis_virion, + /obj/item/weapon/reagent_containers/glass/bottle/liver_enhance_virion, /obj/item/weapon/reagent_containers/glass/bottle/fake_gbs, /obj/item/weapon/reagent_containers/glass/bottle/magnitis, -// /obj/item/weapon/reagent_containers/glass/bottle/wizarditis, worse than GBS if anything -// /obj/item/weapon/reagent_containers/glass/bottle/gbs, No. Just no. /obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat, /obj/item/weapon/reagent_containers/glass/bottle/brainrot, + /obj/item/weapon/reagent_containers/glass/bottle/mutagen, /obj/item/weapon/storage/syringes, /obj/item/weapon/storage/beakerbox) cost = 20 diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index d435ff2d6fd..0024a2b6376 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -232,6 +232,9 @@ for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) var/foundAlready = 0 // don't infect someone that already has the virus + var/turf/T = get_turf(H) + if(T.z != 1) + continue for(var/datum/disease/D in H.viruses) foundAlready = 1 if(H.stat == 2 || foundAlready) @@ -298,6 +301,9 @@ sleep(100) */ for(var/mob/living/carbon/human/H in living_mob_list) + var/turf/T = get_turf(H) + if(T.z != 1) + continue if(istype(H,/mob/living/carbon/human)) H.apply_effect((rand(15,75)),IRRADIATE,0) if (prob(5)) @@ -310,6 +316,9 @@ randmutg(H) domutcheck(H,null,1) for(var/mob/living/carbon/monkey/M in living_mob_list) + var/turf/T = get_turf(M) + if(T.z != 1) + continue M.apply_effect((rand(15,75)),IRRADIATE,0) sleep(100) command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert") diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 03a9949f712..89de7b0b10a 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -382,11 +382,11 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use sleep(rand(10,25)) // wait a little... - if(signal.data["done"]) + if(signal.data["done"] && position.z in signal.data["level"]) // we're done here. return - // Oh my god; the comms are down or something because the signal hasn't been broadcasted yet. + // Oh my god; the comms are down or something because the signal hasn't been broadcasted yet in our level. // Send a mundane broadcast with limited targets: //THIS IS TEMPORARY. diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index 4824afb08b2..d53ac234782 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -47,9 +47,6 @@ //to find it. blinded = null - //Disease Check - //handle_virus_updates() There is no disease that affects aliens - //Handle temperature/pressure differences between body and environment handle_environment(environment) diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index f72f0be4a72..b2cb0ca4d75 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -41,9 +41,6 @@ //to find it. blinded = null - //Disease Check - //handle_virus_updates() There is no disease that affects larva - //Handle temperature/pressure differences between body and environment handle_environment(enviroment) diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 4a4ef395161..af049258bb8 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -10,9 +10,6 @@ //Chemicals in the body handle_chemicals_in_body() - //Disease Check - //handle_virus_updates() There is no disease that affects brains - var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE if(loc) environment = loc.return_air() diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index e761b40673d..ad18c2a59d2 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -52,36 +52,17 @@ 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 + world << "1 [D.spread]" + if(D.spread_by_touch()) + world << "1 contract" + M.contract_disease(D, 0, 1, CONTACT_HANDS) 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 + world << "2 [D.spread]" + if(D.spread_by_touch()) + world << "2 contract" + contract_disease(D, 0, 1, CONTACT_HANDS) - /* // old code: doesn't support multiple viruses - if(src.virus || M.virus) - var/s_spread_type - if(src.virus && src.virus.spread_type!=SPECIAL && src.virus.spread_type!=AIRBORNE) - s_spread_type = src.virus.spread_type - src.virus.spread_type = CONTACT_HANDS - M.contract_disease(src.virus) - src.virus.spread_type = s_spread_type - - if(M.virus && M.virus.spread_type!=SPECIAL && M.virus.spread_type!=AIRBORNE) - s_spread_type = M.virus.spread_type - M.virus.spread_type = CONTACT_GENERAL - src.contract_disease(M.virus) - M.virus.spread_type = s_spread_type - */ return @@ -90,37 +71,15 @@ 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 + + if(D.spread_by_touch()) + M.contract_disease(D, 0, 1, CONTACT_HANDS) 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(D.spread_by_touch()) + contract_disease(D, 0, 1, CONTACT_HANDS) - if(src.virus || M.virus) - var/s_spread_type - if(src.virus && src.virus.spread_type!=SPECIAL && src.virus.spread_type!=AIRBORNE) - s_spread_type = src.virus.spread_type - src.virus.spread_type = CONTACT_HANDS - M.contract_disease(src.virus) - src.virus.spread_type = s_spread_type - - if(M.virus && M.virus.spread_type!=SPECIAL && M.virus.spread_type!=AIRBORNE) - s_spread_type = M.virus.spread_type - M.virus.spread_type = CONTACT_GENERAL - src.contract_disease(M.virus) - M.virus.spread_type = s_spread_type - */ return /mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0) diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index fc60aa4f819..416129e54b5 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -11,9 +11,6 @@ //Chemicals in the body handle_chemicals_in_body() - //Disease Check - //handle_virus_updates() There is no disease that affects metroids - handle_nutrition() handle_targets() diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 0d94542daac..b6b1a098f10 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -125,7 +125,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(D) + var/datum/disease/newVirus = D.Copy() blood_prop.viruses += newVirus newVirus.holder = blood_prop @@ -136,32 +136,19 @@ 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(D) + var/datum/disease/newVirus = D.Copy() blood_prop.viruses += newVirus newVirus.holder = blood_prop - /* - if(T.density==0) - newVirus.spread_type = CONTACT_FEET - else - newVirus.spread_type = CONTACT_HANDS - */ - else if(istype(self.data["donor"], /mob/living/carbon/alien)) var/obj/effect/decal/cleanable/xenoblood/blood_prop = locate() in T if(!blood_prop) 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(D) + var/datum/disease/newVirus = D.Copy() blood_prop.viruses += newVirus newVirus.holder = blood_prop - /* - if(T.density==0) - newVirus.spread_type = CONTACT_FEET - else - newVirus.spread_type = CONTACT_HANDS - */ return /* Must check the transfering of reagents and their data first. They all can point to one disease datum. diff --git a/code/modules/reagents/reagent_containers/glass/bottle.dm b/code/modules/reagents/reagent_containers/glass/bottle.dm index 0fc0d239cf6..8adb066e480 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle.dm +++ b/code/modules/reagents/reagent_containers/glass/bottle.dm @@ -118,6 +118,28 @@ var/list/data = list("viruses"= list(F)) reagents.add_reagent("blood", 20, data) +/obj/item/weapon/reagent_containers/glass/bottle/epiglottis_virion + name = "Epiglottis virion culture bottle" + desc = "A small bottle. Contains Epiglottis virion culture in synthblood medium." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + New() + ..() + var/datum/disease/F = new /datum/disease/advance/heal(0) + var/list/data = list("viruses"= list(F)) + reagents.add_reagent("blood", 20, data) + +/obj/item/weapon/reagent_containers/glass/bottle/liver_enhance_virion + name = "Liver enhancement virion culture bottle" + desc = "A small bottle. Contains liver enhancement virion culture in synthblood medium." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + New() + ..() + var/datum/disease/F = new /datum/disease/advance/voice_change(0) + var/list/data = list("viruses"= list(F)) + reagents.add_reagent("blood", 20, data) + /obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat name = "Pierrot's Throat culture bottle" desc = "A small bottle. Contains H0NI<42 virion culture in synthblood medium." diff --git a/html/changelog.html b/html/changelog.html index 8130094dfdb..9487062f944 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -48,6 +48,14 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit tho. Thanks. --> +
+

25 November 2012

+

Giacom updated:

+ +
+

23 November 2012

Giacom updated:

@@ -57,7 +65,7 @@ should be listed in the changelog upon commit tho. Thanks. -->
  • AIs in intellicards can no longer move their camera. This will limit them in ability but without making creating and carding an AI to have as a personel door opener impossible.
  • Telecommunication Busses can now be set to change the frequency of a signal. (Allowing you to say.. set the command channel to broadcast to the common channel).
  • Telecommunication was changed to be more effecient. Because of this, Relays don't need a broadcaster or a receiver and you can setup a relay on it's own. You can still disable sending and or receiving from the relay's interface.
  • - /ul> +

    Zelacks updated: