Adding some repair procs to cables and welders for IPC use.

Conflicts:
	code/modules/power/cable.dm
This commit is contained in:
Zuhayr
2014-05-03 17:37:46 -04:00
committed by ZomgPonies
parent abcb0bc686
commit 75d8633fbe
2 changed files with 52 additions and 5 deletions
+25 -2
View File
@@ -456,11 +456,15 @@
item_state = "crowbar_red"
/obj/item/weapon/weldingtool/attack(mob/M as mob, mob/user as mob)
if(hasorgans(M))
var/datum/organ/external/S = M:organs_by_name[user.zone_sel.selecting]
if (!S) return
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
return ..()
if(S.brute_dam)
S.heal_damage(15,0,0,1)
if(user != M)
@@ -471,8 +475,27 @@
user.visible_message("\red \The [user] patches some dents on their [S.display_name] with \the [src]",\
"\red You patch some dents on your [S.display_name]",\
"You hear a welder.")
else
user << "Nothing to fix!"
return
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC)
if(H.getFireLoss() > 0)
if(M == user)
user << "\red You can't repair damage to your own body - it's against OH&S."
return
user.visible_message("\red \The [user] patches some dents on \the [M] with \the [src]",\
"\red \The [user] patches some of your dents.",\
"You hear a welder.")
H.heal_organ_damage(5,0)
return
user << "Nothing to fix!"
else
return ..()