[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
🆑 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
/🆑

* Fix engineered stealth viruses being visible [NO GBP]

---------

Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-08-07 17:05:45 -04:00
committed by GitHub
co-authored by lessthanthree
parent d1b0e06d77
commit 2d331f3802
3 changed files with 11 additions and 2 deletions
+6
View File
@@ -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)
+1 -1
View File
@@ -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
+4 -1
View File
@@ -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