diff --git a/code/__DEFINES/diseases.dm b/code/__DEFINES/diseases.dm
new file mode 100644
index 0000000000..58d8066e9c
--- /dev/null
+++ b/code/__DEFINES/diseases.dm
@@ -0,0 +1,26 @@
+//Visibility Flags
+#define HIDDEN_SCANNER 1
+#define HIDDEN_PANDEMIC 2
+
+//Disease Flags
+#define CURABLE 1
+#define CAN_CARRY 2
+#define CAN_RESIST 4
+
+//Spread Flags
+#define VIRUS_SPREAD_SPECIAL 1
+#define VIRUS_SPREAD_NON_CONTAGIOUS 2
+#define VIRUS_SPREAD_BLOOD 4
+#define VIRUS_SPREAD_CONTACT_FLUIDS 8
+#define VIRUS_SPREAD_CONTACT_SKIN 16
+#define VIRUS_SPREAD_AIRBORNE 32
+
+
+//Severity Defines
+#define VIRUS_SEVERITY_POSITIVE "Positive" //Diseases that buff, heal, or at least do nothing at all
+#define VIRUS_SEVERITY_NONTHREAT "Harmless" //Diseases that may have annoying effects, but nothing disruptive (sneezing)
+#define VIRUS_SEVERITY_MINOR "Minor" //Diseases that can annoy in concrete ways (dizziness)
+#define VIRUS_SEVERITY_MEDIUM "Medium" //Diseases that can do minor harm, or severe annoyance (vomit)
+#define VIRUS_SEVERITY_HARMFUL "Harmful" //Diseases that can do significant harm, or severe disruption (brainrot)
+#define VIRUS_SEVERITY_DANGEROUS "Dangerous" //Diseases that can kill or maim if left untreated (flesh eating, blindness)
+#define VIRUS_SEVERITY_BIOHAZARD "BIOHAZARD" //Diseases that can quickly kill an unprepared victim (fungal tb, gbs)
diff --git a/code/datums/components/infective.dm b/code/datums/components/infective.dm
new file mode 100644
index 0000000000..cedede6b04
--- /dev/null
+++ b/code/datums/components/infective.dm
@@ -0,0 +1,13 @@
+/datum/component/infective
+ var/list/datum/disease/diseases //make sure these are the static, non-processing versions!
+
+/datum/component/infective/Initialize(list/datum/disease/_diseases)
+ RegisterSignal(COMSIG_MOVABLE_CROSSED, .proc/Infect)
+ diseases = _diseases
+
+/datum/component/infective/proc/Infect(atom/movable/AM)
+ var/mob/living/carbon/victim = AM
+ if(istype(victim))
+ for(var/datum/disease/D in diseases)
+ victim.ContactContractDisease(D, "feet")
+ return TRUE
\ No newline at end of file
diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm
index a00d43ad8f..f13239a113 100644
--- a/code/datums/diseases/_MobProcs.dm
+++ b/code/datums/diseases/_MobProcs.dm
@@ -23,7 +23,7 @@
return 1
-/mob/proc/ContractDisease(datum/disease/D)
+/mob/proc/ContactContractDisease(datum/disease/D)
if(!CanContractDisease(D))
return 0
AddDisease(D)
@@ -56,42 +56,31 @@
DD.affected_mob.med_hud_set_status()
-/mob/living/carbon/ContractDisease(datum/disease/D)
+/mob/living/carbon/ContactContractDisease(datum/disease/D, target_zone)
if(!CanContractDisease(D))
return 0
var/obj/item/clothing/Cl = null
- var/passed = 1
+ var/passed = TRUE
- var/head_ch = 100
+ var/head_ch = 80
var/body_ch = 100
- var/hands_ch = 25
- var/feet_ch = 25
-
- if(D.spread_flags & CONTACT_HANDS)
- head_ch = 0
- body_ch = 0
- hands_ch = 100
- feet_ch = 0
- if(D.spread_flags & CONTACT_FEET)
- head_ch = 0
- body_ch = 0
- hands_ch = 0
- feet_ch = 100
+ var/hands_ch = 35
+ var/feet_ch = 15
if(prob(15/D.permeability_mod))
return
if(satiety>0 && prob(satiety/10)) // positive satiety makes it harder to contract the disease.
return
-
- var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4)
+ if(!target_zone)
+ target_zone = pick(head_ch;"head",body_ch;"body",hands_ch;"hands",feet_ch;"feet")
if(ishuman(src))
var/mob/living/carbon/human/H = src
switch(target_zone)
- if(1)
+ if("head")
if(isobj(H.head) && !istype(H.head, /obj/item/paper))
Cl = H.head
passed = prob((Cl.permeability_coefficient*100) - 1)
@@ -101,14 +90,14 @@
if(passed && isobj(H.wear_neck))
Cl = H.wear_neck
passed = prob((Cl.permeability_coefficient*100) - 1)
- if(2)
+ if("body")
if(isobj(H.wear_suit))
Cl = H.wear_suit
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(slot_w_uniform))
Cl = slot_w_uniform
passed = prob((Cl.permeability_coefficient*100) - 1)
- if(3)
+ if("hands")
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&HANDS)
Cl = H.wear_suit
passed = prob((Cl.permeability_coefficient*100) - 1)
@@ -116,7 +105,7 @@
if(passed && isobj(H.gloves))
Cl = H.gloves
passed = prob((Cl.permeability_coefficient*100) - 1)
- if(4)
+ if("feet")
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&FEET)
Cl = H.wear_suit
passed = prob((Cl.permeability_coefficient*100) - 1)
@@ -128,19 +117,30 @@
else if(ismonkey(src))
var/mob/living/carbon/monkey/M = src
switch(target_zone)
- if(1)
+ if("head")
if(M.wear_mask && isobj(M.wear_mask))
Cl = M.wear_mask
passed = prob((Cl.permeability_coefficient*100) - 1)
- if(!passed && (D.spread_flags & AIRBORNE) && !internal)
- passed = (prob((50*D.permeability_mod) - 1))
-
if(passed)
AddDisease(D)
+/mob/proc/AirborneContractDisease(datum/disease/D)
+ if((D.spread_flags & VIRUS_SPREAD_AIRBORNE) && prob((50*D.permeability_mod) - 1))
+ ForceContractDisease(D)
-//Same as ContractDisease, except never overidden clothes checks
+/mob/living/carbon/AirborneContractDisease(datum/disease/D)
+ if(internal)
+ return
+ ..()
+
+/mob/living/carbon/human/AirborneContractDisease(datum/disease/D)
+ if(dna && (NOBREATH in dna.species.species_traits))
+ return
+ ..()
+
+
+//Proc to use when you 100% want to infect someone, as long as they aren't immune
/mob/proc/ForceContractDisease(datum/disease/D)
if(!CanContractDisease(D))
return 0
diff --git a/code/datums/diseases/_disease.dm b/code/datums/diseases/_disease.dm
index 13ad3ece4e..80dc585eb3 100644
--- a/code/datums/diseases/_disease.dm
+++ b/code/datums/diseases/_disease.dm
@@ -1,36 +1,8 @@
-
-//Visibility Flags
-#define HIDDEN_SCANNER 1
-#define HIDDEN_PANDEMIC 2
-
-//Disease Flags
-#define CURABLE 1
-#define CAN_CARRY 2
-#define CAN_RESIST 4
-
-//Spread Flags
-#define SPECIAL 1
-#define NON_CONTAGIOUS 2
-#define BLOOD 4
-#define CONTACT_FEET 8
-#define CONTACT_HANDS 16
-#define CONTACT_GENERAL 32
-#define AIRBORNE 64
-
-
-//Severity Defines
-#define NONTHREAT "No threat"
-#define MINOR "Minor"
-#define MEDIUM "Medium"
-#define HARMFUL "Harmful"
-#define DANGEROUS "Dangerous!"
-#define BIOHAZARD "BIOHAZARD THREAT!"
-
/datum/disease
//Flags
var/visibility_flags = 0
var/disease_flags = CURABLE|CAN_CARRY|CAN_RESIST
- var/spread_flags = AIRBORNE
+ var/spread_flags = VIRUS_SPREAD_AIRBORNE | VIRUS_SPREAD_CONTACT_FLUIDS | VIRUS_SPREAD_CONTACT_SKIN
//Fluff
var/form = "Virus"
@@ -54,7 +26,7 @@
var/carrier = FALSE //If our host is only a carrier
var/bypasses_immunity = FALSE //Does it skip species virus immunity check? Some things may diseases and not viruses
var/permeability_mod = 1
- var/severity = NONTHREAT
+ var/severity = VIRUS_SEVERITY_POSITIVE
var/list/required_organs = list()
var/needs_all_cures = TRUE
var/list/strain_data = list() //dna_spread special bullshit
@@ -95,25 +67,22 @@
if(!. || (needs_all_cures && . < cures.len))
return 0
-
+//Airborne spreading
/datum/disease/proc/spread(force_spread = 0)
if(!affected_mob)
return
- if((spread_flags & SPECIAL || spread_flags & NON_CONTAGIOUS || spread_flags & BLOOD) && !force_spread)
+ if(!(spread_flags & VIRUS_SPREAD_AIRBORNE) && !force_spread)
return
if(affected_mob.reagents.has_reagent("spaceacillin") || (affected_mob.satiety > 0 && prob(affected_mob.satiety/10)))
return
- var/spread_range = 1
+ var/spread_range = 2
if(force_spread)
spread_range = force_spread
- if(spread_flags & AIRBORNE)
- spread_range++
-
var/turf/T = affected_mob.loc
if(istype(T))
for(var/mob/living/carbon/C in oview(spread_range, affected_mob))
@@ -121,7 +90,7 @@
if(V)
while(TRUE)
if(V == T)
- C.ContractDisease(src)
+ C.AirborneContractDisease(src)
break
var/turf/Temp = get_step_towards(V, T)
if(!CANATMOSPASS(V, Temp))
@@ -152,12 +121,6 @@
/datum/disease/proc/GetDiseaseID()
return type
-
-/datum/disease/proc/IsSpreadByTouch()
- if(spread_flags & CONTACT_FEET || spread_flags & CONTACT_HANDS || spread_flags & CONTACT_GENERAL)
- return 1
- return 0
-
//don't use this proc directly. this should only ever be called by cure()
/datum/disease/proc/remove_virus()
affected_mob.viruses -= src //remove the datum from the list
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 062f5cddee..1070039f0c 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -183,19 +183,19 @@
properties["stealth"] += S.stealth
properties["stage_rate"] += S.stage_speed
properties["transmittable"] += S.transmittable
- properties["severity"] = max(properties["severity"], S.severity) // severity is based on the highest severity symptom
+ if(!S.neutered)
+ properties["severity"] = max(properties["severity"], S.severity) // severity is based on the highest severity non-neutered symptom
return
// Assign the properties that are in the list.
/datum/disease/advance/proc/AssignProperties()
if(properties && properties.len)
- switch(properties["stealth"])
- if(2 to INFINITY)
- visibility_flags = HIDDEN_SCANNER
+ if(properties["stealth"] >= 2)
+ visibility_flags = HIDDEN_SCANNER
+
+ SetSpread(Clamp(2 ** (properties["transmittable"] - symptoms.len), VIRUS_SPREAD_BLOOD, VIRUS_SPREAD_AIRBORNE))
- // The more symptoms we have, the less transmittable it is but some symptoms can make up for it.
- SetSpread(Clamp(2 ** (properties["transmittable"] - symptoms.len), BLOOD, AIRBORNE))
permeability_mod = max(Ceiling(0.4 * properties["transmittable"]), 1)
cure_chance = 15 - Clamp(properties["resistance"], -5, 5) // can be between 10 and 20
stage_prob = max(properties["stage_rate"], 2)
@@ -208,35 +208,43 @@
// Assign the spread type and give it the correct description.
/datum/disease/advance/proc/SetSpread(spread_id)
switch(spread_id)
- if(NON_CONTAGIOUS)
+ if(VIRUS_SPREAD_NON_CONTAGIOUS)
+ spread_flags = VIRUS_SPREAD_NON_CONTAGIOUS
spread_text = "None"
- if(SPECIAL)
+ if(VIRUS_SPREAD_SPECIAL)
+ spread_flags = VIRUS_SPREAD_SPECIAL
spread_text = "None"
- if(CONTACT_GENERAL, CONTACT_HANDS, CONTACT_FEET)
- spread_text = "On contact"
- if(AIRBORNE)
- spread_text = "Airborne"
- if(BLOOD)
+ if(VIRUS_SPREAD_BLOOD)
+ spread_flags = VIRUS_SPREAD_BLOOD
spread_text = "Blood"
-
- spread_flags = spread_id
+ if(VIRUS_SPREAD_CONTACT_FLUIDS)
+ spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_FLUIDS
+ spread_text = "Fluids"
+ if(VIRUS_SPREAD_CONTACT_SKIN)
+ spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_FLUIDS | VIRUS_SPREAD_CONTACT_SKIN
+ spread_text = "On contact"
+ if(VIRUS_SPREAD_AIRBORNE)
+ spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_FLUIDS | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_AIRBORNE
+ spread_text = "Airborne"
/datum/disease/advance/proc/SetSeverity(level_sev)
switch(level_sev)
if(-INFINITY to 0)
- severity = NONTHREAT
+ severity = VIRUS_SEVERITY_POSITIVE
if(1)
- severity = MINOR
+ severity = VIRUS_SEVERITY_NONTHREAT
if(2)
- severity = MEDIUM
+ severity = VIRUS_SEVERITY_MINOR
if(3)
- severity = HARMFUL
+ severity = VIRUS_SEVERITY_MEDIUM
if(4)
- severity = DANGEROUS
- if(5 to INFINITY)
- severity = BIOHAZARD
+ severity = VIRUS_SEVERITY_HARMFUL
+ if(5)
+ severity = VIRUS_SEVERITY_DANGEROUS
+ if(6 to INFINITY)
+ severity = VIRUS_SEVERITY_BIOHAZARD
else
severity = "Unknown"
diff --git a/code/datums/diseases/advance/symptoms/choking.dm b/code/datums/diseases/advance/symptoms/choking.dm
index 4829920d4f..4b12ec403c 100644
--- a/code/datums/diseases/advance/symptoms/choking.dm
+++ b/code/datums/diseases/advance/symptoms/choking.dm
@@ -94,7 +94,7 @@ Bonus
stage_speed = -1
transmittable = -2
level = 7
- severity = 3
+ severity = 6
base_message_chance = 15
symptom_delay_min = 14
symptom_delay_max = 30
diff --git a/code/datums/diseases/advance/symptoms/cough.dm b/code/datums/diseases/advance/symptoms/cough.dm
index d3c3ea2da8..323f794eee 100644
--- a/code/datums/diseases/advance/symptoms/cough.dm
+++ b/code/datums/diseases/advance/symptoms/cough.dm
@@ -40,7 +40,7 @@ BONUS
return
if(A.properties["stealth"] >= 4)
suppress_warning = TRUE
- if(A.spread_flags &= AIRBORNE) //infect bystanders
+ if(A.spread_flags &= VIRUS_SPREAD_AIRBORNE) //infect bystanders
infective = TRUE
if(A.properties["resistance"] >= 3) //strong enough to drop items
power = 1.5
diff --git a/code/datums/diseases/advance/symptoms/deafness.dm b/code/datums/diseases/advance/symptoms/deafness.dm
index 3bae01c7a7..c2afb34a9e 100644
--- a/code/datums/diseases/advance/symptoms/deafness.dm
+++ b/code/datums/diseases/advance/symptoms/deafness.dm
@@ -24,7 +24,7 @@ Bonus
stage_speed = -1
transmittable = -3
level = 4
- severity = 3
+ severity = 4
base_message_chance = 100
symptom_delay_min = 25
symptom_delay_max = 80
diff --git a/code/datums/diseases/advance/symptoms/genetics.dm b/code/datums/diseases/advance/symptoms/genetics.dm
index 836b4a4719..af1e460024 100644
--- a/code/datums/diseases/advance/symptoms/genetics.dm
+++ b/code/datums/diseases/advance/symptoms/genetics.dm
@@ -23,7 +23,7 @@ Bonus
stage_speed = 0
transmittable = -3
level = 6
- severity = 3
+ severity = 4
var/list/possible_mutations
var/archived_dna = null
base_message_chance = 50
diff --git a/code/datums/diseases/advance/symptoms/hallucigen.dm b/code/datums/diseases/advance/symptoms/hallucigen.dm
index 76b92159d8..5509f8b07b 100644
--- a/code/datums/diseases/advance/symptoms/hallucigen.dm
+++ b/code/datums/diseases/advance/symptoms/hallucigen.dm
@@ -23,7 +23,7 @@ Bonus
stage_speed = -3
transmittable = -1
level = 5
- severity = 3
+ severity = 2
base_message_chance = 25
symptom_delay_min = 25
symptom_delay_max = 90
diff --git a/code/datums/diseases/advance/symptoms/narcolepsy.dm b/code/datums/diseases/advance/symptoms/narcolepsy.dm
index cc13d99406..24ba024aa6 100644
--- a/code/datums/diseases/advance/symptoms/narcolepsy.dm
+++ b/code/datums/diseases/advance/symptoms/narcolepsy.dm
@@ -22,7 +22,7 @@ Bonus
level = 6
symptom_delay_min = 15
symptom_delay_max = 80
- severity = 5
+ severity = 4
var/sleep_level = 0
var/sleepy_ticks = 0
var/stamina = FALSE
diff --git a/code/datums/diseases/advance/symptoms/sensory.dm b/code/datums/diseases/advance/symptoms/sensory.dm
index e7edcff703..df6bda1729 100644
--- a/code/datums/diseases/advance/symptoms/sensory.dm
+++ b/code/datums/diseases/advance/symptoms/sensory.dm
@@ -23,7 +23,6 @@ Bonus
stage_speed = -4
transmittable = -3
level = 5
- severity = 0
symptom_delay_min = 5
symptom_delay_max = 10
var/purge_alcohol = FALSE
diff --git a/code/datums/diseases/advance/symptoms/vision.dm b/code/datums/diseases/advance/symptoms/vision.dm
index 2f29091071..84f9ef49cc 100644
--- a/code/datums/diseases/advance/symptoms/vision.dm
+++ b/code/datums/diseases/advance/symptoms/vision.dm
@@ -24,7 +24,7 @@ Bonus
stage_speed = -4
transmittable = -3
level = 5
- severity = 4
+ severity = 5
base_message_chance = 50
symptom_delay_min = 25
symptom_delay_max = 80
diff --git a/code/datums/diseases/advance/symptoms/vomit.dm b/code/datums/diseases/advance/symptoms/vomit.dm
index e271bce5ed..14d7f105ab 100644
--- a/code/datums/diseases/advance/symptoms/vomit.dm
+++ b/code/datums/diseases/advance/symptoms/vomit.dm
@@ -28,7 +28,7 @@ Bonus
stage_speed = 0
transmittable = 1
level = 3
- severity = 4
+ severity = 3
base_message_chance = 100
symptom_delay_min = 25
symptom_delay_max = 80
diff --git a/code/datums/diseases/advance/symptoms/weight.dm b/code/datums/diseases/advance/symptoms/weight.dm
index c9e610aa3b..f8f4343649 100644
--- a/code/datums/diseases/advance/symptoms/weight.dm
+++ b/code/datums/diseases/advance/symptoms/weight.dm
@@ -24,7 +24,7 @@ Bonus
stage_speed = -2
transmittable = -2
level = 4
- severity = 1
+ severity = 3
base_message_chance = 100
symptom_delay_min = 15
symptom_delay_max = 45
@@ -75,7 +75,7 @@ Bonus
stage_speed = -2
transmittable = -2
level = 3
- severity = 1
+ severity = 3
base_message_chance = 100
symptom_delay_min = 15
symptom_delay_max = 45
diff --git a/code/datums/diseases/anxiety.dm b/code/datums/diseases/anxiety.dm
index 780cb0b1e5..4673d2e980 100644
--- a/code/datums/diseases/anxiety.dm
+++ b/code/datums/diseases/anxiety.dm
@@ -3,13 +3,13 @@
form = "Infection"
max_stages = 4
spread_text = "On contact"
- spread_flags = CONTACT_GENERAL
+ spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
cure_text = "Ethanol"
cures = list("ethanol")
agent = "Excess Lepidopticides"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
desc = "If left untreated subject will regurgitate butterflies."
- severity = MEDIUM
+ severity = VIRUS_SEVERITY_MINOR
/datum/disease/anxiety/stage_act()
..()
diff --git a/code/datums/diseases/appendicitis.dm b/code/datums/diseases/appendicitis.dm
index 8c681b8ec3..61d1519e7d 100644
--- a/code/datums/diseases/appendicitis.dm
+++ b/code/datums/diseases/appendicitis.dm
@@ -7,9 +7,9 @@
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 1
desc = "If left untreated the subject will become very weak, and may vomit often."
- severity = "Dangerous!"
+ severity = VIRUS_SEVERITY_MEDIUM
disease_flags = CAN_CARRY|CAN_RESIST
- spread_flags = NON_CONTAGIOUS
+ spread_flags = VIRUS_SPREAD_NON_CONTAGIOUS
visibility_flags = HIDDEN_PANDEMIC
required_organs = list(/obj/item/organ/appendix)
bypasses_immunity = TRUE // Immunity is based on not having an appendix; this isn't a virus
diff --git a/code/datums/diseases/beesease.dm b/code/datums/diseases/beesease.dm
index 5c9c9a1522..d95b7b80e7 100644
--- a/code/datums/diseases/beesease.dm
+++ b/code/datums/diseases/beesease.dm
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/datum/disease/beesease
name = "Beesease"
form = "Infection"
@@ -37,4 +38,45 @@
new /mob/living/simple_animal/hostile/poison/bees(affected_mob.loc)
//if(5)
//Plus if you die, you explode into bees
+=======
+/datum/disease/beesease
+ name = "Beesease"
+ form = "Infection"
+ max_stages = 4
+ spread_text = "On contact"
+ spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
+ cure_text = "Sugar"
+ cures = list("sugar")
+ agent = "Apidae Infection"
+ viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
+ desc = "If left untreated subject will regurgitate bees."
+ severity = VIRUS_SEVERITY_MEDIUM
+
+/datum/disease/beesease/stage_act()
+ ..()
+ switch(stage)
+ if(2) //also changes say, see say.dm
+ if(prob(2))
+ to_chat(affected_mob, "You taste honey in your mouth.")
+ if(3)
+ if(prob(10))
+ to_chat(affected_mob, "Your stomach rumbles.")
+ if(prob(2))
+ to_chat(affected_mob, "Your stomach stings painfully.")
+ if(prob(20))
+ affected_mob.adjustToxLoss(2)
+ affected_mob.updatehealth()
+ if(4)
+ if(prob(10))
+ affected_mob.visible_message("[affected_mob] buzzes.", \
+ "Your stomach buzzes violently!")
+ if(prob(5))
+ to_chat(affected_mob, "You feel something moving in your throat.")
+ if(prob(1))
+ affected_mob.visible_message("[affected_mob] coughs up a swarm of bees!", \
+ "You cough up a swarm of bees!")
+ new /mob/living/simple_animal/hostile/poison/bees(affected_mob.loc)
+ //if(5)
+ //Plus if you die, you explode into bees
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
return
\ No newline at end of file
diff --git a/code/datums/diseases/brainrot.dm b/code/datums/diseases/brainrot.dm
index e830cafbef..a3e8a3ca63 100644
--- a/code/datums/diseases/brainrot.dm
+++ b/code/datums/diseases/brainrot.dm
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/datum/disease/brainrot
name = "Brainrot"
max_stages = 4
@@ -57,3 +58,64 @@
affected_mob.stuttering += 3
return
+=======
+/datum/disease/brainrot
+ name = "Brainrot"
+ max_stages = 4
+ spread_text = "On contact"
+ spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
+ cure_text = "Mannitol"
+ cures = list("mannitol")
+ agent = "Cryptococcus Cosmosis"
+ viable_mobtypes = list(/mob/living/carbon/human)
+ cure_chance = 15//higher chance to cure, since two reagents are required
+ desc = "This disease destroys the braincells, causing brain fever, brain necrosis and general intoxication."
+ required_organs = list(/obj/item/organ/brain)
+ severity = VIRUS_SEVERITY_HARMFUL
+
+/datum/disease/brainrot/stage_act() //Removed toxloss because damaging diseases are pretty horrible. Last round it killed the entire station because the cure didn't work -- Urist -ACTUALLY Removed rather than commented out, I don't see it returning - RR
+ ..()
+
+ switch(stage)
+ if(2)
+ if(prob(2))
+ affected_mob.emote("blink")
+ if(prob(2))
+ affected_mob.emote("yawn")
+ if(prob(2))
+ to_chat(affected_mob, "You don't feel like yourself.")
+ if(prob(5))
+ affected_mob.adjustBrainLoss(1)
+ affected_mob.updatehealth()
+ if(3)
+ if(prob(2))
+ affected_mob.emote("stare")
+ if(prob(2))
+ affected_mob.emote("drool")
+ if(prob(10) && affected_mob.getBrainLoss()<=98)//shouldn't retard you to death now
+ affected_mob.adjustBrainLoss(2)
+ affected_mob.updatehealth()
+ if(prob(2))
+ to_chat(affected_mob, "Your try to remember something important...but can't.")
+
+ if(4)
+ if(prob(2))
+ affected_mob.emote("stare")
+ if(prob(2))
+ affected_mob.emote("drool")
+ if(prob(15) && affected_mob.getBrainLoss()<=98) //shouldn't retard you to death now
+ affected_mob.adjustBrainLoss(3)
+ affected_mob.updatehealth()
+ if(prob(2))
+ to_chat(affected_mob, "Strange buzzing fills your head, removing all thoughts.")
+ if(prob(3))
+ to_chat(affected_mob, "You lose consciousness...")
+ affected_mob.visible_message("[affected_mob] suddenly collapses")
+ affected_mob.Unconscious(rand(100,200))
+ if(prob(1))
+ affected_mob.emote("snore")
+ if(prob(15))
+ affected_mob.stuttering += 3
+
+ return
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
diff --git a/code/datums/diseases/cold.dm b/code/datums/diseases/cold.dm
index 468c9f2373..21a3d1d725 100644
--- a/code/datums/diseases/cold.dm
+++ b/code/datums/diseases/cold.dm
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/datum/disease/cold
name = "The Cold"
max_stages = 3
@@ -63,4 +64,70 @@
if(!affected_mob.resistances.Find(/datum/disease/flu))
var/datum/disease/Flu = new /datum/disease/flu(0)
affected_mob.ContractDisease(Flu)
+=======
+/datum/disease/cold
+ name = "The Cold"
+ max_stages = 3
+ cure_text = "Rest & Spaceacillin"
+ cures = list("spaceacillin")
+ agent = "XY-rhinovirus"
+ viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
+ permeability_mod = 0.5
+ desc = "If left untreated the subject will contract the flu."
+ severity = VIRUS_SEVERITY_NONTHREAT
+
+/datum/disease/cold/stage_act()
+ ..()
+ switch(stage)
+ if(2)
+/*
+ if(affected_mob.sleeping && prob(40)) //removed until sleeping is fixed
+ to_chat(affected_mob, "\blue You feel better.")
+ cure()
+ return
+*/
+ if(affected_mob.lying && prob(40)) //changed FROM prob(10) until sleeping is fixed
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return
+ if(prob(1) && prob(5))
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return
+ if(prob(1))
+ affected_mob.emote("sneeze")
+ if(prob(1))
+ affected_mob.emote("cough")
+ if(prob(1))
+ to_chat(affected_mob, "Your throat feels sore.")
+ if(prob(1))
+ to_chat(affected_mob, "Mucous runs down the back of your throat.")
+ if(3)
+/*
+ if(affected_mob.sleeping && prob(25)) //removed until sleeping is fixed
+ to_chat(affected_mob, "\blue You feel better.")
+ cure()
+ return
+*/
+ if(affected_mob.lying && prob(25)) //changed FROM prob(5) until sleeping is fixed
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return
+ if(prob(1) && prob(1))
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return
+ if(prob(1))
+ affected_mob.emote("sneeze")
+ if(prob(1))
+ affected_mob.emote("cough")
+ if(prob(1))
+ to_chat(affected_mob, "Your throat feels sore.")
+ if(prob(1))
+ to_chat(affected_mob, "Mucous runs down the back of your throat.")
+ if(prob(1) && prob(50))
+ if(!affected_mob.resistances.Find(/datum/disease/flu))
+ var/datum/disease/Flu = new /datum/disease/flu(0)
+ affected_mob.ForceContractDisease(Flu)
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
cure()
\ No newline at end of file
diff --git a/code/datums/diseases/cold9.dm b/code/datums/diseases/cold9.dm
index a875130709..4e387aa31c 100644
--- a/code/datums/diseases/cold9.dm
+++ b/code/datums/diseases/cold9.dm
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/datum/disease/cold9
name = "The Cold"
max_stages = 3
@@ -36,4 +37,44 @@
if(prob(1))
to_chat(affected_mob, "Your throat feels sore.")
if(prob(10))
+=======
+/datum/disease/cold9
+ name = "The Cold"
+ max_stages = 3
+ spread_text = "On contact"
+ spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
+ cure_text = "Common Cold Anti-bodies & Spaceacillin"
+ cures = list("spaceacillin")
+ agent = "ICE9-rhinovirus"
+ viable_mobtypes = list(/mob/living/carbon/human)
+ desc = "If left untreated the subject will slow, as if partly frozen."
+ severity = VIRUS_SEVERITY_HARMFUL
+
+/datum/disease/cold9/stage_act()
+ ..()
+ switch(stage)
+ if(2)
+ affected_mob.bodytemperature -= 10
+ if(prob(1) && prob(10))
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return
+ if(prob(1))
+ affected_mob.emote("sneeze")
+ if(prob(1))
+ affected_mob.emote("cough")
+ if(prob(1))
+ to_chat(affected_mob, "Your throat feels sore.")
+ if(prob(5))
+ to_chat(affected_mob, "You feel stiff.")
+ if(3)
+ affected_mob.bodytemperature -= 20
+ if(prob(1))
+ affected_mob.emote("sneeze")
+ if(prob(1))
+ affected_mob.emote("cough")
+ if(prob(1))
+ to_chat(affected_mob, "Your throat feels sore.")
+ if(prob(10))
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
to_chat(affected_mob, "You feel stiff.")
\ No newline at end of file
diff --git a/code/datums/diseases/dna_spread.dm b/code/datums/diseases/dna_spread.dm
index c96a22d472..fefdabd9c8 100644
--- a/code/datums/diseases/dna_spread.dm
+++ b/code/datums/diseases/dna_spread.dm
@@ -2,7 +2,7 @@
name = "Space Retrovirus"
max_stages = 4
spread_text = "On contact"
- spread_flags = CONTACT_GENERAL
+ spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
cure_text = "Mutadone"
cures = list("mutadone")
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
@@ -11,7 +11,7 @@
var/datum/dna/original_dna = null
var/transformed = 0
desc = "This disease transplants the genetic code of the initial vector into new hosts."
- severity = MEDIUM
+ severity = VIRUS_SEVERITY_MEDIUM
/datum/disease/dnaspread/stage_act()
diff --git a/code/datums/diseases/fake_gbs.dm b/code/datums/diseases/fake_gbs.dm
index 524bf8b4b2..1a505d6261 100644
--- a/code/datums/diseases/fake_gbs.dm
+++ b/code/datums/diseases/fake_gbs.dm
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/datum/disease/fake_gbs
name = "GBS"
max_stages = 5
@@ -30,3 +31,37 @@
if(5)
if(prob(10))
affected_mob.emote("cough")
+=======
+/datum/disease/fake_gbs
+ name = "GBS"
+ max_stages = 5
+ spread_text = "On contact"
+ spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
+ cure_text = "Synaptizine & Sulfur"
+ cures = list("synaptizine","sulfur")
+ agent = "Gravitokinetic Bipotential SADS-"
+ viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
+ desc = "If left untreated death will occur."
+ severity = VIRUS_SEVERITY_BIOHAZARD
+
+/datum/disease/fake_gbs/stage_act()
+ ..()
+ switch(stage)
+ if(2)
+ if(prob(1))
+ affected_mob.emote("sneeze")
+ if(3)
+ if(prob(5))
+ affected_mob.emote("cough")
+ else if(prob(5))
+ affected_mob.emote("gasp")
+ if(prob(10))
+ to_chat(affected_mob, "You're starting to feel very weak...")
+ if(4)
+ if(prob(10))
+ affected_mob.emote("cough")
+
+ if(5)
+ if(prob(10))
+ affected_mob.emote("cough")
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
diff --git a/code/datums/diseases/flu.dm b/code/datums/diseases/flu.dm
index 1f2596d2d3..0e500db8ec 100644
--- a/code/datums/diseases/flu.dm
+++ b/code/datums/diseases/flu.dm
@@ -7,6 +7,7 @@
cure_chance = 10
agent = "H13N1 flu virion"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
+<<<<<<< HEAD
permeability_mod = 0.75
desc = "If left untreated the subject will feel quite unwell."
severity = MEDIUM
@@ -52,3 +53,50 @@
affected_mob.adjustToxLoss(1)
affected_mob.updatehealth()
return
+=======
+ permeability_mod = 0.75
+ desc = "If left untreated the subject will feel quite unwell."
+ severity = VIRUS_SEVERITY_MINOR
+
+/datum/disease/flu/stage_act()
+ ..()
+ switch(stage)
+ if(2)
+ if(affected_mob.lying && prob(20))
+ to_chat(affected_mob, "You feel better.")
+ stage--
+ return
+ if(prob(1))
+ affected_mob.emote("sneeze")
+ if(prob(1))
+ affected_mob.emote("cough")
+ if(prob(1))
+ to_chat(affected_mob, "Your muscles ache.")
+ if(prob(20))
+ affected_mob.take_bodypart_damage(1)
+ if(prob(1))
+ to_chat(affected_mob, "Your stomach hurts.")
+ if(prob(20))
+ affected_mob.adjustToxLoss(1)
+ affected_mob.updatehealth()
+
+ if(3)
+ if(affected_mob.lying && prob(15))
+ to_chat(affected_mob, "You feel better.")
+ stage--
+ return
+ if(prob(1))
+ affected_mob.emote("sneeze")
+ if(prob(1))
+ affected_mob.emote("cough")
+ if(prob(1))
+ to_chat(affected_mob, "Your muscles ache.")
+ if(prob(20))
+ affected_mob.take_bodypart_damage(1)
+ if(prob(1))
+ to_chat(affected_mob, "Your stomach hurts.")
+ if(prob(20))
+ affected_mob.adjustToxLoss(1)
+ affected_mob.updatehealth()
+ return
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
diff --git a/code/datums/diseases/fluspanish.dm b/code/datums/diseases/fluspanish.dm
index 99b6eb99e3..2271d72628 100644
--- a/code/datums/diseases/fluspanish.dm
+++ b/code/datums/diseases/fluspanish.dm
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/datum/disease/fluspanish
name = "Spanish inquisition Flu"
max_stages = 3
@@ -34,3 +35,41 @@
to_chat(affected_mob, "You're burning in your own skin!")
affected_mob.take_bodypart_damage(0,5)
return
+=======
+/datum/disease/fluspanish
+ name = "Spanish inquisition Flu"
+ max_stages = 3
+ spread_text = "Airborne"
+ cure_text = "Spaceacillin & Anti-bodies to the common flu"
+ cures = list("spaceacillin")
+ cure_chance = 10
+ agent = "1nqu1s1t10n flu virion"
+ viable_mobtypes = list(/mob/living/carbon/human)
+ permeability_mod = 0.75
+ desc = "If left untreated the subject will burn to death for being a heretic."
+ severity = VIRUS_SEVERITY_DANGEROUS
+
+/datum/disease/fluspanish/stage_act()
+ ..()
+ switch(stage)
+ if(2)
+ affected_mob.bodytemperature += 10
+ if(prob(5))
+ affected_mob.emote("sneeze")
+ if(prob(5))
+ affected_mob.emote("cough")
+ if(prob(1))
+ to_chat(affected_mob, "You're burning in your own skin!")
+ affected_mob.take_bodypart_damage(0,5)
+
+ if(3)
+ affected_mob.bodytemperature += 20
+ if(prob(5))
+ affected_mob.emote("sneeze")
+ if(prob(5))
+ affected_mob.emote("cough")
+ if(prob(5))
+ to_chat(affected_mob, "You're burning in your own skin!")
+ affected_mob.take_bodypart_damage(0,5)
+ return
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
diff --git a/code/datums/diseases/gbs.dm b/code/datums/diseases/gbs.dm
index 20776d5f96..24d0ce15dc 100644
--- a/code/datums/diseases/gbs.dm
+++ b/code/datums/diseases/gbs.dm
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/datum/disease/gbs
name = "GBS"
max_stages = 5
@@ -38,4 +39,46 @@
if(prob(50))
affected_mob.gib()
else
+=======
+/datum/disease/gbs
+ name = "GBS"
+ max_stages = 5
+ spread_text = "On contact"
+ spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
+ cure_text = "Synaptizine & Sulfur"
+ cures = list("synaptizine","sulfur")
+ cure_chance = 15//higher chance to cure, since two reagents are required
+ agent = "Gravitokinetic Bipotential SADS+"
+ viable_mobtypes = list(/mob/living/carbon/human)
+ disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
+ permeability_mod = 1
+ severity = VIRUS_SEVERITY_BIOHAZARD
+
+/datum/disease/gbs/stage_act()
+ ..()
+ switch(stage)
+ if(2)
+ if(prob(45))
+ affected_mob.adjustToxLoss(5)
+ affected_mob.updatehealth()
+ if(prob(1))
+ affected_mob.emote("sneeze")
+ if(3)
+ if(prob(5))
+ affected_mob.emote("cough")
+ else if(prob(5))
+ affected_mob.emote("gasp")
+ if(prob(10))
+ to_chat(affected_mob, "You're starting to feel very weak...")
+ if(4)
+ if(prob(10))
+ affected_mob.emote("cough")
+ affected_mob.adjustToxLoss(5)
+ affected_mob.updatehealth()
+ if(5)
+ to_chat(affected_mob, "Your body feels as if it's trying to rip itself open...")
+ if(prob(50))
+ affected_mob.gib()
+ else
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
return
\ No newline at end of file
diff --git a/code/datums/diseases/magnitis.dm b/code/datums/diseases/magnitis.dm
index df7249c9c3..2f4bd9b896 100644
--- a/code/datums/diseases/magnitis.dm
+++ b/code/datums/diseases/magnitis.dm
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/datum/disease/magnitis
name = "Magnitis"
max_stages = 4
@@ -19,6 +20,29 @@
to_chat(affected_mob, "You feel a slight shock course through your body.")
if(prob(2))
for(var/obj/M in orange(2,affected_mob))
+=======
+/datum/disease/magnitis
+ name = "Magnitis"
+ max_stages = 4
+ spread_text = "Airborne"
+ cure_text = "Iron"
+ cures = list("iron")
+ agent = "Fukkos Miracos"
+ viable_mobtypes = list(/mob/living/carbon/human)
+ disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
+ permeability_mod = 0.75
+ desc = "This disease disrupts the magnetic field of your body, making it act as if a powerful magnet. Injections of iron help stabilize the field."
+ severity = VIRUS_SEVERITY_MEDIUM
+
+/datum/disease/magnitis/stage_act()
+ ..()
+ switch(stage)
+ if(2)
+ if(prob(2))
+ to_chat(affected_mob, "You feel a slight shock course through your body.")
+ if(prob(2))
+ for(var/obj/M in orange(2,affected_mob))
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
if(!M.anchored && (M.flags_1 & CONDUCT_1))
step_towards(M,affected_mob)
for(var/mob/living/silicon/S in orange(2,affected_mob))
diff --git a/code/datums/diseases/parrotpossession.dm b/code/datums/diseases/parrotpossession.dm
index a5d87be980..d19d05620c 100644
--- a/code/datums/diseases/parrotpossession.dm
+++ b/code/datums/diseases/parrotpossession.dm
@@ -2,7 +2,7 @@
name = "Parrot Possession"
max_stages = 1
spread_text = "Paranormal"
- spread_flags = SPECIAL
+ spread_flags = VIRUS_SPREAD_SPECIAL
disease_flags = CURABLE
cure_text = "Holy Water."
cures = list("holywater")
@@ -10,7 +10,7 @@
agent = "Avian Vengence"
viable_mobtypes = list(/mob/living/carbon/human)
desc = "Subject is possesed by the vengeful spirit of a parrot. Call the priest."
- severity = MEDIUM
+ severity = VIRUS_SEVERITY_MEDIUM
var/mob/living/simple_animal/parrot/Poly/ghost/parrot
/datum/disease/parrot_possession/stage_act()
diff --git a/code/datums/diseases/pierrot_throat.dm b/code/datums/diseases/pierrot_throat.dm
index 75f63edf43..ab57b25ff9 100644
--- a/code/datums/diseases/pierrot_throat.dm
+++ b/code/datums/diseases/pierrot_throat.dm
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/datum/disease/pierrot_throat
name = "Pierrot's Throat"
max_stages = 4
@@ -22,3 +23,33 @@
if(prob(10)) to_chat(affected_mob, "Your thoughts are interrupted by a loud HONK!")
if(4)
if(prob(5)) affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) )
+=======
+/datum/disease/pierrot_throat
+ name = "Pierrot's Throat"
+ max_stages = 4
+ spread_text = "Airborne"
+ cure_text = "Banana products, especially banana bread."
+ cures = list("banana")
+ cure_chance = 75
+ agent = "H0NI<42 Virus"
+ viable_mobtypes = list(/mob/living/carbon/human)
+ permeability_mod = 0.75
+ desc = "If left untreated the subject will probably drive others to insanity."
+ severity = VIRUS_SEVERITY_MEDIUM
+
+/datum/disease/pierrot_throat/stage_act()
+ ..()
+ switch(stage)
+ if(1)
+ if(prob(10))
+ to_chat(affected_mob, "You feel a little silly.")
+ if(2)
+ if(prob(10))
+ to_chat(affected_mob, "You start seeing rainbows.")
+ if(3)
+ if(prob(10))
+ to_chat(affected_mob, "Your thoughts are interrupted by a loud HONK!")
+ if(4)
+ if(prob(5))
+ affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) )
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
diff --git a/code/datums/diseases/retrovirus.dm b/code/datums/diseases/retrovirus.dm
index e962d51e32..caabe39336 100644
--- a/code/datums/diseases/retrovirus.dm
+++ b/code/datums/diseases/retrovirus.dm
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/datum/disease/dna_retrovirus
name = "Retrovirus"
max_stages = 4
@@ -80,4 +81,88 @@
if(prob(50))
scramble_dna(affected_mob, 1, 0, rand(50,75))
else
+=======
+/datum/disease/dna_retrovirus
+ name = "Retrovirus"
+ max_stages = 4
+ spread_text = "Contact"
+ spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
+ cure_text = "Rest or an injection of mutadone"
+ cure_chance = 6
+ agent = ""
+ viable_mobtypes = list(/mob/living/carbon/human)
+ desc = "A DNA-altering retrovirus that scrambles the structural and unique enzymes of a host constantly."
+ severity = VIRUS_SEVERITY_HARMFUL
+ permeability_mod = 0.4
+ stage_prob = 2
+ var/SE
+ var/UI
+ var/restcure = 0
+
+
+/datum/disease/dna_retrovirus/New()
+ ..()
+ agent = "Virus class [pick("A","B","C","D","E","F")][pick("A","B","C","D","E","F")]-[rand(50,300)]"
+ if(prob(40))
+ cures = list("mutadone")
+ else
+ restcure = 1
+
+
+/datum/disease/dna_retrovirus/stage_act()
+ ..()
+ switch(stage)
+ if(1)
+ if(restcure)
+ if(affected_mob.lying && prob(30))
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return
+ if (prob(8))
+ to_chat(affected_mob, "Your head hurts.")
+ if (prob(9))
+ to_chat(affected_mob, "You feel a tingling sensation in your chest.")
+ if (prob(9))
+ to_chat(affected_mob, "You feel angry.")
+ if(2)
+ if(restcure)
+ if(affected_mob.lying && prob(20))
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return
+ if (prob(8))
+ to_chat(affected_mob, "Your skin feels loose.")
+ if (prob(10))
+ to_chat(affected_mob, "You feel very strange.")
+ if (prob(4))
+ to_chat(affected_mob, "You feel a stabbing pain in your head!")
+ affected_mob.Unconscious(40)
+ if (prob(4))
+ to_chat(affected_mob, "Your stomach churns.")
+ if(3)
+ if(restcure)
+ if(affected_mob.lying && prob(20))
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return
+ if (prob(10))
+ to_chat(affected_mob, "Your entire body vibrates.")
+
+ if (prob(35))
+ if(prob(50))
+ scramble_dna(affected_mob, 1, 0, rand(15,45))
+ else
+ scramble_dna(affected_mob, 0, 1, rand(15,45))
+
+ if(4)
+ if(restcure)
+ if(affected_mob.lying && prob(5))
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return
+ if (prob(60))
+ if(prob(50))
+ scramble_dna(affected_mob, 1, 0, rand(50,75))
+ else
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
scramble_dna(affected_mob, 0, 1, rand(50,75))
\ No newline at end of file
diff --git a/code/datums/diseases/rhumba_beat.dm b/code/datums/diseases/rhumba_beat.dm
index 9cbb829061..6aa18a5d59 100644
--- a/code/datums/diseases/rhumba_beat.dm
+++ b/code/datums/diseases/rhumba_beat.dm
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/datum/disease/rhumba_beat
name = "The Rhumba Beat"
max_stages = 5
@@ -13,6 +14,23 @@
/datum/disease/rhumba_beat/stage_act()
..()
if(affected_mob.ckey == "rosham")
+=======
+/datum/disease/rhumba_beat
+ name = "The Rhumba Beat"
+ max_stages = 5
+ spread_text = "On contact"
+ spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
+ cure_text = "Chick Chicky Boom!"
+ cures = list("plasma")
+ agent = "Unknown"
+ viable_mobtypes = list(/mob/living/carbon/human)
+ permeability_mod = 1
+ severity = VIRUS_SEVERITY_BIOHAZARD
+
+/datum/disease/rhumba_beat/stage_act()
+ ..()
+ if(affected_mob.ckey == "rosham")
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
cure()
return
switch(stage)
diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm
index e5746c3f8b..4a6056f084 100644
--- a/code/datums/diseases/transformation.dm
+++ b/code/datums/diseases/transformation.dm
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/datum/disease/transformation
name = "Transformation"
max_stages = 5
@@ -239,3 +240,247 @@
stage4 = list("You're ravenous.")
stage5 = list("You have become a morph.")
new_form = /mob/living/simple_animal/hostile/morph
+=======
+/datum/disease/transformation
+ name = "Transformation"
+ max_stages = 5
+ spread_text = "Acute"
+ spread_flags = VIRUS_SPREAD_SPECIAL
+ cure_text = "A coder's love (theoretical)."
+ agent = "Shenanigans"
+ viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey, /mob/living/carbon/alien)
+ severity = VIRUS_SEVERITY_BIOHAZARD
+ stage_prob = 10
+ visibility_flags = HIDDEN_SCANNER|HIDDEN_PANDEMIC
+ disease_flags = CURABLE
+ var/list/stage1 = list("You feel unremarkable.")
+ var/list/stage2 = list("You feel boring.")
+ var/list/stage3 = list("You feel utterly plain.")
+ var/list/stage4 = list("You feel white bread.")
+ var/list/stage5 = list("Oh the humanity!")
+ var/new_form = /mob/living/carbon/human
+
+/datum/disease/transformation/stage_act()
+ ..()
+ switch(stage)
+ if(1)
+ if (prob(stage_prob) && stage1)
+ to_chat(affected_mob, pick(stage1))
+ if(2)
+ if (prob(stage_prob) && stage2)
+ to_chat(affected_mob, pick(stage2))
+ if(3)
+ if (prob(stage_prob*2) && stage3)
+ to_chat(affected_mob, pick(stage3))
+ if(4)
+ if (prob(stage_prob*2) && stage4)
+ to_chat(affected_mob, pick(stage4))
+ if(5)
+ do_disease_transformation(affected_mob)
+
+/datum/disease/transformation/proc/do_disease_transformation(mob/living/affected_mob)
+ if(istype(affected_mob, /mob/living/carbon) && affected_mob.stat != DEAD)
+ if(stage5)
+ to_chat(affected_mob, pick(stage5))
+ if(jobban_isbanned(affected_mob, new_form))
+ affected_mob.death(1)
+ return
+ if(affected_mob.notransform)
+ return
+ affected_mob.notransform = 1
+ for(var/obj/item/W in affected_mob.get_equipped_items())
+ affected_mob.dropItemToGround(W)
+ for(var/obj/item/I in affected_mob.held_items)
+ affected_mob.dropItemToGround(I)
+ var/mob/living/new_mob = new new_form(affected_mob.loc)
+ if(istype(new_mob))
+ new_mob.a_intent = INTENT_HARM
+ if(affected_mob.mind)
+ affected_mob.mind.transfer_to(new_mob)
+ else
+ new_mob.key = affected_mob.key
+
+ new_mob.name = affected_mob.real_name
+ new_mob.real_name = new_mob.name
+ qdel(affected_mob)
+
+
+
+/datum/disease/transformation/jungle_fever
+ name = "Jungle Fever"
+ cure_text = "Bananas"
+ cures = list("banana")
+ spread_text = "Monkey Bites"
+ spread_flags = VIRUS_SPREAD_SPECIAL
+ viable_mobtypes = list(/mob/living/carbon/monkey, /mob/living/carbon/human)
+ permeability_mod = 1
+ cure_chance = 1
+ disease_flags = CAN_CARRY|CAN_RESIST
+ desc = "Monkeys with this disease will bite humans, causing humans to mutate into a monkey."
+ severity = VIRUS_SEVERITY_BIOHAZARD
+ stage_prob = 4
+ visibility_flags = 0
+ agent = "Kongey Vibrion M-909"
+ new_form = /mob/living/carbon/monkey
+
+ stage1 = null
+ stage2 = null
+ stage3 = null
+ stage4 = list("Your back hurts.", "You breathe through your mouth.",
+ "You have a craving for bananas.", "Your mind feels clouded.")
+ stage5 = list("You feel like monkeying around.")
+
+/datum/disease/transformation/jungle_fever/do_disease_transformation(mob/living/carbon/affected_mob)
+ if(!ismonkey(affected_mob))
+ SSticker.mode.add_monkey(affected_mob.mind)
+ affected_mob.monkeyize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE)
+
+/datum/disease/transformation/jungle_fever/stage_act()
+ ..()
+ switch(stage)
+ if(2)
+ if(prob(2))
+ to_chat(affected_mob, "Your [pick("back", "arm", "leg", "elbow", "head")] itches.")
+ if(3)
+ if(prob(4))
+ to_chat(affected_mob, "You feel a stabbing pain in your head.")
+ affected_mob.confused += 10
+ if(4)
+ if(prob(3))
+ affected_mob.say(pick("Eeek, ook ook!", "Eee-eeek!", "Eeee!", "Ungh, ungh."))
+
+/datum/disease/transformation/jungle_fever/cure()
+ SSticker.mode.remove_monkey(affected_mob.mind)
+ ..()
+
+
+/datum/disease/transformation/robot
+
+ name = "Robotic Transformation"
+ cure_text = "An injection of copper."
+ cures = list("copper")
+ cure_chance = 5
+ agent = "R2D2 Nanomachines"
+ desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
+ severity = VIRUS_SEVERITY_BIOHAZARD
+ visibility_flags = 0
+ stage1 = null
+ stage2 = list("Your joints feel stiff.", "Beep...boop..")
+ stage3 = list("Your joints feel very stiff.", "Your skin feels loose.", "You can feel something move...inside.")
+ stage4 = list("Your skin feels very loose.", "You can feel... something...inside you.")
+ stage5 = list("Your skin feels as if it's about to burst off!")
+ new_form = /mob/living/silicon/robot
+
+
+/datum/disease/transformation/robot/stage_act()
+ ..()
+ switch(stage)
+ if(3)
+ if (prob(8))
+ affected_mob.say(pick("Beep, boop", "beep, beep!", "Boop...bop"))
+ if (prob(4))
+ to_chat(affected_mob, "You feel a stabbing pain in your head.")
+ affected_mob.Unconscious(40)
+ if(4)
+ if (prob(20))
+ affected_mob.say(pick("beep, beep!", "Boop bop boop beep.", "kkkiiiill mmme", "I wwwaaannntt tttoo dddiiieeee..."))
+
+
+/datum/disease/transformation/xeno
+
+ name = "Xenomorph Transformation"
+ cure_text = "Spaceacillin & Glycerol"
+ cures = list("spaceacillin", "glycerol")
+ cure_chance = 5
+ agent = "Rip-LEY Alien Microbes"
+ desc = "This disease changes the victim into a xenomorph."
+ severity = VIRUS_SEVERITY_BIOHAZARD
+ visibility_flags = 0
+ stage1 = null
+ stage2 = list("Your throat feels scratchy.", "Kill...")
+ stage3 = list("Your throat feels very scratchy.", "Your skin feels tight.", "You can feel something move...inside.")
+ stage4 = list("Your skin feels very tight.", "Your blood boils!", "You can feel... something...inside you.")
+ stage5 = list("Your skin feels as if it's about to burst off!")
+ new_form = /mob/living/carbon/alien/humanoid/hunter
+
+/datum/disease/transformation/xeno/stage_act()
+ ..()
+ switch(stage)
+ if(3)
+ if (prob(4))
+ to_chat(affected_mob, "You feel a stabbing pain in your head.")
+ affected_mob.Unconscious(40)
+ if(4)
+ if (prob(20))
+ affected_mob.say(pick("You look delicious.", "Going to... devour you...", "Hsssshhhhh!"))
+
+
+/datum/disease/transformation/slime
+ name = "Advanced Mutation Transformation"
+ cure_text = "frost oil"
+ cures = list("frostoil")
+ cure_chance = 80
+ agent = "Advanced Mutation Toxin"
+ desc = "This highly concentrated extract converts anything into more of itself."
+ severity = VIRUS_SEVERITY_BIOHAZARD
+ visibility_flags = 0
+ stage1 = list("You don't feel very well.")
+ stage2 = list("Your skin feels a little slimy.")
+ stage3 = list("Your appendages are melting away.", "Your limbs begin to lose their shape.")
+ stage4 = list("You are turning into a slime.")
+ stage5 = list("You have become a slime.")
+ new_form = /mob/living/simple_animal/slime/random
+
+/datum/disease/transformation/slime/stage_act()
+ ..()
+ switch(stage)
+ if(1)
+ if(ishuman(affected_mob) && affected_mob.dna && affected_mob.dna.species.id == "slime")
+ stage = 5
+ if(3)
+ if(ishuman(affected_mob))
+ var/mob/living/carbon/human/human = affected_mob
+ if(human.dna.species.id != "slime")
+ human.set_species(/datum/species/jelly/slime)
+
+/datum/disease/transformation/corgi
+ name = "The Barkening"
+ cure_text = "Death"
+ cures = list("adminordrazine")
+ agent = "Fell Doge Majicks"
+ desc = "This disease transforms the victim into a corgi."
+ severity = VIRUS_SEVERITY_BIOHAZARD
+ visibility_flags = 0
+ stage1 = list("BARK.")
+ stage2 = list("You feel the need to wear silly hats.")
+ stage3 = list("Must... eat... chocolate....", "YAP")
+ stage4 = list("Visions of washing machines assail your mind!")
+ stage5 = list("AUUUUUU!!!")
+ new_form = /mob/living/simple_animal/pet/dog/corgi
+
+/datum/disease/transformation/corgi/stage_act()
+ ..()
+ switch(stage)
+ if(3)
+ if (prob(8))
+ affected_mob.say(pick("YAP", "Woof!"))
+ if(4)
+ if (prob(20))
+ affected_mob.say(pick("Bark!", "AUUUUUU"))
+
+/datum/disease/transformation/morph
+ name = "Gluttony's Blessing"
+ cure_text = "nothing"
+ cures = list("adminordrazine")
+ agent = "Gluttony's Blessing"
+ desc = "A 'gift' from somewhere terrible."
+ stage_prob = 20
+ severity = VIRUS_SEVERITY_BIOHAZARD
+ visibility_flags = 0
+ stage1 = list("Your stomach rumbles.")
+ stage2 = list("Your skin feels saggy.")
+ stage3 = list("Your appendages are melting away.", "Your limbs begin to lose their shape.")
+ stage4 = list("You're ravenous.")
+ stage5 = list("You have become a morph.")
+ new_form = /mob/living/simple_animal/hostile/morph
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
diff --git a/code/datums/diseases/tuberculosis.dm b/code/datums/diseases/tuberculosis.dm
index c8e2a4609b..d8f1a41c76 100644
--- a/code/datums/diseases/tuberculosis.dm
+++ b/code/datums/diseases/tuberculosis.dm
@@ -10,7 +10,7 @@
cure_chance = 5//like hell are you getting out of hell
desc = "A rare highly transmittable virulent virus. Few samples exist, rumoured to be carefully grown and cultured by clandestine bio-weapon specialists. Causes fever, blood vomiting, lung damage, weight loss, and fatigue."
required_organs = list(/obj/item/organ/lungs)
- severity = DANGEROUS
+ severity = VIRUS_SEVERITY_BIOHAZARD
bypasses_immunity = TRUE // TB primarily impacts the lungs; it's also bacterial or fungal in nature; viral immunity should do nothing.
/datum/disease/tuberculosis/stage_act() //it begins
diff --git a/code/datums/diseases/wizarditis.dm b/code/datums/diseases/wizarditis.dm
index 66663162ee..cabf22b280 100644
--- a/code/datums/diseases/wizarditis.dm
+++ b/code/datums/diseases/wizarditis.dm
@@ -10,7 +10,7 @@
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
permeability_mod = 0.75
desc = "Some speculate that this virus is the cause of the Space Wizard Federation's existence. Subjects affected show the signs of mental retardation, yelling obscure sentences or total gibberish. On late stages subjects sometime express the feelings of inner power, and, cite, 'the ability to control the forces of cosmos themselves!' A gulp of strong, manly spirits usually reverts them to normal, humanlike, condition."
- severity = HARMFUL
+ severity = VIRUS_SEVERITY_HARMFUL
required_organs = list(/obj/item/bodypart/head)
/*
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index d1ca8b3890..82abe9b0b4 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -412,10 +412,10 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
. = ..()
transfer_blood = rand(2, 4)
-/turf/add_blood(list/blood_dna)
+/turf/add_blood(list/blood_dna, list/datum/disease/diseases)
var/obj/effect/decal/cleanable/blood/splatter/B = locate() in src
if(!B)
- B = new /obj/effect/decal/cleanable/blood/splatter(src)
+ B = new /obj/effect/decal/cleanable/blood/splatter(src, diseases)
B.transfer_blood_dna(blood_dna) //give blood info to the blood decal.
return 1 //we bloodied the floor
@@ -524,7 +524,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
/atom/proc/add_vomit_floor(mob/living/carbon/M, toxvomit = 0)
if(isturf(src))
- var/obj/effect/decal/cleanable/vomit/V = new /obj/effect/decal/cleanable/vomit(src)
+ var/obj/effect/decal/cleanable/vomit/V = new /obj/effect/decal/cleanable/vomit(src, M.get_static_viruses())
// Make toxins vomit look different
if(toxvomit)
V.icon_state = "vomittox_[pick(1,4)]"
diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm
index ab329dfd29..1744c36865 100644
--- a/code/game/data_huds.dm
+++ b/code/game/data_huds.dm
@@ -61,16 +61,12 @@
//called when a carbon changes virus
/mob/living/carbon/proc/check_virus()
- var/threat = 0
+ var/threat
for(var/thing in viruses)
var/datum/disease/D = thing
if(!(D.visibility_flags & HIDDEN_SCANNER))
- if (D.severity != NONTHREAT) //a buffing virus gets an icon
- threat = 2
- return threat //harmful viruses have priority
- else
- threat = 1 //aka good virus
-
+ if(!threat || D.severity > threat) //a buffing virus gets an icon
+ threat = D.severity
return threat
//helper for getting the appropriate health status
@@ -162,21 +158,44 @@
/mob/living/carbon/med_hud_set_status()
var/image/holder = hud_list[STATUS_HUD]
var/icon/I = icon(icon, icon_state, dir)
+<<<<<<< HEAD
var/virus_state = check_virus()
var/mob/living/simple_animal/borer/B = has_brain_worms()
+=======
+ var/virus_threat = check_virus()
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
holder.pixel_y = I.Height() - world.icon_size
if(status_flags & XENO_HOST)
holder.icon_state = "hudxeno"
else if(stat == DEAD || (status_flags & FAKEDEATH))
holder.icon_state = "huddead"
+<<<<<<< HEAD
else if(has_brain_worms() && B != null && B.controlling)
holder.icon_state = "hudbrainworm"
else if(virus_state == 2)
holder.icon_state = "hudill"
else if(virus_state == 1)
holder.icon_state = "hudbuff"
+=======
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
else
- holder.icon_state = "hudhealthy"
+ switch(virus_threat)
+ if(VIRUS_SEVERITY_BIOHAZARD)
+ holder.icon_state = "hudill5"
+ if(VIRUS_SEVERITY_DANGEROUS)
+ holder.icon_state = "hudill4"
+ if(VIRUS_SEVERITY_HARMFUL)
+ holder.icon_state = "hudill3"
+ if(VIRUS_SEVERITY_MEDIUM)
+ holder.icon_state = "hudill2"
+ if(VIRUS_SEVERITY_MINOR)
+ holder.icon_state = "hudill1"
+ if(VIRUS_SEVERITY_NONTHREAT)
+ holder.icon_state = "hudill0"
+ if(VIRUS_SEVERITY_POSITIVE)
+ holder.icon_state = "hudbuff"
+ if(null)
+ holder.icon_state = "hudhealthy"
/***********************************************
diff --git a/code/game/gamemodes/changeling/powers/panacea.dm b/code/game/gamemodes/changeling/powers/panacea.dm
index c961406810..4e8db74ac8 100644
--- a/code/game/gamemodes/changeling/powers/panacea.dm
+++ b/code/game/gamemodes/changeling/powers/panacea.dm
@@ -43,7 +43,7 @@
for(var/thing in user.viruses)
var/datum/disease/D = thing
- if(D.severity == NONTHREAT)
+ if(D.severity == VIRUS_SEVERITY_POSITIVE)
continue
D.cure()
return TRUE
diff --git a/code/game/gamemodes/miniantags/revenant/revenant_blight.dm b/code/game/gamemodes/miniantags/revenant/revenant_blight.dm
index 913efb34ce..21bc534f27 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant_blight.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant_blight.dm
@@ -2,7 +2,7 @@
name = "Unnatural Wasting"
max_stages = 5
stage_prob = 10
- spread_flags = NON_CONTAGIOUS
+ spread_flags = VIRUS_SPREAD_NON_CONTAGIOUS
cure_text = "Holy water or extensive rest."
spread_text = "A burst of unholy energy"
cures = list("holywater")
@@ -11,7 +11,7 @@
viable_mobtypes = list(/mob/living/carbon/human)
disease_flags = CURABLE
permeability_mod = 1
- severity = BIOHAZARD
+ severity = VIRUS_SEVERITY_HARMFUL
var/stagedamage = 0 //Highest stage reached.
var/finalstage = 0 //Because we're spawning off the cure in the final stage, we need to check if we've done the final stage's effects.
diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm
index 2aca5c534b..4a5ac2f60d 100644
--- a/code/game/objects/effects/decals/cleanable.dm
+++ b/code/game/objects/effects/decals/cleanable.dm
@@ -6,7 +6,7 @@
var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
var/mergeable_decal = 1 //when two of these are on a same tile or do we need to merge them into just one?
-/obj/effect/decal/cleanable/Initialize(mapload)
+/obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases)
if (random_icon_states && length(src.random_icon_states) > 0)
src.icon_state = pick(src.random_icon_states)
create_reagents(300)
@@ -14,10 +14,15 @@
for(var/obj/effect/decal/cleanable/C in src.loc)
if(C != src && C.type == src.type)
replace_decal(C)
+ if(LAZYLEN(diseases))
+ var/list/datum/disease/diseases_to_add = list()
+ for(var/datum/disease/D in diseases)
+ if(D.spread_flags & VIRUS_SPREAD_CONTACT_FLUIDS)
+ diseases_to_add += D
+ if(LAZYLEN(diseases_to_add))
+ AddComponent(/datum/component/infective, diseases_to_add)
. = ..()
-
-
/obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C)
if(mergeable_decal)
qdel(C)
@@ -65,6 +70,7 @@
//Add "bloodiness" of this blood's type, to the human's shoes
//This is on /cleanable because fuck this ancient mess
/obj/effect/decal/cleanable/Crossed(atom/movable/O)
+ ..()
if(ishuman(O))
var/mob/living/carbon/human/H = O
if(H.shoes && blood_state && bloodiness)
diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm
index 5566a91d88..dfb3567b11 100644
--- a/code/game/objects/effects/decals/cleanable/humans.dm
+++ b/code/game/objects/effects/decals/cleanable/humans.dm
@@ -18,7 +18,7 @@
desc = "Looks like it's been here a while. Eew."
bloodiness = 0
-/obj/effect/decal/cleanable/blood/old/Initialize()
+/obj/effect/decal/cleanable/blood/old/Initialize(mapload, list/datum/disease/diseases)
. = ..()
icon_state += "-old" //This IS necessary because the parent /blood type uses icon randomization.
blood_DNA["Non-human DNA"] = "A+"
@@ -39,7 +39,6 @@
var/list/existing_dirs = list()
blood_DNA = list()
-
/obj/effect/decal/cleanable/trail_holder/can_bloodcrawl_in()
return 1
@@ -53,7 +52,7 @@
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
mergeable_decal = 0
-/obj/effect/decal/cleanable/blood/gibs/Initialize()
+/obj/effect/decal/cleanable/blood/gibs/Initialize(mapload, list/datum/disease/diseases)
. = ..()
reagents.add_reagent("liquidgibs", 5)
@@ -66,7 +65,11 @@
for(var/i = 0, i < pick(1, 200; 2, 150; 3, 50), i++)
sleep(2)
if(i > 0)
- new /obj/effect/decal/cleanable/blood/splatter(loc)
+ var/list/datum/disease/diseases
+ GET_COMPONENT(infective, /datum/component/infective)
+ if(infective)
+ diseases = infective.diseases
+ new /obj/effect/decal/cleanable/blood/splatter(loc, diseases)
if(!step_to(src, get_step(src, direction), 0))
break
@@ -93,7 +96,7 @@
desc = "Space Jesus, why didn't anyone clean this up? It smells terrible."
bloodiness = 0
-/obj/effect/decal/cleanable/blood/gibs/old/Initialize()
+/obj/effect/decal/cleanable/blood/gibs/old/Initialize(mapload, list/datum/disease/diseases)
. = ..()
setDir(pick(1,2,4,8))
icon_state += "-old"
@@ -126,6 +129,7 @@
var/list/shoe_types = list()
/obj/effect/decal/cleanable/blood/footprints/Crossed(atom/movable/O)
+ ..()
if(ishuman(O))
var/mob/living/carbon/human/H = O
var/obj/item/clothing/shoes/S = H.shoes
@@ -136,6 +140,7 @@
update_icon()
/obj/effect/decal/cleanable/blood/footprints/Uncrossed(atom/movable/O)
+ ..()
if(ishuman(O))
var/mob/living/carbon/human/H = O
var/obj/item/clothing/shoes/S = H.shoes
diff --git a/code/game/objects/effects/decals/cleanable/misc.dm b/code/game/objects/effects/decals/cleanable/misc.dm
index 4be49d12f8..583f63af3a 100644
--- a/code/game/objects/effects/decals/cleanable/misc.dm
+++ b/code/game/objects/effects/decals/cleanable/misc.dm
@@ -101,7 +101,7 @@
name = "crusty dried vomit"
desc = "You try not to look at the chunks, and fail."
-/obj/effect/decal/cleanable/vomit/old/Initialize()
+/obj/effect/decal/cleanable/vomit/old/Initialize(mapload, list/datum/disease/diseases)
. = ..()
icon_state += "-old"
diff --git a/code/game/objects/effects/spawners/gibspawner.dm b/code/game/objects/effects/spawners/gibspawner.dm
index 8d7a446248..303bcd7f33 100644
--- a/code/game/objects/effects/spawners/gibspawner.dm
+++ b/code/game/objects/effects/spawners/gibspawner.dm
@@ -6,7 +6,7 @@
var/list/gibamounts = list() //amount to spawn for each gib decal type we'll spawn.
var/list/gibdirections = list() //of lists of possible directions to spread each gib decal type towards.
-/obj/effect/gibspawner/Initialize(mapload, datum/dna/MobDNA)
+/obj/effect/gibspawner/Initialize(mapload, datum/dna/MobDNA, list/datum/disease/diseases)
. = ..()
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
@@ -24,7 +24,7 @@
if(gibamounts[i])
for(var/j = 1, j<= gibamounts[i], j++)
var/gibType = gibtypes[i]
- gib = new gibType(loc)
+ gib = new gibType(loc, diseases)
if(iscarbon(loc))
var/mob/living/carbon/digester = loc
digester.stomach_contents += gib
diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm
index 9e89176f72..27b5462b56 100644
--- a/code/modules/clothing/shoes/magboots.dm
+++ b/code/modules/clothing/shoes/magboots.dm
@@ -5,6 +5,7 @@
var/magboot_state = "magboots"
var/magpulse = 0
var/slowdown_active = 2
+ permeability_coefficient = 0.05
actions_types = list(/datum/action/item_action/toggle)
strip_delay = 70
equip_delay_other = 70
diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm
index 026b011e39..ab2763f62e 100644
--- a/code/modules/clothing/shoes/miscellaneous.dm
+++ b/code/modules/clothing/shoes/miscellaneous.dm
@@ -23,6 +23,7 @@
armor = list(melee = 25, bullet = 25, laser = 25, energy = 25, bomb = 50, bio = 10, rad = 0, fire = 70, acid = 50)
strip_delay = 70
resistance_flags = 0
+ permeability_coefficient = 0.05 //Thick soles, and covers the ankle
pockets = /obj/item/storage/internal/pocket/shoes
/obj/item/clothing/shoes/combat/swat //overpowered boots for death squads
@@ -38,6 +39,7 @@
icon_state = "wizard"
strip_delay = 50
equip_delay_other = 50
+ permeability_coefficient = 0.9
/obj/item/clothing/shoes/sandal/marisa
desc = "A pair of magic black shoes."
@@ -54,7 +56,7 @@
desc = "A pair of yellow rubber boots, designed to prevent slipping on wet surfaces."
name = "galoshes"
icon_state = "galoshes"
- permeability_coefficient = 0.05
+ permeability_coefficient = 0.01
flags_1 = NOSLIP_1
slowdown = SHOES_SLOWDOWN+1
strip_delay = 50
@@ -102,6 +104,7 @@
strip_delay = 50
equip_delay_other = 50
resistance_flags = 0
+ permeability_coefficient = 0.05 //Thick soles, and covers the ankle
pockets = /obj/item/storage/internal/pocket/shoes
/obj/item/clothing/shoes/jackboots/fast
@@ -112,6 +115,7 @@
desc = "Boots lined with 'synthetic' animal fur."
icon_state = "winterboots"
item_state = "winterboots"
+ permeability_coefficient = 0.15
cold_protection = FEET|LEGS
min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT
heat_protection = FEET|LEGS
@@ -125,6 +129,7 @@
item_state = "jackboots"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
+ permeability_coefficient = 0.15
strip_delay = 40
equip_delay_other = 40
pockets = /obj/item/storage/internal/pocket/shoes
@@ -171,6 +176,7 @@
item_state = "roman"
strip_delay = 100
equip_delay_other = 100
+ permeability_coefficient = 0.9
/obj/item/clothing/shoes/griffin
name = "griffon boots"
@@ -188,6 +194,7 @@
resistance_flags = FIRE_PROOF
pockets = /obj/item/storage/internal/pocket/shoes
actions_types = list(/datum/action/item_action/bhop)
+ permeability_coefficient = 0.05
var/jumpdistance = 5 //-1 from to see the actual distance, e.g 4 goes over 3 tiles
var/jumpspeed = 3
var/recharging_rate = 60 //default 6 seconds between each dash
diff --git a/code/modules/clothing/spacesuits/flightsuit.dm b/code/modules/clothing/spacesuits/flightsuit.dm
index 0c16a2b764..f66eae98d8 100644
--- a/code/modules/clothing/spacesuits/flightsuit.dm
+++ b/code/modules/clothing/spacesuits/flightsuit.dm
@@ -869,7 +869,12 @@
var/obj/item/device/flightpack/pack = null
var/mob/living/carbon/human/wearer = null
var/active = FALSE
+<<<<<<< HEAD
resistance_flags = FIRE_PROOF
+=======
+ permeability_coefficient = 0.01
+ resistance_flags = FIRE_PROOF | ACID_PROOF
+>>>>>>> db0c10e... Refactors virus spreading (#31066)
/obj/item/clothing/shoes/flightshoes/Destroy()
pack = null
diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
index b1eb0f2f72..372c085adb 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
@@ -147,6 +147,7 @@
var/obj/item/reagent_containers/food/snacks/meat/slab/allmeat[meat_produced]
var/obj/item/stack/sheet/animalhide/skin
+ var/list/datum/disease/diseases = mob_occupant.get_static_viruses()
if(ishuman(occupant))
var/mob/living/carbon/human/gibee = occupant
@@ -180,26 +181,28 @@
mob_occupant.death(1)
mob_occupant.ghostize()
qdel(src.occupant)
- spawn(src.gibtime)
- playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
- operating = FALSE
- var/turf/T = get_turf(src)
- var/list/turf/nearby_turfs = RANGE_TURFS(3,T) - T
- if(skin)
- skin.forceMove(loc)
- skin.throw_at(pick(nearby_turfs),meat_produced,3)
- for (var/i=1 to meat_produced)
- var/obj/item/meatslab = allmeat[i]
- meatslab.forceMove(loc)
- meatslab.throw_at(pick(nearby_turfs),i,3)
- for (var/turfs=1 to meat_produced)
- var/turf/gibturf = pick(nearby_turfs)
- if (!gibturf.density && src in view(gibturf))
- new gibtype(gibturf,i)
+ addtimer(CALLBACK(src, .proc/make_meat, skin, allmeat, meat_produced, gibtype, diseases), gibtime)
- pixel_x = initial(pixel_x) //return to its spot after shaking
- operating = FALSE
- update_icon()
+/obj/machinery/gibber/proc/make_meat(obj/item/stack/sheet/animalhide/skin, list/obj/item/reagent_containers/food/snacks/meat/slab/allmeat, meat_produced, gibtype, list/datum/disease/diseases)
+ playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
+ operating = FALSE
+ var/turf/T = get_turf(src)
+ var/list/turf/nearby_turfs = RANGE_TURFS(3,T) - T
+ if(skin)
+ skin.forceMove(loc)
+ skin.throw_at(pick(nearby_turfs),meat_produced,3)
+ for (var/i=1 to meat_produced)
+ var/obj/item/meatslab = allmeat[i]
+ meatslab.forceMove(loc)
+ meatslab.throw_at(pick(nearby_turfs),i,3)
+ for (var/turfs=1 to meat_produced)
+ var/turf/gibturf = pick(nearby_turfs)
+ if (!gibturf.density && src in view(gibturf))
+ new gibtype(gibturf,i,diseases)
+
+ pixel_x = initial(pixel_x) //return to its spot after shaking
+ operating = FALSE
+ update_icon()
//auto-gibs anything that bumps into it
/obj/machinery/gibber/autogibber
diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
index fb871f2c3a..0699e22547 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
@@ -135,7 +135,7 @@
for(var/thing in O.viruses)
var/datum/disease/D = thing
- if(!(D.spread_flags & SPECIAL))
+ if(!(D.spread_flags & VIRUS_SPREAD_SPECIAL))
B.data["viruses"] += D.Copy()
if(O.has_dna())
B.data["blood_DNA"] = O.dna.unique_enzymes
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index efc46faa31..9424db47e1 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -846,7 +846,7 @@
agent = "dragon's blood"
desc = "What do dragons have to do with Space Station 13?"
stage_prob = 20
- severity = BIOHAZARD
+ severity = VIRUS_SEVERITY_BIOHAZARD
visibility_flags = 0
stage1 = list("Your bones ache.")
stage2 = list("Your skin feels scaly.")
diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm
index 8e547eeb12..30d5652ab4 100644
--- a/code/modules/mob/living/blood.dm
+++ b/code/modules/mob/living/blood.dm
@@ -139,7 +139,7 @@
if(blood_data["viruses"])
for(var/thing in blood_data["viruses"])
var/datum/disease/D = thing
- if((D.spread_flags & SPECIAL) || (D.spread_flags & NON_CONTAGIOUS))
+ if((D.spread_flags & VIRUS_SPREAD_SPECIAL) || (D.spread_flags & VIRUS_SPREAD_NON_CONTAGIOUS))
continue
C.ForceContractDisease(D)
if(!(blood_data["blood_type"] in get_safe_blood(C.dna.blood_type)))
@@ -258,14 +258,14 @@
temp_blood_DNA |= drop.blood_DNA.Copy() //we transfer the dna from the drip to the splatter
qdel(drop)//the drip is replaced by a bigger splatter
else
- drop = new(T)
+ drop = new(T, get_static_viruses())
drop.transfer_mob_blood_dna(src)
return
// Find a blood decal or create a new one.
var/obj/effect/decal/cleanable/blood/B = locate() in T
if(!B)
- B = new /obj/effect/decal/cleanable/blood/splatter(T)
+ B = new /obj/effect/decal/cleanable/blood/splatter(T, get_static_viruses())
B.transfer_mob_blood_dna(src) //give blood info to the blood decal.
if(temp_blood_DNA)
B.blood_DNA |= temp_blood_DNA
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 80c6d836a0..75b53d11cb 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -756,7 +756,7 @@
B.damaged_brain = 0
for(var/thing in viruses)
var/datum/disease/D = thing
- if(D.severity != NONTHREAT)
+ if(D.severity != VIRUS_SEVERITY_POSITIVE)
D.cure(0)
if(admin_revive)
regenerate_limbs()
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index d90db23679..66f4fc8fb2 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -113,13 +113,13 @@
for(var/thing in viruses)
var/datum/disease/D = thing
- if(D.IsSpreadByTouch())
- user.ContractDisease(D)
+ if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
+ user.ContactContractDisease(D)
for(var/thing in user.viruses)
var/datum/disease/D = thing
- if(D.IsSpreadByTouch())
- ContractDisease(D)
+ if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
+ ContactContractDisease(D)
if(lying && surgeries.len)
if(user.a_intent == INTENT_HELP)
@@ -132,13 +132,13 @@
/mob/living/carbon/attack_paw(mob/living/carbon/monkey/M)
for(var/thing in viruses)
var/datum/disease/D = thing
- if(D.IsSpreadByTouch())
- M.ContractDisease(D)
+ if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
+ M.ContactContractDisease(D)
for(var/thing in M.viruses)
var/datum/disease/D = thing
- if(D.IsSpreadByTouch())
- ContractDisease(D)
+ if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
+ ContactContractDisease(D)
if(M.a_intent == INTENT_HELP)
help_shake_act(M)
diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm
index 282de04ede..c3ae5c39c3 100644
--- a/code/modules/mob/living/carbon/human/death.dm
+++ b/code/modules/mob/living/carbon/human/death.dm
@@ -6,9 +6,9 @@
/mob/living/carbon/human/spawn_gibs(with_bodyparts)
if(with_bodyparts)
- new /obj/effect/gibspawner/human(get_turf(src), dna)
+ new /obj/effect/gibspawner/human(get_turf(src), dna, get_static_viruses())
else
- new /obj/effect/gibspawner/humanbodypartless(get_turf(src), dna)
+ new /obj/effect/gibspawner/humanbodypartless(get_turf(src), dna, get_static_viruses())
/mob/living/carbon/human/spawn_dust(just_ash = FALSE)
if(just_ash)
diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm
index 40219161c6..c38ab397c8 100644
--- a/code/modules/mob/living/death.dm
+++ b/code/modules/mob/living/death.dm
@@ -18,7 +18,7 @@
return
/mob/living/proc/spawn_gibs()
- new /obj/effect/gibspawner/generic(get_turf(src))
+ new /obj/effect/gibspawner/generic(get_turf(src), null, get_static_viruses())
/mob/living/proc/spill_organs()
return
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 2fc6f79ec3..eae437caf6 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -108,6 +108,17 @@
//Even if we don't push/swap places, we "touched" them, so spread fire
spreadFire(M)
+ //Also diseases
+ for(var/thing in viruses)
+ var/datum/disease/D = thing
+ if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
+ M.ContactContractDisease(D)
+
+ for(var/thing in M.viruses)
+ var/datum/disease/D = thing
+ if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
+ ContactContractDisease(D)
+
if(now_pushing)
return 1
@@ -507,7 +518,7 @@
if((newdir in GLOB.cardinals) && (prob(50)))
newdir = turn(get_dir(target_turf, start), 180)
if(!blood_exists)
- new /obj/effect/decal/cleanable/trail_holder(start)
+ new /obj/effect/decal/cleanable/trail_holder(start, get_static_viruses())
for(var/obj/effect/decal/cleanable/trail_holder/TH in start)
if((!(newdir in TH.existing_dirs) || trail_type == "trails_1" || trail_type == "trails_2") && TH.existing_dirs.len <= 16) //maximum amount of overlays is 16 (all light & heavy directions filled)
diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm
index 3a46e46beb..8f8e574de5 100644
--- a/code/modules/mob/living/simple_animal/bot/medbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/medbot.dm
@@ -376,8 +376,8 @@
var/datum/disease/D = thing
//the medibot can't detect viruses that are undetectable to Health Analyzers or Pandemic machines.
if(!(D.visibility_flags & HIDDEN_SCANNER || D.visibility_flags & HIDDEN_PANDEMIC) \
- && D.severity != NONTHREAT \
- && (D.stage > 1 || (D.spread_flags & AIRBORNE))) // medibot can't detect a virus in its initial stage unless it spreads airborne.
+ && D.severity != VIRUS_SEVERITY_POSITIVE \
+ && (D.stage > 1 || (D.spread_flags & VIRUS_SPREAD_AIRBORNE))) // medibot can't detect a virus in its initial stage unless it spreads airborne.
return 1 //STOP DISEASE FOREVER
return 0
@@ -428,8 +428,8 @@
var/datum/disease/D = thing
//detectable virus
if((!(D.visibility_flags & HIDDEN_SCANNER)) || (!(D.visibility_flags & HIDDEN_PANDEMIC)))
- if(D.severity != NONTHREAT) //virus is harmful
- if((D.stage > 1) || (D.spread_flags & AIRBORNE))
+ if(D.severity != VIRUS_SEVERITY_POSITIVE) //virus is harmful
+ if((D.stage > 1) || (D.spread_flags & VIRUS_SPREAD_AIRBORNE))
virus = 1
if(!reagent_id && (virus))
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index 7ceffa198b..941f459c01 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -1000,7 +1000,7 @@
var/datum/disease/parrot_possession/P = new
P.parrot = src
loc = H
- H.ContractDisease(P)
+ H.ForceContractDisease(P)
parrot_interest = null
H.visible_message("[src] dive bombs into [H]'s chest and vanishes!", "[src] dive bombs into your chest, vanishing! This can't be good!")
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 4165651dbd..02c1fa4b44 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -336,6 +336,18 @@
if(ismob(AM))
var/mob/M = AM
+
+ //Share diseases that are spread by touch
+ for(var/thing in viruses)
+ var/datum/disease/D = thing
+ if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
+ M.ContactContractDisease(D)
+
+ for(var/thing in M.viruses)
+ var/datum/disease/D = thing
+ if(D.spread_flags & VIRUS_SPREAD_CONTACT_SKIN)
+ ContactContractDisease(D)
+
add_logs(src, M, "grabbed", addition="passive grab")
if(!supress_message)
visible_message("[src] has grabbed [M] passively!")
@@ -941,6 +953,16 @@
/mob/proc/get_idcard()
return
+/mob/proc/get_static_viruses() //used when creating blood and other infective objects
+ if(!LAZYLEN(viruses))
+ return
+ var/list/datum/disease/diseases = list()
+ for(var/datum/disease/D in viruses)
+ var/static_virus = D.Copy()
+ diseases += static_virus
+ return diseases
+
+
/mob/vv_get_dropdown()
. = ..()
. += "---"
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index 01d50fb606..06f77361c3 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -61,7 +61,7 @@
M.jitteriness = 0
for(var/thing in M.viruses)
var/datum/disease/D = thing
- if(D.severity == NONTHREAT)
+ if(D.severity == VIRUS_SEVERITY_POSITIVE)
continue
D.cure()
..()
diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm
index 6e02cc5696..8ce843e26b 100644
--- a/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -16,11 +16,11 @@
for(var/thing in data["viruses"])
var/datum/disease/D = thing
- if((D.spread_flags & SPECIAL) || (D.spread_flags & NON_CONTAGIOUS))
+ if((D.spread_flags & VIRUS_SPREAD_SPECIAL) || (D.spread_flags & VIRUS_SPREAD_NON_CONTAGIOUS))
continue
- if(method == TOUCH || method == VAPOR)
- M.ContractDisease(D)
+ if((method == TOUCH || method == VAPOR) && (D.spread_flags & VIRUS_SPREAD_CONTACT_FLUIDS))
+ M.ContactContractDisease(D)
else //ingest, patch or inject
M.ForceContractDisease(D)
@@ -1058,7 +1058,7 @@
/datum/reagent/xenomicrobes/reaction_mob(mob/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0)
if(method==PATCH || method==INGEST || method==INJECT || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection))))
- M.ContractDisease(new /datum/disease/transformation/xeno(0))
+ M.ForceContractDisease(new /datum/disease/transformation/xeno(0))
/datum/reagent/fungalspores
name = "Tubercle bacillus Cosmosis microbes"
diff --git a/tgstation.dme b/tgstation.dme
index ab5b26b120..bf2aaf2732 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -37,6 +37,7 @@
#include "code\__DEFINES\construction.dm"
#include "code\__DEFINES\contracts.dm"
#include "code\__DEFINES\cult.dm"
+#include "code\__DEFINES\diseases.dm"
#include "code\__DEFINES\DNA.dm"
#include "code\__DEFINES\events.dm"
#include "code\__DEFINES\flags.dm"
@@ -301,6 +302,7 @@
#include "code\datums\antagonists\ninja.dm"
#include "code\datums\components\_component.dm"
#include "code\datums\components\archaeology.dm"
+#include "code\datums\components\infective.dm"
#include "code\datums\components\material_container.dm"
#include "code\datums\components\paintable.dm"
#include "code\datums\components\slippery.dm"