From 2000b07e29b1027bfaba94289c12ff056ae491bf Mon Sep 17 00:00:00 2001 From: Waterpig <49160555+Majkl-J@users.noreply.github.com> Date: Fri, 16 Aug 2024 15:25:32 +0200 Subject: [PATCH] Fixes welding and coil logic on robotic limb fixing (#85857) ## About The Pull Request Before, trying to fix an undamaged limb would have you whack the person with the wires, or burn them with a welder. This is quite counter productive when trying to repair someone. Now it cancels any further attacks when you click on an uninjured limb, and tells you about it. ![image](https://github.com/user-attachments/assets/1fc94d15-5508-4fa2-bdfa-bde856eaba20) ## Why It's Good For The Game I won't accidentally smack someone with a burning welder without combat mode on just because their chest happens to have no damage. ## Changelog :cl: fix: Trying to repair someone's undamaged limb with a welder or wires no longer has you smacking them /:cl: Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/game/objects/items/tools/weldingtool.dm | 5 +++-- code/modules/power/cable.dm | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 7ffa183f576..a0a3c33fff3 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -153,8 +153,9 @@ if(isnull(affecting) || !IS_ROBOTIC_LIMB(affecting)) return NONE - if (!affecting.get_damage()) - return + if (!affecting.brute_dam) + balloon_alert(user, "limb not damaged") + return ITEM_INTERACT_BLOCKING user.visible_message(span_notice("[user] starts to fix some of the dents on [attacked_humanoid == user ? user.p_their() : "[attacked_humanoid]'s"] [affecting.name]."), span_notice("You start fixing some of the dents on [attacked_humanoid == user ? "your" : "[attacked_humanoid]'s"] [affecting.name].")) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 65b4f017229..d5f3fa0a767 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -581,8 +581,9 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri if(isnull(affecting) || !IS_ROBOTIC_LIMB(affecting)) return NONE - if (!affecting.get_damage()) - return + if (!affecting.burn_dam) + balloon_alert(user, "limb not damaged") + return ITEM_INTERACT_BLOCKING user.visible_message(span_notice("[user] starts to fix some of the wires in [attacked_humanoid == user ? user.p_their() : "[attacked_humanoid]'s"] [affecting.name]."), span_notice("You start fixing some of the wires in [attacked_humanoid == user ? "your" : "[attacked_humanoid]'s"] [affecting.name]."))