mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Advanced Disease Rework (#28451)
* Reworks cures, adds strains, adds treatment chems to symptoms
* Enables coexistence of different samples of the same strain at different stages within the same container
* Adds symptom guessing. Correct guesses reduce analysis time and wrong ones increase it.
* Adds a chance for a virus to evolve into a new strain. changing the cure and adding/subtracting symptoms
* Revert "Adds a chance for a virus to evolve into a new strain. changing the cure and adding/subtracting symptoms"
This reverts commit 124dd485c7.
* Adds spontaneous virus mutations, strain tracking. Removes antibody metabolism
* change the amount of time added/reduced by each factor
* Creates a disease outbreak event that allows admins to cause an outbreak of a virus of their choosing. Allows virus creation when choosing virus to give someone or for an outbreak.
* The normal base property values are now the defaults for disease creation
* Rebuild TGUI
* Rebuild TGUI
* Rebuild TGUI
* Update tgui.bundle.js
* remove redundant lines
* improves ui some and moves to using world time for analysis time
* fixes a bug with the analysis time and updates the initial known advanced disease list
* Buffs the disease outbreak event and adds a base stat row to the PANDEMIC
* Update tgui.bundle.js
* Implements calibration
* Adds a remove from database button
* Moves the known disease global list to work per z level
* Removes treatments from most chems and makes each instance of a symptom not acting purge some of the reagent that treated it
* Update symptoms.dm
* Adds stage to unknown diseases
* Moves accumulated error to work per z level and change the location of the delete strain data button
* Adds confirmation to the delete data button and moves the disease text out of the loop in the copy constructor
* fix indentation
* Replaces pent with hydrocodone in the advanced cure list
* gives more buffs to event disease based on severity. removes longevity from possible symptoms an event disease can get. Fixes a bug with determining analysis time
* Update tgui.bundle.js
* Update pandemic.dm
* Update pandemic.dm
* Update tgui.bundle.js
* review changes
* Update tgui.bundle.js
* Update tgui.bundle.js
* Update tgui.bundle.js
* Update tgui.bundle.js
* Update tgui.bundle.js
* Update tgui.bundle.js
* Update tgui.bundle.js
* Update tgui.bundle.js
* review changes
* Update tgui.bundle.js
* Makes vaccines only add resistances and no longer cure
* improves pandemic ui and fixes calibration button not being properly disabled
* Update tgui.bundle.js
* Add the new agars to the virologist's fridge
* lowered evolution chance of viruses a bit
* further lowers evolution chance
* Update advance.dm
* Changes the scaling of analysis time and fixes stage speed presentation in the pandemic
* Scanners can now see virus strains that have been inserted in the pandemic
* Allows a mob to be infected by both an event and non event disease
* Fixes the +1 syringe of translocation stabbing your feet
* Update tgui.bundle.js
* Changes spontanous mutation to be per spread and makes disease events less likely.
* Diseases less common, mutations happen only on spread now, symptom list ordered alphabetically in the dropdown, fixed some bugs
* Update tgui.bundle.js
* changes virus alerts
* Removes numbers from the virus alert text and fixes a bug that caused excessive virus mutations
* Update tgui.bundle.js
* refactor disease spread
* Changes disease spread logic to give players options to protect themselves and others
* Blackbox things
* Increases announcement timer and fixes the infection talley
* Update disease_outbreak.dm
* Adds an incubation period to advanced viruses. bumps sneeze back to 5 range
* Adds failsafe to disease outbreaks that will infect a random crew member if none have arrived in 10 minutes
* Only record advanced disease infections
* Properly handle recording of disease infection events
* Changed resistance effect on cure
* another adjustment to res effect on cure
* Small resist buff, spontanous combustion buff and some calculation fixes
* changes spontanous combustion stat bonuses and maluses
* Update flesh_eating.dm
* Update flesh_eating.dm
* Update flesh_eating.dm
* Big trait changes and rebalance
* adds treatments to fire and necro
* Introduces viral contamination of food and reagent containers, as well as disinfection
* Fix runtime in reagent transfers
* Revert the prefs and config changes
* Slowed down diseases and made symptoms more gradual, improved disease alerts to both crew and dchat
* Sterilizine now sterilizes things contaminated with viruses. Heat reactions now take place alongside chemical reactions when adding reagents to a beaker
* Adds option to order sterile masks, goggles and biosuits in packs of 4. Makes sterile masks as good as internals for viruses
* adds logging to pandemic
* Changes symptom stats and increased disease varaiety
* Fixes some disease bugs
* Fixes some bugs and makes it behave better
* Adds shiver emote to shiver symptom
* Adds admin message/log to contracting an event disease and fixes copy behaviour when infecting
* Prefix spread defines
* Change the rest of the macros
* correct the disinfection temp macro
* Moves disease signals to their own file
* move disnifection temp back
* fix a type
* viral contaminations component review changes
* var name changes
* more style fixes
* Update tgui.bundle.js
* fixes pandemic
* Fixes disease outbreak having two carriers sometimes and changes the virus alert to the new one
* Update disease_defines.dm
* fixes samples not passing stages on properly
* actually fixes the bug
* Fixes stabilization being lost on cloning
* Finally completely and absolutely fixes the sample stages bug(please)
* Makes the pandemic a machine
* Update pandemic.dm
* removed drinks from cure requirements
* lowers chance of major viral outbreak
* fixes pandemic not processing properly
* Changes the cure system to have more options
* Makes mixing event viruses more random
* Fixes hardsuits having a 1% chance to be infected
* Increases virus protection of most clothing. medical scrubs and surgical hat buffed sunstantially
* Slow down progress of diseases
* makes spread less likely
* envirosuit is now slightly more protective from viruses, while the medical one is as good as scrubs
* Adds further protection to helmets
* Increases the number of possible cures and the scaling of required cures
* Pandemic ui improvements
* Update _disease.dm
* fix a bug with spread target in the disease outbreak event
* changes some clothing permeability
* Adds the ability to make viral DNA extracts by injecting a sample into a black slime core. It's equivalent to 2 stages
* Adds age to health analyzer, makes viral evolution toggle minor disabilities, confusion symptom now confuses more often
* Update pandemic.dm
* replace lazarus with acetic acid in the cures
* Changes the relation of the amount of cure options to required cures and the scaling of required cures with resistance
* Fixes virus renaming
* changes description and permeability of some medical jumpsuits
* Adds a list of all diseases infecting client mobs to the disease outbreak event
* uses event UID instead of ref in the disease
* Adds advanced disease carriers to admin antag menu
* Adds viral eraser which removes tracking and stabilizing. Admin spawn only for now
* Update tgui.bundle.js
* Adds the ability to create viral genetic material using radiation. it can be used in addition to that produced in xenobio
* changes alert logic, disease generation logic, adds treatments to weakness, cough and sneeze now more gradual and cough spreads at range 3
* makes disease advance a bit faster
* reduce time to announcement to 6 minutes after 3 people are infected
* Changes medibot disease detection to be the same as analyzers. Treatment chems now put the symptom on a cooldown that persists after they leave the body.
* Make sure the disease outbreak event only selects crew
* Fix abductor virus gland virus generation
* Adds sterilizine to viro locker
* Fixes null viruses appearing when merging virusless blood
* Adds oculine to hyphema treatments
* Rebalances weight loss and flesh eating
* Improvements to advanced disease carrier tab on the TGUI antag menu
* change the flag on away missions
* Update mob_spawn.dm
* Update tgui.bundle.js
* adds sterilizine recipe back
* Adds viral contamination to surgery tools and surgery steps
* small changes
* fixes pandemic ui. should work properly now(I hope)
* CI compliance
* Update flesh_eating.dm
* Update vomit.dm
* Update tgui.bundle.js
* Initial revision of analysis and fixes the UI issue with multiple stage samples
* refactors treatment and makes treatment chems more adjustable
* var correction
* symptoms and their contribution now show up on the pandemic
* Update tgui.bundle.js
* Update code/datums/diseases/advance/symptoms/cough.dm
Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com>
* change wizard disease and zombie disease macros to new ones
* Update tgui.bundle.js
* changes the part requirements on the pandemic boards to fit the actual parts
* fix misbehaviour when inserting samples without symptoms
* Some changes to difficulty scaling, reverts the level of projectile vomiting back to 4, and disallows germaphobes to avoid infection by injection
* Adds viral contamination to IV bags
---------
Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
co-authored by
Burzah
parent
4f77a856f0
commit
a5260456ae
@@ -1,5 +1,9 @@
|
||||
GLOBAL_LIST_EMPTY(current_pending_diseases)
|
||||
/datum/event/disease_outbreak
|
||||
// We only want the announcement to happen after the virus has spawned on station
|
||||
announceWhen = -1
|
||||
// Keep the event running until we announce it
|
||||
noAutoEnd = TRUE
|
||||
/// The type of disease that patient zero will be infected with.
|
||||
var/datum/disease/chosen_disease
|
||||
|
||||
@@ -11,6 +15,8 @@ GLOBAL_LIST_EMPTY(current_pending_diseases)
|
||||
var/static/list/transmissable_symptoms = list()
|
||||
var/static/list/diseases_minor = list()
|
||||
var/static/list/diseases_moderate_major = list()
|
||||
var/force_disease_time = 300
|
||||
var/list/infected_players = list()
|
||||
|
||||
/datum/event/disease_outbreak/setup()
|
||||
if(isemptylist(diseases_minor) && isemptylist(diseases_moderate_major))
|
||||
@@ -18,49 +24,90 @@ GLOBAL_LIST_EMPTY(current_pending_diseases)
|
||||
if(isemptylist(transmissable_symptoms))
|
||||
populate_symptoms()
|
||||
var/datum/disease/virus
|
||||
if(prob(50))
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MUNDANE)
|
||||
virus = pick(diseases_minor)
|
||||
if(EVENT_LEVEL_MODERATE)
|
||||
// Either choose a type to create a normal disease from or create an advanced disease
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MUNDANE)
|
||||
virus = pick(diseases_minor)
|
||||
if(EVENT_LEVEL_MODERATE)
|
||||
if(prob(50))
|
||||
virus = pick(diseases_moderate_major)
|
||||
else
|
||||
stack_trace("Disease Outbreak: Invalid Event Level [severity]. Expected: 1-2")
|
||||
virus = /datum/disease/cold
|
||||
chosen_disease = new virus()
|
||||
else
|
||||
if(severity == EVENT_LEVEL_MODERATE)
|
||||
chosen_disease = create_virus(severity * pick(2,3)) //50% chance for a major disease instead of a moderate one
|
||||
else
|
||||
chosen_disease = create_virus(severity * 2)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
chosen_disease = create_virus(severity * 2)
|
||||
if(virus)
|
||||
chosen_disease = new virus
|
||||
|
||||
chosen_disease.carrier = TRUE
|
||||
|
||||
/datum/event/disease_outbreak/start()
|
||||
GLOB.current_pending_diseases += chosen_disease
|
||||
GLOB.current_pending_diseases += list(list("disease" = chosen_disease, "event" = src))
|
||||
for(var/mob/M as anything in GLOB.dead_mob_list) //Announce outbreak to dchat
|
||||
if(istype(chosen_disease, /datum/disease/advance))
|
||||
var/datum/disease/advance/temp_disease = chosen_disease.Copy()
|
||||
to_chat(M, "<span class='deadsay'><b>Disease outbreak:</b> The next new arrival is a carrier of [chosen_disease.name]! A \"[chosen_disease.severity]\" disease with the following symptoms: [english_list(temp_disease.symptoms)]</span>")
|
||||
var/datum/disease/advance/temp_disease = chosen_disease
|
||||
to_chat(M, chat_box_examine("<span class='deadsay'><b>Disease outbreak:</b> The next new arrival is a carrier of [chosen_disease.name]! A \"[chosen_disease.severity]\" disease with the following symptoms:\n[english_list(temp_disease.symptoms)]\nand the following stats:\n[english_map(temp_disease.GenerateProperties())]</span>"))
|
||||
else
|
||||
to_chat(M, "<span class='deadsay'><b>Disease outbreak:</b> The next new arrival is a carrier of a \"[chosen_disease.severity]\" disease: [chosen_disease.name]!</span>")
|
||||
to_chat(M, chat_box_examine("<span class='deadsay'><b>Disease outbreak:</b> The next new arrival is a carrier of a \"[chosen_disease.severity]\" disease: [chosen_disease.name]!</span>"))
|
||||
|
||||
/datum/event/disease_outbreak/announce()
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
GLOB.major_announcement.Announce("Lethal viral pathogen detected aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/effects/siren-spooky.ogg', new_sound2 = 'sound/AI/outbreak_virus.ogg')
|
||||
if(EVENT_LEVEL_MODERATE)
|
||||
GLOB.minor_announcement.Announce("Moderate contagion detected aboard [station_name()].", new_sound = 'sound/misc/notice2.ogg', new_title = "Contagion Alert")
|
||||
if(EVENT_LEVEL_MUNDANE)
|
||||
GLOB.minor_announcement.Announce("Minor contagion detected aboard [station_name()].", new_sound = 'sound/misc/notice2.ogg', new_title = "Contagion Alert")
|
||||
// We did our announcement, the event no longer needs to run
|
||||
kill()
|
||||
|
||||
/datum/event/disease_outbreak/process()
|
||||
if(activeFor == force_disease_time)
|
||||
for(var/list/disease_event in GLOB.current_pending_diseases)
|
||||
if(chosen_disease == disease_event["disease"])
|
||||
for(var/mob/living/carbon/human/player in GLOB.player_list)
|
||||
if((player.name in GLOB.crew_list) && player.ForceContractDisease(chosen_disease, TRUE, TRUE))
|
||||
GLOB.current_pending_diseases -= list(disease_event)
|
||||
break
|
||||
break
|
||||
if(length(infected_players) > 2 && announceWhen <= 0)
|
||||
announceWhen = activeFor + 180
|
||||
. = ..()
|
||||
|
||||
//Creates a virus with a harmful effect, guaranteed to be spreadable by contact or airborne
|
||||
/datum/event/disease_outbreak/proc/create_virus(max_severity = 6)
|
||||
var/datum/disease/advance/A = new /datum/disease/advance
|
||||
A.symptoms = A.GenerateSymptomsBySeverity(max_severity - 1, max_severity, 2) //Choose "Payload" symptoms
|
||||
A.AssignProperties(A.GenerateProperties())
|
||||
var/list/symptoms_to_try = transmissable_symptoms.Copy()
|
||||
while(length(symptoms_to_try))
|
||||
if(A.spread_text != "Blood")
|
||||
break
|
||||
if(length(A.symptoms) < VIRUS_SYMPTOM_LIMIT) //Ensure the virus is spreadable by adding symptoms that boost transmission
|
||||
var/datum/symptom/TS = pick_n_take(symptoms_to_try)
|
||||
A.AddSymptom(new TS)
|
||||
else
|
||||
popleft(A.symptoms) //We have a full symptom list but are still not transmittable. Try removing one of the "payloads"
|
||||
var/datum/disease/advance/A = new /datum/disease/advance(_event = UID())
|
||||
A.clear_symptoms()
|
||||
// Base properties get buffs depending on severity
|
||||
var/list/properties_to_buff = A.base_properties.Copy() - list("transmissibility")
|
||||
for(var/i = 0, i < max_severity / 2, i++)
|
||||
A.base_properties[pick(properties_to_buff)]++
|
||||
A.base_properties["stealth"] += max_severity // Stealth gets an additional bonus since most symptoms reduce it a fair bit.
|
||||
var/spread_threhsold = 4
|
||||
// Chance for it to be extra spready, scales quadratically with severity
|
||||
if(prob((max_severity ** 2) * 3))
|
||||
spread_threhsold = 5
|
||||
if(prob((max_severity ** 2) * 1.5))
|
||||
spread_threhsold = 6
|
||||
|
||||
// If we have extra spread include either cough or sneeze
|
||||
if(spread_threhsold >= 5)
|
||||
var/symptom_path = pick(/datum/symptom/cough, /datum/symptom/sneeze)
|
||||
A.add_symptom_path(symptom_path)
|
||||
|
||||
// Generate payload. 2-3 symptoms that actually do something
|
||||
A.symptoms += A.GenerateSymptomsBySeverity(max_severity - 1, max_severity, 1)
|
||||
A.symptoms += A.GenerateSymptomsBySeverity(max_severity - 3, max_severity - 1, rand(1, 2))
|
||||
|
||||
var/symptom_list = transmissable_symptoms.Copy()
|
||||
|
||||
// Add symptoms that increase transmittability to fill the rest
|
||||
while(length(A.symptoms) < VIRUS_SYMPTOM_LIMIT)
|
||||
var/symptom_path = pick_n_take(symptom_list)
|
||||
A.add_symptom_path(symptom_path)
|
||||
|
||||
// Add extra transmissibility through base properties as needed
|
||||
A.base_properties["transmissibility"] = max(0, spread_threhsold - (A.totaltransmissibility() - length(A.symptoms)))
|
||||
|
||||
A.AssignProperties(A.GenerateProperties())
|
||||
A.name = pick(GLOB.alphabet_uppercase) + num2text(rand(1,9)) + pick(GLOB.alphabet_uppercase) + num2text(rand(1,9)) + pick("v", "V", "-" + num2text(GLOB.game_year), "")
|
||||
A.Refresh()
|
||||
return A
|
||||
@@ -71,13 +118,15 @@ GLOBAL_LIST_EMPTY(current_pending_diseases)
|
||||
if(is_type_in_list(CD, disease_blacklist))
|
||||
continue
|
||||
switch(CD.severity)
|
||||
if(NONTHREAT, MINOR)
|
||||
if(VIRUS_NONTHREAT, VIRUS_MINOR)
|
||||
diseases_minor += candidate
|
||||
if(MEDIUM, HARMFUL, DANGEROUS, BIOHAZARD)
|
||||
if(VIRUS_MEDIUM, VIRUS_HARMFUL, VIRUS_DANGEROUS, VIRUS_BIOHAZARD)
|
||||
diseases_moderate_major += candidate
|
||||
|
||||
/datum/event/disease_outbreak/proc/populate_symptoms()
|
||||
for(var/candidate in subtypesof(/datum/symptom))
|
||||
// Disease events shouldn't just resolve themselves
|
||||
var/list/candidate_list = subtypesof(/datum/symptom) - /datum/symptom/heal/longevity
|
||||
for(var/candidate in candidate_list)
|
||||
var/datum/symptom/CS = candidate
|
||||
if(initial(CS.transmittable) > 1)
|
||||
if(initial(CS.transmissibility) > 0)
|
||||
transmissable_symptoms += candidate
|
||||
|
||||
@@ -209,7 +209,8 @@ GLOBAL_LIST_EMPTY(event_last_fired)
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Slaughter Demon", /datum/event/spawn_slaughter, 20, is_one_shot = TRUE),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Shadow Demon", /datum/event/spawn_slaughter/shadow, 20, is_one_shot = TRUE),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Demonic Incursion", /datum/event/demon_incursion, 20, list(ASSIGNMENT_SECURITY = 3)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Immovable Rod", /datum/event/immovable_rod, 0, list(ASSIGNMENT_ENGINEER = 10), TRUE)
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Immovable Rod", /datum/event/immovable_rod, 0, list(ASSIGNMENT_ENGINEER = 10), TRUE),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Disease Outbreak", /datum/event/disease_outbreak, 15, list(ASSIGNMENT_MEDICAL = 4), TRUE),
|
||||
//new /datum/event_meta(EVENT_LEVEL_MAJOR, "Floor Cluwne", /datum/event/spawn_floor_cluwne, 15, is_one_shot = TRUE)
|
||||
//new /datum/event_meta(EVENT_LEVEL_MAJOR, "Pulse Demon Infiltration", /datum/event/spawn_pulsedemon, 20, is_one_shot = TRUE)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user