From 5e871f159d3b1847190ffc7406dab1b8b5a6bed1 Mon Sep 17 00:00:00 2001 From: Crazylemon Date: Tue, 22 Sep 2015 17:21:59 -0700 Subject: [PATCH] Allows repair of pAIs with nanopaste --- code/modules/mob/living/silicon/pai/pai.dm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 7594dae17b0..14b4be1d801 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -432,7 +432,22 @@ //Overriding this will stop a number of headaches down the track. /mob/living/silicon/pai/attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if(W.force) + if(isType(W, /obj/item/stack/nanopaste)) + if (stat == DEAD) + user << "The [src] is beyond help, at this point." + else if (getBruteLoss() || getFireLoss()) + adjustBruteLoss(-15) + adjustFireLoss(-15) + updatehealth() + use(1) + user.visible_message("[user.name] applied some [W] at [src]'s damaged areas.",\ + "You apply some [W] at [src.name]'s damaged areas.") + else + user << "All [src.name]'s systems are nominal." + + return + + else if(W.force) visible_message("[user.name] attacks [src] with [W]!") src.adjustBruteLoss(W.force) src.updatehealth()