From 6e24ca43be34731e2f3c95c0c59500e8035f7a48 Mon Sep 17 00:00:00 2001 From: XDTM Date: Mon, 9 Oct 2017 02:10:17 +0200 Subject: [PATCH] Fixes Start() of symptoms still working when neutered --- .../diseases/advance/symptoms/choking.dm | 10 ++++++++ .../diseases/advance/symptoms/confusion.dm | 3 ++- .../datums/diseases/advance/symptoms/cough.dm | 3 ++- .../diseases/advance/symptoms/deafness.dm | 3 ++- .../datums/diseases/advance/symptoms/dizzy.dm | 5 ++++ .../datums/diseases/advance/symptoms/fever.dm | 5 ++++ code/datums/diseases/advance/symptoms/fire.dm | 6 +++-- .../diseases/advance/symptoms/flesh_eating.dm | 10 ++++++++ .../diseases/advance/symptoms/genetics.dm | 23 +++++++++++++++++++ .../diseases/advance/symptoms/hallucigen.dm | 5 ++++ .../diseases/advance/symptoms/headache.dm | 5 ++++ code/datums/diseases/advance/symptoms/heal.dm | 3 ++- .../diseases/advance/symptoms/itching.dm | 5 ++++ .../diseases/advance/symptoms/narcolepsy.dm | 3 ++- .../diseases/advance/symptoms/oxygen.dm | 5 ++++ .../diseases/advance/symptoms/sensory.dm | 3 ++- .../diseases/advance/symptoms/shivering.dm | 5 ++++ .../diseases/advance/symptoms/sneeze.dm | 3 ++- .../diseases/advance/symptoms/symptoms.dm | 21 +++++++++++++++++ .../datums/diseases/advance/symptoms/viral.dm | 3 ++- .../diseases/advance/symptoms/vision.dm | 3 ++- .../diseases/advance/symptoms/voice_change.dm | 5 ++++ .../datums/diseases/advance/symptoms/vomit.dm | 3 ++- .../diseases/advance/symptoms/weight.dm | 10 ++++++++ 24 files changed, 138 insertions(+), 12 deletions(-) diff --git a/code/datums/diseases/advance/symptoms/choking.dm b/code/datums/diseases/advance/symptoms/choking.dm index f7f998f2b1..3e5b6ac2e1 100644 --- a/code/datums/diseases/advance/symptoms/choking.dm +++ b/code/datums/diseases/advance/symptoms/choking.dm @@ -32,7 +32,12 @@ Bonus Stealth 4: The symptom remains hidden until active." /datum/symptom/choking/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["stage_rate"] >= 8) symptom_delay_min = 7 symptom_delay_max = 24 @@ -100,7 +105,12 @@ Bonus var/paralysis = FALSE /datum/symptom/asphyxiation/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["stage_rate"] >= 8) paralysis = TRUE if(A.properties["transmission"] >= 8) diff --git a/code/datums/diseases/advance/symptoms/confusion.dm b/code/datums/diseases/advance/symptoms/confusion.dm index 2e252267c4..04418610e5 100644 --- a/code/datums/diseases/advance/symptoms/confusion.dm +++ b/code/datums/diseases/advance/symptoms/confusion.dm @@ -34,7 +34,8 @@ Bonus Stealth 4: The symptom remains hidden until active." /datum/symptom/confusion/Start(datum/disease/advance/A) - ..() + if(!..()) + return if(A.properties["resistance"] >= 6) brain_damage = TRUE if(A.properties["transmittable"] >= 6) diff --git a/code/datums/diseases/advance/symptoms/cough.dm b/code/datums/diseases/advance/symptoms/cough.dm index f0178576bf..d3c3ea2da8 100644 --- a/code/datums/diseases/advance/symptoms/cough.dm +++ b/code/datums/diseases/advance/symptoms/cough.dm @@ -36,7 +36,8 @@ BONUS Stealth 4: The symptom remains hidden until active." /datum/symptom/cough/Start(datum/disease/advance/A) - ..() + if(!..()) + return if(A.properties["stealth"] >= 4) suppress_warning = TRUE if(A.spread_flags &= AIRBORNE) //infect bystanders diff --git a/code/datums/diseases/advance/symptoms/deafness.dm b/code/datums/diseases/advance/symptoms/deafness.dm index c43970563d..3bae01c7a7 100644 --- a/code/datums/diseases/advance/symptoms/deafness.dm +++ b/code/datums/diseases/advance/symptoms/deafness.dm @@ -32,7 +32,8 @@ Bonus Stealth 4: The symptom remains hidden until active." /datum/symptom/deafness/Start(datum/disease/advance/A) - ..() + if(!..()) + return if(A.properties["stealth"] >= 4) suppress_warning = TRUE if(A.properties["resistance"] >= 9) //permanent deafness diff --git a/code/datums/diseases/advance/symptoms/dizzy.dm b/code/datums/diseases/advance/symptoms/dizzy.dm index cb1bf11e63..7d2a5a3bc6 100644 --- a/code/datums/diseases/advance/symptoms/dizzy.dm +++ b/code/datums/diseases/advance/symptoms/dizzy.dm @@ -31,7 +31,12 @@ Bonus Stealth 4: The symptom remains hidden until active." /datum/symptom/dizzy/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["stealth"] >= 4) suppress_warning = TRUE if(A.properties["transmittable"] >= 6) //druggy diff --git a/code/datums/diseases/advance/symptoms/fever.dm b/code/datums/diseases/advance/symptoms/fever.dm index 673835b0ed..d92fe0eef9 100644 --- a/code/datums/diseases/advance/symptoms/fever.dm +++ b/code/datums/diseases/advance/symptoms/fever.dm @@ -32,7 +32,12 @@ Bonus Resistance 10: Further increases fever intensity." /datum/symptom/fever/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["resistance"] >= 5) //dangerous fever power = 1.5 unsafe = TRUE diff --git a/code/datums/diseases/advance/symptoms/fire.dm b/code/datums/diseases/advance/symptoms/fire.dm index e12e705350..781cd6de4d 100644 --- a/code/datums/diseases/advance/symptoms/fire.dm +++ b/code/datums/diseases/advance/symptoms/fire.dm @@ -35,7 +35,8 @@ Bonus Stealth 4: The symptom remains hidden until active." /datum/symptom/fire/Start(datum/disease/advance/A) - ..() + if(!..()) + return if(A.properties["stage_rate"] >= 4) power = 1.5 if(A.properties["stage_rate"] >= 8) @@ -116,7 +117,8 @@ Bonus Transmission 8: Additionally synthesizes chlorine trifluoride and napalm inside the host." /datum/symptom/alkali/Start(datum/disease/advance/A) - ..() + if(!..()) + return if(A.properties["resistance"] >= 9) //intense but sporadic effect power = 2 symptom_delay_min = 50 diff --git a/code/datums/diseases/advance/symptoms/flesh_eating.dm b/code/datums/diseases/advance/symptoms/flesh_eating.dm index 16e2b5c065..65adb5559c 100644 --- a/code/datums/diseases/advance/symptoms/flesh_eating.dm +++ b/code/datums/diseases/advance/symptoms/flesh_eating.dm @@ -34,7 +34,12 @@ Bonus Transmission 8: Causes extreme pain to the host, weakening it." /datum/symptom/flesh_eating/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["resistance"] >= 7) //extra bleeding bleed = TRUE if(A.properties["transmittable"] >= 8) //extra stamina damage @@ -99,7 +104,12 @@ Bonus Stealth 5: The symptom remains hidden until active." /datum/symptom/flesh_death/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["stealth"] >= 5) suppress_warning = TRUE if(A.properties["stage_rate"] >= 7) //bleeding and hunger diff --git a/code/datums/diseases/advance/symptoms/genetics.dm b/code/datums/diseases/advance/symptoms/genetics.dm index 1f654f2e97..c2e1eb78b2 100644 --- a/code/datums/diseases/advance/symptoms/genetics.dm +++ b/code/datums/diseases/advance/symptoms/genetics.dm @@ -45,11 +45,20 @@ Bonus to_chat(C, "[pick("Your skin feels itchy.", "You feel light headed.")]") C.dna.remove_mutation_group(possible_mutations) for(var/i in 1 to power) +<<<<<<< HEAD C.randmut(possible_mutations) // Archive their DNA before they were infected. /datum/symptom/genetic_mutation/Start(datum/disease/advance/A) ..() +======= + C.randmut(possible_mutations) + +// Archive their DNA before they were infected. +/datum/symptom/genetic_mutation/Start(datum/disease/advance/A) + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["stealth"] >= 5) //don't restore dna after curing no_reset = TRUE if(A.properties["stage_rate"] >= 10) //mutate more often @@ -57,6 +66,7 @@ Bonus symptom_delay_max = 60 if(A.properties["resistance"] >= 8) //mutate twice power = 2 +<<<<<<< HEAD possible_mutations = (GLOB.bad_mutations | GLOB.not_good_mutations) - GLOB.mutations_list[RACEMUT] var/mob/living/carbon/M = A.affected_mob if(M) @@ -66,6 +76,19 @@ Bonus // Give them back their old DNA when cured. /datum/symptom/genetic_mutation/End(datum/disease/advance/A) +======= + possible_mutations = (GLOB.bad_mutations | GLOB.not_good_mutations) - GLOB.mutations_list[RACEMUT] + var/mob/living/carbon/M = A.affected_mob + if(M) + if(!M.has_dna()) + return + archived_dna = M.dna.struc_enzymes + +// Give them back their old DNA when cured. +/datum/symptom/genetic_mutation/End(datum/disease/advance/A) + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(!no_reset) var/mob/living/carbon/M = A.affected_mob if(M && archived_dna) diff --git a/code/datums/diseases/advance/symptoms/hallucigen.dm b/code/datums/diseases/advance/symptoms/hallucigen.dm index d4cda525ad..8869d868ce 100644 --- a/code/datums/diseases/advance/symptoms/hallucigen.dm +++ b/code/datums/diseases/advance/symptoms/hallucigen.dm @@ -32,7 +32,12 @@ Bonus Stealth 4: The virus mimics positive symptoms.." /datum/symptom/hallucigen/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["stealth"] >= 4) //fake good symptom messages fake_healthy = TRUE base_message_chance = 50 diff --git a/code/datums/diseases/advance/symptoms/headache.dm b/code/datums/diseases/advance/symptoms/headache.dm index b0665e0870..7317ecfb88 100644 --- a/code/datums/diseases/advance/symptoms/headache.dm +++ b/code/datums/diseases/advance/symptoms/headache.dm @@ -34,7 +34,12 @@ BONUS Stealth 4: Reduces headache frequency until later stages." /datum/symptom/headache/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["stealth"] >= 4) base_message_chance = 50 if(A.properties["stage_rate"] >= 6) //severe pain diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm index 869cea19da..4fba54121f 100644 --- a/code/datums/diseases/advance/symptoms/heal.dm +++ b/code/datums/diseases/advance/symptoms/heal.dm @@ -15,7 +15,8 @@ Stealth 4: Healing will no longer be visible to onlookers." /datum/symptom/heal/Start(datum/disease/advance/A) - ..() + if(!..()) + return if(A.properties["stealth"] >= 4) //invisible healing hide_healing = TRUE if(A.properties["stage_rate"] >= 6) //stronger healing diff --git a/code/datums/diseases/advance/symptoms/itching.dm b/code/datums/diseases/advance/symptoms/itching.dm index ea9156bfbd..dbe52a56fe 100644 --- a/code/datums/diseases/advance/symptoms/itching.dm +++ b/code/datums/diseases/advance/symptoms/itching.dm @@ -33,7 +33,12 @@ BONUS Stage Speed 7: The host will scrath itself when itching, causing superficial damage." /datum/symptom/itching/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["transmittable"] >= 6) //itch more often symptom_delay_min = 1 symptom_delay_max = 4 diff --git a/code/datums/diseases/advance/symptoms/narcolepsy.dm b/code/datums/diseases/advance/symptoms/narcolepsy.dm index d850d257cb..cc13d99406 100644 --- a/code/datums/diseases/advance/symptoms/narcolepsy.dm +++ b/code/datums/diseases/advance/symptoms/narcolepsy.dm @@ -30,7 +30,8 @@ Bonus Resistance 10: Causes narcolepsy more often, increasing the chance of the host falling asleep." /datum/symptom/narcolepsy/Start(datum/disease/advance/A) - ..() + if(!..()) + return if(A.properties["transmittable"] >= 7) //stamina damage stamina = TRUE if(A.properties["resistance"] >= 10) //act more often diff --git a/code/datums/diseases/advance/symptoms/oxygen.dm b/code/datums/diseases/advance/symptoms/oxygen.dm index da085ab153..850f7649ce 100644 --- a/code/datums/diseases/advance/symptoms/oxygen.dm +++ b/code/datums/diseases/advance/symptoms/oxygen.dm @@ -31,7 +31,12 @@ Bonus threshold_desc = "Resistance 8:Additionally regenerates lost blood.
" /datum/symptom/oxygen/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["resistance"] >= 8) //blood regeneration regenerate_blood = TRUE diff --git a/code/datums/diseases/advance/symptoms/sensory.dm b/code/datums/diseases/advance/symptoms/sensory.dm index dd417e50ed..e7edcff703 100644 --- a/code/datums/diseases/advance/symptoms/sensory.dm +++ b/code/datums/diseases/advance/symptoms/sensory.dm @@ -32,7 +32,8 @@ Bonus Transmission 8: Purges alcohol in the bloodstream." /datum/symptom/mind_restoration/Start(datum/disease/advance/A) - ..() + if(!..()) + return if(A.properties["resistance"] >= 6) //heal brain damage brain_heal = TRUE if(A.properties["transmittable"] >= 8) //purge alcohol diff --git a/code/datums/diseases/advance/symptoms/shivering.dm b/code/datums/diseases/advance/symptoms/shivering.dm index f40fd151d9..35d2d08cfa 100644 --- a/code/datums/diseases/advance/symptoms/shivering.dm +++ b/code/datums/diseases/advance/symptoms/shivering.dm @@ -31,7 +31,12 @@ Bonus Stage Speed 10: Further increases cooling speed." /datum/symptom/fever/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["stage_speed"] >= 5) //dangerous cold power = 1.5 unsafe = TRUE diff --git a/code/datums/diseases/advance/symptoms/sneeze.dm b/code/datums/diseases/advance/symptoms/sneeze.dm index 085b5ff592..8b5b59f71a 100644 --- a/code/datums/diseases/advance/symptoms/sneeze.dm +++ b/code/datums/diseases/advance/symptoms/sneeze.dm @@ -31,7 +31,8 @@ Bonus Stealth 4: The symptom remains hidden until active." /datum/symptom/sneeze/Start(datum/disease/advance/A) - ..() + if(!..()) + return if(A.properties["transmittable"] >= 9) //longer spread range power = 2 if(A.properties["stealth"] >= 4) diff --git a/code/datums/diseases/advance/symptoms/symptoms.dm b/code/datums/diseases/advance/symptoms/symptoms.dm index 8557375dbd..38e9ba01ef 100644 --- a/code/datums/diseases/advance/symptoms/symptoms.dm +++ b/code/datums/diseases/advance/symptoms/symptoms.dm @@ -33,6 +33,7 @@ var/list/S = SSdisease.list_symptoms for(var/i = 1; i <= S.len; i++) if(type == S[i]) +<<<<<<< HEAD id = "[i]" return CRASH("We couldn't assign an ID!") @@ -46,6 +47,26 @@ return /datum/symptom/proc/Activate(datum/disease/advance/A) +======= + id = "[i]" + return + CRASH("We couldn't assign an ID!") + +// Called when processing of the advance disease, which holds this symptom, starts. +/datum/symptom/proc/Start(datum/disease/advance/A) + if(neutered) + return FALSE + next_activation = world.time + rand(symptom_delay_min * 10, symptom_delay_max * 10) //so it doesn't instantly activate on infection + return TRUE + +// Called when the advance disease is going to be deleted or when the advance disease stops processing. +/datum/symptom/proc/End(datum/disease/advance/A) + if(neutered) + return FALSE + return TRUE + +/datum/symptom/proc/Activate(datum/disease/advance/A) +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(neutered) return FALSE if(world.time < next_activation) diff --git a/code/datums/diseases/advance/symptoms/viral.dm b/code/datums/diseases/advance/symptoms/viral.dm index ef8822470e..960ccd8096 100644 --- a/code/datums/diseases/advance/symptoms/viral.dm +++ b/code/datums/diseases/advance/symptoms/viral.dm @@ -97,7 +97,8 @@ Bonus A.cure() /datum/symptom/viralreverse/Start(datum/disease/advance/A) - ..() + if(!..()) + return A.stage = 5 if(A.properties["stealth"] >= 4) //more time before it's cured power = 2 diff --git a/code/datums/diseases/advance/symptoms/vision.dm b/code/datums/diseases/advance/symptoms/vision.dm index 04f5d72ba6..2f29091071 100644 --- a/code/datums/diseases/advance/symptoms/vision.dm +++ b/code/datums/diseases/advance/symptoms/vision.dm @@ -33,7 +33,8 @@ Bonus Stealth 4: The symptom remains hidden until active." /datum/symptom/visionloss/Start(datum/disease/advance/A) - ..() + if(!..()) + return if(A.properties["stealth"] >= 4) suppress_warning = TRUE if(A.properties["resistance"] >= 12) //goodbye eyes diff --git a/code/datums/diseases/advance/symptoms/voice_change.dm b/code/datums/diseases/advance/symptoms/voice_change.dm index bdeb6321bc..c8ba639e48 100644 --- a/code/datums/diseases/advance/symptoms/voice_change.dm +++ b/code/datums/diseases/advance/symptoms/voice_change.dm @@ -36,7 +36,12 @@ Bonus Stealth 3: The symptom remains hidden until active." /datum/symptom/voice_change/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["stealth"] >= 3) suppress_warning = TRUE if(A.properties["stage_rate"] >= 7) //faster change of voice diff --git a/code/datums/diseases/advance/symptoms/vomit.dm b/code/datums/diseases/advance/symptoms/vomit.dm index 983d20a66d..e271bce5ed 100644 --- a/code/datums/diseases/advance/symptoms/vomit.dm +++ b/code/datums/diseases/advance/symptoms/vomit.dm @@ -39,7 +39,8 @@ Bonus Stealth 4: The symptom remains hidden until active." /datum/symptom/vomit/Start(datum/disease/advance/A) - ..() + if(!..()) + return if(A.properties["stealth"] >= 4) suppress_warning = TRUE if(A.properties["resistance"] >= 7) //blood vomit diff --git a/code/datums/diseases/advance/symptoms/weight.dm b/code/datums/diseases/advance/symptoms/weight.dm index ea2577b800..90492299d1 100644 --- a/code/datums/diseases/advance/symptoms/weight.dm +++ b/code/datums/diseases/advance/symptoms/weight.dm @@ -31,7 +31,12 @@ Bonus threshold_desc = "Stealth 4: The symptom is less noticeable." /datum/symptom/weight_gain/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["stealth"] >= 4) //warn less often base_message_chance = 25 @@ -81,7 +86,12 @@ Bonus threshold_desc = "Stealth 4: The symptom is less noticeable." /datum/symptom/weight_loss/Start(datum/disease/advance/A) +<<<<<<< HEAD ..() +======= + if(!..()) + return +>>>>>>> 1940af0... Fixes Start() of symptoms still working when neutered (#31435) if(A.properties["stealth"] >= 4) //warn less often base_message_chance = 25