From 483bd9a42191f74ef97d7652b2044e250d93edac Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Wed, 22 Sep 2010 16:38:22 +0000 Subject: [PATCH] The AI fixer should now properly set an AI's stat to 0 once it has been repaired enough to not die. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@143 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/machinery/computer/aifixer.dm | 4 ++++ code/modules/mob/living/silicon/ai/life.dm | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 8f703a4fd0d..2cff5db4028 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -157,6 +157,10 @@ src.occupant.toxloss = max (src.occupant.toxloss-1, 0) src.occupant.bruteloss = max (src.occupant.bruteloss-1, 0) sleep(10) + if (src.occupant.health <= 0 && src.occupant.stat == 2) + src.occupant.stat = 0 + src.overlays -= image('AIcore.dmi', "ai-fixer-404") + src.overlays += image('AIcore.dmi', "ai-fixer-full") src.active = 0 src.overlays -= image('AIcore.dmi', "ai-fixer-on") diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 20d54e41924..02e25788a15 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -26,10 +26,10 @@ src.fire.icon_state = "fire0" */ //TODO: DEFERRED - if (src.health <= -100.0 && !istype(src.loc, /obj/machinery/computer/aifixer)) + if (src.health <= -100.0) death() return - else if (src.health < 0 && !istype(src.loc, /obj/machinery/computer/aifixer)) + else if (src.health < 0) src.oxyloss++ if (src.machine)