From 2d331f3802fbff7794c1a9f0e2b78032b96aa44b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 7 Aug 2023 23:05:45 +0200 Subject: [PATCH] [MIRROR] Fix engineered stealth viruses being visible [NO GBP] [MDB IGNORE] (#22920) * Fix engineered stealth viruses being visible [NO GBP] (#77410) ## About The Pull Request Remember your isnull(), null is not the same as zero. Also adds the bitfield to make it human readable in VV. Closes https://github.com/tgstation/tgstation/issues/77409 introduced by https://github.com/tgstation/tgstation/pull/77272 ![image](https://github.com/tgstation/tgstation/assets/83487515/74043fa8-c912-43b8-ba27-54a1a19c61ab) ## Why It's Good For The Game Fixes intentionally stealthy viruses becoming visible ## Changelog :cl: LT3 fix: Advanced viruses that are supposed to be stealth will again actually be stealth to analyzers code: Virus visibility flags can now be toggled in view variables /:cl: * Fix engineered stealth viruses being visible [NO GBP] --------- Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com> --- code/__DEFINES/diseases.dm | 6 ++++++ code/datums/diseases/_disease.dm | 2 +- code/datums/diseases/advance/advance.dm | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/diseases.dm b/code/__DEFINES/diseases.dm index 3efea92a646..7fdb3182218 100644 --- a/code/__DEFINES/diseases.dm +++ b/code/__DEFINES/diseases.dm @@ -6,6 +6,12 @@ #define HIDDEN_SCANNER (1<<0) #define HIDDEN_PANDEMIC (1<<1) +//Bitfield for Visibility Flags +DEFINE_BITFIELD(visibility_flags, list( + "HIDDEN_FROM_ANALYZER" = HIDDEN_SCANNER, + "HIDDEN_FROM_PANDEMIC" = HIDDEN_PANDEMIC, +)) + //Disease Flags #define CURABLE (1<<0) #define CAN_CARRY (1<<1) diff --git a/code/datums/diseases/_disease.dm b/code/datums/diseases/_disease.dm index 6ce52676bf3..9d63a8c21b9 100644 --- a/code/datums/diseases/_disease.dm +++ b/code/datums/diseases/_disease.dm @@ -18,7 +18,7 @@ /// The probability of this infection advancing a stage every second the cure is not present. var/stage_prob = 2 /// How long this infection incubates (non-visible) before revealing itself - var/incubation_time = 0 + var/incubation_time //Other var/list/viable_mobtypes = list() //typepaths of viable mobs diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index a9cb1349e80..26a60c8e8a1 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -535,11 +535,14 @@ return properties["transmittable"] /** - * If the disease has an incubation time (such as event diseases) start the timer + * If the disease has an incubation time (such as event diseases) start the timer, let properties determine if there's no timer set. */ /datum/disease/advance/after_add() . = ..() + if(isnull(incubation_time)) + return + if(incubation_time < world.time) make_visible() return