mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-06-04 21:13:28 +01:00
3db4229918
mid-refactor of `take_overall_damage` Fully refactors the (?:take|heal)_(?:overall|organ)_damage procs Allows the dead to examine Removes the `blinded` var Refactor cyborg components so vision loss is instant Robot life/death updates instantly Adds instant updates for damage overlays and HUD icons for humans Final reconciliation with the species refactor Adds a stat debugging system and debugging logs Also fixes instant death on species change "Debugging logs" are used for stuff an admin wouldn't care about but someone debugging would I used it to fix people dying instantly when changing species due to temporary deletion of the brain Fox's requests Adds a more careful updating system to our reagents system
72 lines
2.1 KiB
Plaintext
72 lines
2.1 KiB
Plaintext
/datum/disease/dnaspread
|
|
name = "Space Retrovirus"
|
|
max_stages = 4
|
|
spread_text = "On contact"
|
|
spread_flags = CONTACT_GENERAL
|
|
cure_text = "Mutadone"
|
|
cures = list("mutadone")
|
|
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
|
|
agent = "S4E1 retrovirus"
|
|
viable_mobtypes = list(/mob/living/carbon/human)
|
|
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
|
|
|
|
|
|
/datum/disease/dnaspread/stage_act()
|
|
..()
|
|
if(!affected_mob.dna)
|
|
cure()
|
|
|
|
if(!strain_data["dna"])
|
|
//Absorbs the target DNA.
|
|
strain_data["dna"] = new affected_mob.dna.type
|
|
affected_mob.dna.copy_dna(strain_data["dna"])
|
|
carrier = TRUE
|
|
stage = 4
|
|
return
|
|
|
|
switch(stage)
|
|
if(2 || 3) //Pretend to be a cold and give time to spread.
|
|
if(prob(8))
|
|
affected_mob.emote("sneeze")
|
|
if(prob(8))
|
|
affected_mob.emote("cough")
|
|
if(prob(1))
|
|
to_chat(affected_mob, "<span class='danger'>Your muscles ache.</span>")
|
|
if(prob(20))
|
|
affected_mob.take_organ_damage(1)
|
|
if(prob(1))
|
|
to_chat(affected_mob, "<span class='danger'>Your stomach hurts.</span>")
|
|
if(prob(20))
|
|
affected_mob.adjustToxLoss(2)
|
|
if(4)
|
|
if(!transformed && !carrier)
|
|
//Save original dna for when the disease is cured.
|
|
original_dna = new affected_mob.dna.type
|
|
affected_mob.dna.copy_dna(original_dna)
|
|
|
|
to_chat(affected_mob, "<span class='danger'>You don't feel like yourself..</span>")
|
|
var/datum/dna/transform_dna = strain_data["dna"]
|
|
|
|
transform_dna.transfer_identity(affected_mob, transfer_SE = 1)
|
|
affected_mob.real_name = affected_mob.dna.real_name
|
|
affected_mob.updateappearance(mutcolor_update=1)
|
|
affected_mob.domutcheck()
|
|
|
|
transformed = 1
|
|
carrier = 1 //Just chill out at stage 4
|
|
|
|
return
|
|
|
|
/datum/disease/dnaspread/Destroy()
|
|
if(original_dna && transformed && affected_mob)
|
|
original_dna.transfer_identity(affected_mob, transfer_SE = 1)
|
|
affected_mob.real_name = affected_mob.dna.real_name
|
|
affected_mob.updateappearance(mutcolor_update=1)
|
|
affected_mob.domutcheck()
|
|
|
|
to_chat(affected_mob, "<span class='notice'>You feel more like yourself.</span>")
|
|
return ..()
|