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
@@ -515,29 +515,24 @@ obj/structure/cable/proc/cableColor(var/colorC)
//you can use wires to heal robotics
/obj/item/stack/cable_coil/attack(var/atom/A, var/mob/living/user, var/def_zone)
if(ishuman(A) && user.a_intent == I_HELP)
return
return ..()
/obj/item/stack/cable_coil/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.burn_dam)
if(S.burn_dam < ROBOLIMB_SELF_REPAIR_CAP)
S.heal_damage(0,15,0,1)
user.visible_message("<span class='danger'>\The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].</span>")
else if(S.open != 2)
user.visible_message("<span class='danger'>\The [user] repairs some burn damage 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/stack/cable_coil/update_icon()
+3 -3
View File
@@ -166,15 +166,15 @@
if(..())
var/obj/item/stack/cable_coil/C = tool
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/limb_can_operate = (affected && affected.open == 2 && (affected.disfigured || affected.burn_dam > 0) && target_zone != O_MOUTH)
var/limb_can_operate = ((affected && affected.open >= 3) && (affected.disfigured || affected.burn_dam > 0) && target_zone != O_MOUTH)
if(limb_can_operate)
if(istype(C))
if(!C.get_amount() >= 3)
user << "<span class='danger'>You need three or more cable pieces to repair this damage.</span>"
return SURGERY_FAILURE
C.use(3)
return 1
return 0
return 1
return SURGERY_FAILURE
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)