From 6ad72e6972570a305c639707a3b0a1f36d127b33 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Fri, 5 Jun 2020 15:41:52 +0100 Subject: [PATCH] better limb healing --- code/game/objects/items/tools/weldingtool.dm | 7 ++++++- code/modules/power/cable.dm | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 9560f7fab3..6bcac76824 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -108,13 +108,18 @@ var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected)) if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM) + //only heal to 25 if limb is damaged to or past 25 brute, otherwise heal normally + var/difference = affecting.brute_dam - 25 + var/heal_amount = 15 + if(difference >= 0) + heal_amount = difference if(src.use_tool(H, user, 0, volume=50, amount=1)) if(user == H) user.visible_message("[user] starts to fix some of the dents on [H]'s [affecting.name].", "You start fixing some of the dents on [H]'s [affecting.name].") if(!do_mob(user, H, 50)) return - item_heal_robotic(H, user, 15, 0) + item_heal_robotic(H, user, heal_amount, 0) else return ..() diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 0d674a2f77..3695464145 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -549,11 +549,16 @@ By design, d1 is the smallest direction and d2 is the highest var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected)) if(affecting && affecting.status == BODYPART_ROBOTIC) + //only heal to 25 if limb is damaged to or past 25 burn, otherwise heal normally + var/difference = affecting.burn_dam - 25 + var/heal_amount = 15 + if(difference >= 0) + heal_amount = difference if(user == H) user.visible_message("[user] starts to fix some of the wires in [H]'s [affecting.name].", "You start fixing some of the wires in [H]'s [affecting.name].") if(!do_mob(user, H, 50)) return - if(item_heal_robotic(H, user, 0, 15)) + if(item_heal_robotic(H, user, 0, heal_amount)) use(1) return else