From 3922b92b3544e16f01fc8b2dd439d73432a72609 Mon Sep 17 00:00:00 2001 From: Remie Richards Date: Thu, 15 Sep 2016 04:24:58 +0100 Subject: [PATCH] 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 --- .../gamemodes/miniantags/revenant/revenant_blight.dm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/code/game/gamemodes/miniantags/revenant/revenant_blight.dm b/code/game/gamemodes/miniantags/revenant/revenant_blight.dm index 19cb12d0205..9133fa69c22 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_blight.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_blight.dm @@ -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 << "You feel better." 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("[affected_mob] looks terrifyingly gaunt...", "You suddenly feel like your skin is wrong...") - 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 \ No newline at end of file + return