From 560eb17f9dfc24e20813f13301ebd76b30269038 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 30 Mar 2016 22:31:59 -0400 Subject: [PATCH] Fully Re-Activates Disease1 --- code/modules/events/disease_outbreak.dm | 35 +++++++++++ code/modules/events/event_container.dm | 4 +- .../events/spontaneous_appendicitis.dm | 13 ++++ code/modules/events/viral_infection.dm | 29 --------- code/modules/events/viral_outbreak.dm | 28 --------- code/modules/reagents/newchem/disease.dm | 63 +++++++++++++++++++ .../oldchem/reagents/reagents_toxin.dm | 54 ---------------- .../reagent_containers/food/snacks.dm | 3 +- code/modules/research/experimentor.dm | 2 +- paradise.dme | 2 + 10 files changed, 119 insertions(+), 114 deletions(-) create mode 100644 code/modules/events/disease_outbreak.dm create mode 100644 code/modules/events/spontaneous_appendicitis.dm delete mode 100644 code/modules/events/viral_infection.dm delete mode 100644 code/modules/events/viral_outbreak.dm diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm new file mode 100644 index 00000000000..e810b76819c --- /dev/null +++ b/code/modules/events/disease_outbreak.dm @@ -0,0 +1,35 @@ +/datum/event/disease_outbreak + announceWhen = 15 + + var/virus_type + +/datum/event/disease_outbreak/setup() + announceWhen = rand(15, 30) + +/datum/event/disease_outbreak/announce() + command_announcement.Announce("Confirmed outbreak of level 7 major viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') + +/datum/event/disease_outbreak/start() + if(!virus_type) + virus_type = pick(/datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis) + + for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) + if(issmall(H)) //don't infect monkies; that's a waste + continue + var/turf/T = get_turf(H) + if(!T) + continue + if(T.z != 1) + continue + var/foundAlready = 0 // don't infect someone that already has the virus + for(var/datum/disease/D in H.viruses) + foundAlready = 1 + break + if(H.stat == DEAD || foundAlready) + continue + + var/datum/disease/D + D = new virus_type() + D.carrier = 1 + H.AddDisease(D) + break \ No newline at end of file diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm index 448f8588b8c..8d16fd5a4cb 100644 --- a/code/modules/events/event_container.dm +++ b/code/modules/events/event_container.dm @@ -139,6 +139,7 @@ var/list/event_last_fired = list() severity = EVENT_LEVEL_MODERATE available_events = list( new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 1230), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 10), 1), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 200, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 40, list(ASSIGNMENT_SECURITY = 20)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Vines", /datum/event/spacevine, 250, list(ASSIGNMENT_ENGINEER = 10)), @@ -169,7 +170,8 @@ var/list/event_last_fired = list() new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravitational Anomaly", /datum/event/anomaly/anomaly_grav, 200), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Revenant", /datum/event/revenant, 150), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Swarmer Spawn", /datum/event/spawn_swarmer, 150, is_one_shot = 1), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Morph Spawn", /datum/event/spawn_morph, 0, is_one_shot = 1) + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Morph Spawn", /datum/event/spawn_morph, 0, is_one_shot = 1), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Disease Outbreak", /datum/event/disease_outbreak, 0, list(ASSIGNMENT_MEDICAL = 150), 1) ) /datum/event_container/major diff --git a/code/modules/events/spontaneous_appendicitis.dm b/code/modules/events/spontaneous_appendicitis.dm new file mode 100644 index 00000000000..57b860159ca --- /dev/null +++ b/code/modules/events/spontaneous_appendicitis.dm @@ -0,0 +1,13 @@ +/datum/event/spontaneous_appendicitis/start() + for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) + if(issmall(H)) //don't infect monkies; that's a waste + continue + 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 + + var/datum/disease/D = new /datum/disease/appendicitis + H.ForceContractDisease(D) + break \ No newline at end of file diff --git a/code/modules/events/viral_infection.dm b/code/modules/events/viral_infection.dm deleted file mode 100644 index 362093b62ee..00000000000 --- a/code/modules/events/viral_infection.dm +++ /dev/null @@ -1,29 +0,0 @@ -/datum/event/viral_infection - severity = 1 - -/datum/event/viral_infection/setup() - announceWhen = rand(0, 3000) - endWhen = announceWhen + 1 - severity = rand(1, 3) - -/datum/event/viral_infection/announce() - command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') - -/datum/event/viral_infection/start() - var/list/candidates = list() //list of candidate keys - for(var/mob/living/carbon/human/G in player_list) - if(G.client && G.stat != DEAD) - candidates += G - if(!candidates.len) return - candidates = shuffle(candidates)//Incorporating Donkie's list shuffle - - var/datum/disease2/disease/D = new /datum/disease2/disease - D.makerandom() - D.infectionchance = 1 - message_admins("Viral Infection: releasing strain [D.uniqueID]") - - while(severity > 0 && candidates.len) - var/mob/living/carbon/human/H = candidates[1] - H.virus2["[D.uniqueID]"] = D - candidates.Remove(candidates[1]) - severity-- diff --git a/code/modules/events/viral_outbreak.dm b/code/modules/events/viral_outbreak.dm deleted file mode 100644 index 6c24c37137e..00000000000 --- a/code/modules/events/viral_outbreak.dm +++ /dev/null @@ -1,28 +0,0 @@ -/datum/event/viral_outbreak - severity = 1 - -/datum/event/viral_outbreak/setup() - announceWhen = rand(0, 3000) - endWhen = announceWhen + 1 - severity = rand(2, 4) - -/datum/event/viral_outbreak/announce() - command_announcement.Announce("Confirmed outbreak of level 7 major viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') - -/datum/event/viral_outbreak/start() - var/list/candidates = list() //list of candidate keys - for(var/mob/living/carbon/human/G in player_list) - if(G.client && G.stat != DEAD) - candidates += G - if(!candidates.len) return - candidates = shuffle(candidates)//Incorporating Donkie's list shuffle - - var/datum/disease2/disease/D = new /datum/disease2/disease - D.makerandom() - message_admins("Viral Outbreak: releasing strain [D.uniqueID]") - - while(severity > 0 && candidates.len) - var/mob/living/carbon/human/H = candidates[1] - H.virus2["[D.uniqueID]"] = D - candidates.Remove(candidates[1]) - severity-- diff --git a/code/modules/reagents/newchem/disease.dm b/code/modules/reagents/newchem/disease.dm index 7039e7cb6ef..132859d530a 100644 --- a/code/modules/reagents/newchem/disease.dm +++ b/code/modules/reagents/newchem/disease.dm @@ -13,6 +13,69 @@ ..() +/datum/reagent/nanomachines + name = "Nanomachines" + id = "nanomachines" + description = "Microscopic construction robots." + color = "#535E66" // rgb: 83, 94, 102 + +/datum/reagent/nanomachines/on_mob_life(var/mob/living/carbon/M as mob) + if(!M) M = holder.my_atom + if(volume > 1.5) + M.ForceContractDisease(new /datum/disease/transformation/robot(0)) + ..() + + +/datum/reagent/xenomicrobes + name = "Xenomicrobes" + id = "xenomicrobes" + description = "Microbes with an entirely alien cellular structure." + color = "#535E66" // rgb: 83, 94, 102 + +/datum/reagent/xenomicrobes/on_mob_life(var/mob/living/carbon/M as mob) + if(!M) M = holder.my_atom + if(volume > 1.5) + M.ContractDisease(new /datum/disease/transformation/xeno(0)) + ..() + +/datum/reagent/fungalspores + name = "Tubercle bacillus Cosmosis microbes" + id = "fungalspores" + description = "Active fungal spores." + color = "#92D17D" // rgb: 146, 209, 125 + +/datum/reagent/fungalspores/on_mob_life(var/mob/living/carbon/M as mob) + if(!M) M = holder.my_atom + if(volume > 2.5) + M.ForceContractDisease(new /datum/disease/tuberculosis(0)) + ..() + +/datum/reagent/spore + name = "Blob Spores" + id = "spore" + description = "Spores of some blob creature thingy." + reagent_state = LIQUID + color = "#CE760A" // rgb: 206, 118, 10 + var/client/blob_client = null + var/blob_point_rate = 3 + +/datum/reagent/spore/on_mob_life(var/mob/living/M) + if(!M) M = holder.my_atom + if(holder.has_reagent("atrazine",45)) + holder.del_reagent("spore") //apparently this never metabolizes and stays in forever unless you have 45 units of atrazine in you or some stupid thing like that. + if(prob(1)) + M << "Your mouth tastes funny." + if(prob(1) && prob(25)) + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(directory[ckey(C.key)]) + blob_client = directory[ckey(C.key)] + C.gib() + if(blob_client) + var/obj/effect/blob/core/core = new(get_turf(C), 200, blob_client, blob_point_rate) + if(core.overmind && core.overmind.mind) + core.overmind.mind.name = C.name + //virus food /datum/reagent/virus_food name = "Virus Food" diff --git a/code/modules/reagents/oldchem/reagents/reagents_toxin.dm b/code/modules/reagents/oldchem/reagents/reagents_toxin.dm index 6c3b4fa5002..852fb861bb8 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_toxin.dm +++ b/code/modules/reagents/oldchem/reagents/reagents_toxin.dm @@ -396,60 +396,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/* -/datum/reagent/nanomachines - name = "Nanomachines" - id = "nanomachines" - description = "Microscopic construction robots." - reagent_state = LIQUID - color = "#535E66" // rgb: 83, 94, 102 - -/datum/reagent/nanomachines/reaction_mob(var/mob/M, var/method=TOUCH, var/volume) - src = null - if( (prob(10) && method==TOUCH) || method==INGEST) - M.contract_disease(new /datum/disease/robotic_transformation(0),1) - -/datum/reagent/xenomicrobes - name = "Xenomicrobes" - id = "xenomicrobes" - description = "Microbes with an entirely alien cellular structure." - reagent_state = LIQUID - color = "#535E66" // rgb: 83, 94, 102 - -/datum/reagent/xenomicrobes/reaction_mob(var/mob/M, var/method=TOUCH, var/volume) - src = null - if( (prob(10) && method==TOUCH) || method==INGEST) - M.contract_disease(new /datum/disease/xeno_transformation(0),1) -*/ - -/datum/reagent/spore - name = "Blob Spores" - id = "spore" - description = "Spores of some blob creature thingy." - reagent_state = LIQUID - color = "#CE760A" // rgb: 206, 118, 10 - var/client/blob_client = null - var/blob_point_rate = 3 - -/datum/reagent/spore/on_mob_life(var/mob/living/M) - if(!M) M = holder.my_atom - if (holder.has_reagent("atrazine",45)) - holder.del_reagent("spore") - if (prob(1)) - M << "\red Your mouth tastes funny." - if (prob(1) && prob(25)) - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(directory[ckey(C.key)]) - blob_client = directory[ckey(C.key)] - C.gib() - if(blob_client) - var/obj/effect/blob/core/core = new(get_turf(C), 200, blob_client, blob_point_rate) - if(core.overmind && core.overmind.mind) - core.overmind.mind.name = C.name - - return - /datum/reagent/condensedcapsaicin name = "Condensed Capsaicin" id = "condensedcapsaicin" diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index df6edbaa03f..e2a79caa340 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -846,6 +846,7 @@ New() ..() reagents.add_reagent("nutriment", 2) + reagents.add_reagent("nanomachines", 10) bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/roburgerbig @@ -857,7 +858,7 @@ New() ..() - reagents.add_reagent("nanites", 100) + reagents.add_reagent("nanomachines", 100) bitesize = 0.1 /obj/item/weapon/reagent_containers/food/snacks/xenoburger diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 62784d8c8ca..d7955228168 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -326,7 +326,7 @@ ejectItem(TRUE) if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) visible_message("[src]'s chemical chamber has sprung a leak!") - chosenchem = pick("mutationtoxin","itching_powder","sacid") + chosenchem = pick("mutationtoxin","nanomachines","sacid") var/datum/reagents/R = new/datum/reagents(15) R.my_atom = src R.add_reagent(chosenchem , 15) diff --git a/paradise.dme b/paradise.dme index 5828f4e1f83..91820aff812 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1226,6 +1226,7 @@ #include "code\modules\events\brand_intelligence.dm" #include "code\modules\events\carp_migration.dm" #include "code\modules\events\communications_blackout.dm" +#include "code\modules\events\disease_outbreak.dm" #include "code\modules\events\dust.dm" #include "code\modules\events\electrical_storm.dm" #include "code\modules\events\event.dm" @@ -1248,6 +1249,7 @@ #include "code\modules\events\slaughterevent.dm" #include "code\modules\events\spacevine.dm" #include "code\modules\events\spider_infestation.dm" +#include "code\modules\events\spontaneous_appendicitis.dm" #include "code\modules\events\tear.dm" #include "code\modules\events\undead.dm" #include "code\modules\events\vent_clog.dm"