Fixes the revblight virus setting it's mob reference to a colour (#20486)

* Fixes the revblight virus setting it's mob reference to a colour

* Refactor revblight cure step

Replaces a spawn with a world time cooldown since we are already processing disease datums in the disease subsystem

* Refactor revblight cure step again

This time to use a timer, also define the color vars properly

* Adjust timing to match previous code
This commit is contained in:
Remie Richards
2016-09-15 15:24:58 +12:00
committed by oranges
parent 213eb800d0
commit 3922b92b35
@@ -14,9 +14,11 @@
severity = BIOHAZARD
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.
var/old_color = ""
/datum/disease/revblight/cure()
if(affected_mob)
affected_mob.color = old_color
affected_mob << "<span class='notice'>You feel better.</span>"
if(affected_mob.dna && affected_mob.dna.species)
affected_mob.dna.species.handle_mutant_bodyparts(affected_mob)
@@ -58,11 +60,8 @@
affected_mob.dna.species.handle_mutant_bodyparts(affected_mob,"#1d2953")
affected_mob.dna.species.handle_hair(affected_mob,"#1d2953")
affected_mob.visible_message("<span class='warning'>[affected_mob] looks terrifyingly gaunt...</span>", "<span class='revennotice'>You suddenly feel like your skin is <i>wrong</i>...</span>")
var/old_color = affected_mob.color
old_color = affected_mob.color
affected_mob.color = "#1d2953"
spawn(100)
if(affected_mob)
affected_mob = old_color
cure()
addtimer(src, "cure", 100, FALSE)
else
return
return