From 288f0926feb9ccf6dfd67706ebca55cf4224091f Mon Sep 17 00:00:00 2001 From: Spamcat Date: Wed, 27 Mar 2013 22:36:24 +0400 Subject: [PATCH] Made monkeys infectable, --- code/modules/mob/living/carbon/monkey/life.dm | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 14fdc2eb1f2..45e57a3da77 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -42,6 +42,9 @@ //Disabilities handle_disabilities() + //Virus updates, duh + handle_virus_updates() + //Apparently, the person who wrote this code designed it so that //blinded get reset each cycle and then get activated later in the //code. Very ugly. I dont care. Moving this stuff here so its easy @@ -147,6 +150,28 @@ emote("gasp") updatehealth() + proc/handle_virus_updates()//copypaste from mob/carbon/human/life.dm + if(bodytemperature > 406) + for(var/datum/disease/D in viruses) + D.cure() + if(!virus2) + for(var/obj/effect/decal/cleanable/blood/B in view(1,src)) + if(B.virus2 && get_infection_chance()) + infect_virus2(src,B.virus2) + for(var/obj/effect/decal/cleanable/mucus/M in view(1,src)) + if(M.virus2 && get_infection_chance()) + infect_virus2(src,M.virus2) + else + if(isnull(virus2)) // Trying to figure out a runtime error that keeps repeating + CRASH("virus2 nulled before calling activate()") + else + virus2.activate(src) + + // activate may have deleted the virus + if(!virus2) return + + // check if we're immune + if(virus2.antigen & src.antibodies) virus2.dead = 1 proc/breathe() if(reagents)