Merge pull request #4076 from Citadel-Station-13/upstream-merge-32858

[MIRROR] Divides species in subtypes, makes viruses able to infect certain subtypes
This commit is contained in:
deathride58
2017-12-04 21:57:29 +00:00
committed by GitHub
29 changed files with 193 additions and 135 deletions

View File

@@ -143,14 +143,25 @@
//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
return FALSE
AddDisease(D)
/mob/living/carbon/human/CanContractDisease(datum/disease/D)
if(dna && (VIRUSIMMUNE in dna.species.species_traits) && !D.bypasses_immunity)
return 0
if(dna)
if((VIRUSIMMUNE in dna.species.species_traits) && !D.bypasses_immunity)
return FALSE
var/can_infect = FALSE
for(var/host_type in D.infectable_hosts)
if(host_type in dna.species.species_traits)
can_infect = TRUE
break
if(!can_infect)
return FALSE
for(var/thing in D.required_organs)
if(!((locate(thing) in bodyparts) || (locate(thing) in internal_organs)))
return 0
return FALSE
return ..()

View File

@@ -30,6 +30,8 @@
var/list/required_organs = list()
var/needs_all_cures = TRUE
var/list/strain_data = list() //dna_spread special bullshit
var/list/infectable_hosts = list(SPECIES_ORGANIC) //if the disease can spread on organics, synthetics, or undead
var/process_dead = FALSE //if this ticks while the host is dead
/datum/disease/Destroy()
affected_mob = null

View File

@@ -0,0 +1,30 @@
/datum/symptom/undead_adaptation
name = "Necrotic Metabolism"
desc = "The virus is able to thrive and act even within dead hosts."
stealth = 2
resistance = -2
stage_speed = 1
transmittable = 0
level = 5
severity = 0
/datum/symptom/undead_adaptation/Start(datum/disease/advance/A)
if(!..())
return
A.process_dead = TRUE
A.infectable_hosts |= SPECIES_UNDEAD
/datum/symptom/inorganic_adaptation
name = "Inorganic Biology"
desc = "The virus can survive and replicate even in an inorganic environment, increasing its resistance and infection rate."
stealth = -1
resistance = 4
stage_speed = -2
transmittable = 3
level = 5
severity = 0
/datum/symptom/inorganic_adaptation/Start(datum/disease/advance/A)
if(!..())
return
A.infectable_hosts |= SPECIES_INORGANIC

View File

@@ -10,6 +10,7 @@
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
desc = "If left untreated subject will regurgitate bees."
severity = VIRUS_SEVERITY_MEDIUM
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_UNDEAD) //bees nesting in corpses
/datum/disease/beesease/stage_act()
..()

View File

@@ -10,6 +10,8 @@
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
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_ROBOTIC)
process_dead = TRUE
/datum/disease/magnitis/stage_act()
..()

View File

@@ -11,6 +11,8 @@
viable_mobtypes = list(/mob/living/carbon/human)
desc = "Subject is possesed by the vengeful spirit of a parrot. Call the priest."
severity = VIRUS_SEVERITY_MEDIUM
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_UNDEAD, SPECIES_INORGANIC, SPECIES_ROBOTIC)
bypasses_immunity = TRUE //2spook
var/mob/living/simple_animal/parrot/Poly/ghost/parrot
/datum/disease/parrot_possession/stage_act()

View File

@@ -9,6 +9,7 @@
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 1
severity = VIRUS_SEVERITY_BIOHAZARD
process_dead = TRUE
/datum/disease/rhumba_beat/stage_act()
..()

View File

@@ -127,7 +127,7 @@
stage4 = list("<span class='danger'>Your skin feels very loose.</span>", "<span class='danger'>You can feel... something...inside you.</span>")
stage5 = list("<span class='danger'>Your skin feels as if it's about to burst off!</span>")
new_form = /mob/living/silicon/robot
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_UNDEAD, SPECIES_ROBOTIC)
/datum/disease/transformation/robot/stage_act()
..()
@@ -240,3 +240,4 @@
stage4 = list("<span class='danger'>You're ravenous.</span>")
stage5 = list("<span class='danger'>You have become a morph.</span>")
new_form = /mob/living/simple_animal/hostile/morph
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_INORGANIC, SPECIES_UNDEAD) //magic!