Merge pull request #2137 from Crazylemon64/pai_nanopaste_repair

Allows Repair of pAIs with Nanopaste
This commit is contained in:
Mark van Alphen
2015-09-24 03:08:09 +02:00
+16 -1
View File
@@ -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))
var/obj/item/stack/nanopaste/N = W
if (stat == DEAD)
user << "<span class='danger'>\The [src] is beyond help, at this point.</span>"
else if (getBruteLoss() || getFireLoss())
adjustBruteLoss(-15)
adjustFireLoss(-15)
updatehealth()
N.use(1)
user.visible_message("<span class='notice'>[user.name] applied some [W] at [src]'s damaged areas.</span>",\
"<span class='notice'>You apply some [W] at [src.name]'s damaged areas.</span>")
else
user << "<span class='notice'>All [src.name]'s systems are nominal.</span>"
return
else if(W.force)
visible_message("<span class='danger'>[user.name] attacks [src] with [W]!</span>")
src.adjustBruteLoss(W.force)
src.updatehealth()