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

🆑
fix: Trying to repair someone's undamaged limb with a welder or wires no
longer has you smacking them
/🆑

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
Waterpig
2024-08-16 15:25:32 +02:00
committed by GitHub
parent 7aff10c519
commit 2000b07e29
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -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]."))
+3 -2
View File
@@ -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]."))