Skip to content

Commit

Permalink
Virology Fixes 6 (VOREStation#16715)
Browse files Browse the repository at this point in the history
* Fixes

* Fix

* BS Sneeze
  • Loading branch information
TheCaramelion authored Dec 16, 2024
1 parent 6f14ca4 commit bc06935
Show file tree
Hide file tree
Showing 24 changed files with 57 additions and 41 deletions.
10 changes: 8 additions & 2 deletions code/datums/diseases/_disease.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,19 @@ GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease))
stage = min(stage + 1, max_stages)
if(!discovered && stage >= CEILING(max_stages * discovery_threshold, 1))
discovered = TRUE
BITSET(affected_mob.hud_updateflag, STATUS_HUD)

/datum/disease/proc/handle_cure_testing(has_cure = FALSE)
if(has_cure && prob(cure_chance))
stage = max(stage -1, 1)

for(var/organ in required_organs)
if(locate(organ) in affected_mob.internal_organs)
continue
if(locate(organ) in affected_mob.organs)
continue
cure()
return FALSE

if(disease_flags & CURABLE)
if(has_cure && prob(cure_chance))
cure()
Expand Down Expand Up @@ -165,7 +172,6 @@ GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease))

/datum/disease/proc/remove_virus()
affected_mob.viruses -= src
BITSET(affected_mob.hud_updateflag, STATUS_HUD)

/datum/disease/proc/Start()
return
Expand Down
2 changes: 0 additions & 2 deletions code/datums/diseases/advance/symptoms/confusion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Bonus
*/

/datum/symptom/confusion

name = "Confusion"
stealth = 1
resistance = -1
Expand All @@ -25,7 +24,6 @@ Bonus
level = 4
severity = 2


/datum/symptom/confusion/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
Expand Down
3 changes: 1 addition & 2 deletions code/datums/diseases/advance/symptoms/cough.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Coughing
Low Level.
BONUS
Will force the affected mob to drop small items.
Small spread if not wearing a mask
Will force the affected mob to drop small items. Small spread if not wearing a mask.
//////////////////////////////////////
*/
Expand Down
1 change: 1 addition & 0 deletions code/datums/diseases/advance/symptoms/damage_converter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Bonus
stage_speed = -4
transmittable = -2
level = 4
severity = 0

/datum/symptom/damage_converter/Activate(datum/disease/advance/A)
..()
Expand Down
1 change: 0 additions & 1 deletion code/datums/diseases/advance/symptoms/dizzy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Bonus
//////////////////////////////////////
*/

/// Not the egg
/datum/symptom/dizzy
name = "Dizziness"
stealth = 2
Expand Down
3 changes: 1 addition & 2 deletions code/datums/diseases/advance/symptoms/flip.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Flippinov
BONUS
Makes the host FLIP.
Should be used for buffing your disease.
//////////////////////////////////////
*/
Expand All @@ -23,7 +22,7 @@ BONUS
stage_speed = 3
transmittable = 1
level = 1
severity = 1
severity = 0

/datum/symptom/spyndrome/Activate(datum/disease/advance/A)
..()
Expand Down
1 change: 1 addition & 0 deletions code/datums/diseases/advance/symptoms/hair.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
//////////////////////////////////////
Alopecia
Noticable.
Expand Down
3 changes: 1 addition & 2 deletions code/datums/diseases/advance/symptoms/headache.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Headache
Low Level.
BONUS
Displays an annoying message!
Should be used for buffing your disease.
Displays an annoying message.
//////////////////////////////////////
*/
Expand Down
4 changes: 4 additions & 0 deletions code/datums/diseases/advance/symptoms/heal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Bonus
stage_speed = -4
transmittable = -4
level = 6
severity = 0

/datum/symptom/heal/Activate(datum/disease/advance/A)
..()
Expand Down Expand Up @@ -61,6 +62,7 @@ Bonus
stage_speed = -1
transmittable = -4
level = 3
severity = 0
var/list/cured_diseases = list()

/datum/symptom/heal/metabolism/Heal(mob/living/M, datum/disease/advance/A)
Expand Down Expand Up @@ -108,6 +110,7 @@ Bonus
stage_speed = 4
transmittable = 4
level = 3
severity = 0
var/longevity = 30

/datum/symptom/heal/longevity/Heal(mob/living/M, datum/disease/advance/A)
Expand Down Expand Up @@ -142,6 +145,7 @@ Bonus
stage_speed = 0
transmittable = -3
level = 5
severity = 0

/datum/symptom/heal/dna/Heal(var/mob/living/carbon/M, var/datum/disease/advance/A)
var/amt_healed = max(0, (sqrtor0(20+A.totalStageSpeed()*(3+rand())))-(sqrtor0(16+A.totalStealth()*rand())))
Expand Down
1 change: 1 addition & 0 deletions code/datums/diseases/advance/symptoms/hematophagy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ BONUS
resistance = -4
transmittable = 1
level = 4
severity = 1

/datum/symptom/hematophagy/Start(datum/disease/advance/A)
if(ishuman(A.affected_mob))
Expand Down
3 changes: 1 addition & 2 deletions code/datums/diseases/advance/symptoms/itching.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Itching
Low Level.
BONUS
Displays an annoying message!
Should be used for buffing your disease.
Displays an annoying message.
//////////////////////////////////////
*/
Expand Down
3 changes: 2 additions & 1 deletion code/datums/diseases/advance/symptoms/language.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Lingual Disocation
Moderate Level.
Bonus
Forces the affected mob to vomit
Randomly changes the language of the mob.
//////////////////////////////////////
*/
Expand All @@ -22,6 +22,7 @@ Bonus
stage_speed = -2
transmittable = -1
level = 3
severity = 1

/datum/symptom/language/Activate(var/datum/disease/advance/A)
..()
Expand Down
1 change: 0 additions & 1 deletion code/datums/diseases/advance/symptoms/mlem.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Mlemingtong
BONUS
Mlem. Mlem. Mlem.
Should be used for buffing your disease.
//////////////////////////////////////
*/
Expand Down
1 change: 1 addition & 0 deletions code/datums/diseases/advance/symptoms/oxygen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Bonus
stage_speed = -3
transmittable = -4
level = 6
severity = 0

/datum/symptom/oxygen/Activate(var/datum/disease/advance/A)
..()
Expand Down
2 changes: 1 addition & 1 deletion code/datums/diseases/advance/symptoms/pica.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ BONUS
stage_speed = 3
transmittable = 1
level = 1
severity = 1
severity = 0

/datum/symptom/pica/Start(datum/disease/advance/A)
add_verb(A.affected_mob, /mob/living/proc/eat_trash)
Expand Down
7 changes: 4 additions & 3 deletions code/datums/diseases/advance/symptoms/sneeze.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Bonus
stage_speed = 0
transmittable = 1
level = 4
severity = 1
severity = 3

/datum/symptom/sneeze/bluespace/Activate(datum/disease/advance/A)
..()
Expand All @@ -79,8 +79,9 @@ Bonus
M.emote("sniff")
else
SneezeTeleport(A, M)
A.spread(A.stage)
if(prob(30))
if(!M.wear_mask)
A.spread(A.stage)
if(prob(30) && !M.wear_mask)
var/obj/effect/decal/cleanable/mucus/icky = new(get_turf(M))
icky.viruses |= A.Copy()

Expand Down
3 changes: 1 addition & 2 deletions code/datums/diseases/advance/symptoms/spin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Spyndrome
BONUS
Makes the host spin.
Should be used for buffing your disease.
//////////////////////////////////////
*/
Expand All @@ -23,7 +22,7 @@ BONUS
stage_speed = 3
transmittable = 1
level = 1
severity = 1
severity = 0

/datum/symptom/spyndrome/Activate(var/datum/disease/advance/A)
..()
Expand Down
4 changes: 2 additions & 2 deletions code/datums/diseases/advance/symptoms/stimulant.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
//////////////////////////////////////
Healing
Overactve Adrenal Gland
No change to stealth.
Slightly decreases resistance.
Expand All @@ -10,7 +10,7 @@ Healing
Moderate Level.
Bonus
Heals toxins in the affected mob's blood stream.
The host produces hyperzine and gets very jittery
//////////////////////////////////////
*/
Expand Down
1 change: 1 addition & 0 deletions code/datums/diseases/advance/symptoms/telepathy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Bonus
stage_speed = -3
transmittable = -4
level = 5
severity = 0

/datum/symptom/telepathy/Start(datum/disease/advance/A)
var/mob/living/carbon/human/H = A.affected_mob
Expand Down
2 changes: 2 additions & 0 deletions code/datums/diseases/advance/symptoms/viral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ BONUS
stage_speed = -3
transmittable = 0
level = 3
severity = 0

/datum/symptom/viraladaptation/Activate(datum/disease/advance/A)
..()
Expand Down Expand Up @@ -53,6 +54,7 @@ BONUS
stage_speed = 5
transmittable = 3
level = 3
severity = 0

/datum/symptom/viralevolution/Activate(datum/disease/advance/A)
..()
Expand Down
7 changes: 5 additions & 2 deletions code/datums/diseases/roanoake.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
var/list/obj/item/organ/organ_list = list()
var/obj/item/organ/O

/datum/disease/roanoake/Start
/datum/disease/roanoake/Start()
var/mob/living/carbon/human/M = affected_mob

organ_list += M.organs
Expand All @@ -35,6 +35,7 @@
if(prob(1))
to_chat(M, span_warning(pick("You feel hot.", "You feel like you're burning.")))
if(M.bodytemperature < BODYTEMP_HEAT_DAMAGE_LIMIT)
fever(M)
if(3)
if(prob(1))
to_chat(M, span_notice("You shiver a bit."))
Expand Down Expand Up @@ -77,8 +78,10 @@
O.take_damage(rand(1, 3))

if(prob(1) && prob(10))
O = pick(organ_list)
var/obj/item/organ/external/E = O.parent_organ
var/datum/wound/W = new /datum/wound/internal_bleeding(5)
O.wounds += W
E.wounds += W

if(M.stat == DEAD)
M.species = /datum/species/xenochimera
Expand Down
12 changes: 6 additions & 6 deletions code/game/objects/items/devices/scanners/health.dm
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,15 @@
else
dat += span_warning("Unknown substance[(unknown > 1)?"s":""] found in subject's dermis.")
dat += "<br>"
if(LAZYLEN(C.resistances))
if(LAZYLEN(C.viruses))
for (var/datum/disease/virus in C.GetViruses())
if(virus.visibility_flags & HIDDEN_SCANNER || virus.visibility_flags & HIDDEN_PANDEMIC)
continue
if(virus.discovered)
dat += span_warning("Warning: [virus.name] detected in subject's blood.")
dat += "<br>"
dat += span_warning("Severity: [virus.severity]")
dat += "<br>"
virus.discovered = TRUE
dat += span_warning("Warning: [virus.name] detected in subject's blood.")
dat += "<br>"
dat += span_warning("Severity: [virus.severity]")
dat += "<br>"
if (M.getCloneLoss())
dat += span_warning("Subject appears to have been imperfectly cloned.")
dat += "<br>"
Expand Down
22 changes: 12 additions & 10 deletions code/modules/mob/living/carbon/human/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2040,11 +2040,6 @@
apply_hud(LIFE_HUD, holder)

if (BITTEST(hud_updateflag, STATUS_HUD))
var/foundVirus = 0
for (var/datum/disease/D in GetViruses())
if(D.discovered)
foundVirus = 1
break

var/image/holder = grab_hud(STATUS_HUD)
var/image/holder2 = grab_hud(STATUS_HUD_OOC)
Expand All @@ -2054,7 +2049,7 @@
else if(stat == DEAD)
holder.icon_state = "huddead"
holder2.icon_state = "huddead"
else if(foundVirus)
else if(has_virus())
holder.icon_state = "hudill"
else if(has_brain_worms())
var/mob/living/simple_mob/animal/borer/B = has_brain_worms()
Expand All @@ -2065,10 +2060,8 @@
holder2.icon_state = "hudbrainworm"
else
holder.icon_state = "hudhealthy"
if(viruses.len)
for(var/datum/disease/D in GetViruses())
if(D.discovered)
holder2.icon_state = "hudill"
if(has_virus())
holder2.icon_state = "hudill"
else
holder2.icon_state = "hudhealthy"
if(block_hud)
Expand Down Expand Up @@ -2229,6 +2222,15 @@

brain.tick_defib_timer()

/mob/living/carbon/human/proc/has_virus()
for(var/thing in viruses)
var/datum/disease/D = thing
if(!D.discovered)
continue
if((!(D.visibility_flags & HIDDEN_SCANNER)) && (D.severity != NONTHREAT))
return TRUE
return FALSE

#undef HUMAN_MAX_OXYLOSS
#undef HUMAN_CRIT_MAX_OXYLOSS

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@
sdisabilities = 0
disabilities = 0
resting = FALSE
viruses.Cut()

// fix blindness and deafness
blinded = 0
Expand Down

0 comments on commit bc06935

Please sign in to comment.