Fixes issues with burn repair surgery for robolimbs.

This commit is contained in:
Zuhayr
2015-12-25 08:50:58 +10:30
parent 084ba448fa
commit 9df402b0de
3 changed files with 19 additions and 29 deletions
+8 -13
View File
@@ -424,29 +424,24 @@
/obj/item/weapon/weldingtool/attack(var/atom/A, var/mob/living/user, var/def_zone)
if(ishuman(A) && user.a_intent == I_HELP)
return
return ..()
/obj/item/weapon/weldingtool/afterattack(var/mob/M, var/mob/user)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/mob/living/carbon/human/H = A
var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting]
if(!S || !(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP)
if(!S || !(S.status & ORGAN_ROBOT))
return ..()
if(S.brute_dam)
if(S.brute_dam < ROBOLIMB_SELF_REPAIR_CAP)
S.heal_damage(15,0,0,1)
user.visible_message("<span class='notice'>\The [user] patches some dents on \the [M]'s [S.name] with \the [src].</span>")
else if(S.open != 2)
user.visible_message("<span class='notice'>\The [user] patches some dents on \the [H]'s [S.name] with \the [src].</span>")
else if(S.open < 3)
user << "<span class='danger'>The damage is far too severe to patch over externally.</span>"
else if(S.open != 2)
else
return ..()
else
user << "<span class='notice'>Nothing to fix!</span>"
return
else
return ..()
return ..()
/*/obj/item/weapon/combitool
name = "combi-tool"