From c6f9a5ea9cde86d3027036844caeb4f35d30bde1 Mon Sep 17 00:00:00 2001
From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Date: Sat, 28 Sep 2024 18:37:34 -0400
Subject: [PATCH] You can now emag humans again (#26857)
* You can now emag humans again
* Update code/modules/surgery/organs/organ_external.dm
Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com>
---------
Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
---
.../mob/living/carbon/human/human_defense.dm | 13 ++++++++-----
code/modules/surgery/organs/organ_external.dm | 2 +-
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 009b43763c8c..e1e610d7a32d 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -438,7 +438,12 @@ emp_act
I.acid_act(acidpwr, acid_volume)
return 1
-/mob/living/carbon/human/emag_act(user as mob, obj/item/organ/external/affecting)
+/mob/living/carbon/human/emag_act(mob/user)
+ var/obj/item/organ/external/affecting
+ if(!user.zone_selected) // pulse demons really.
+ affecting = get_organ(pick(BODY_ZONE_CHEST, BODY_ZONE_HEAD, BODY_ZONE_L_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_ARM, BODY_ZONE_R_LEG))
+ else
+ affecting = get_organ(user.zone_selected)
if(!istype(affecting))
return
if(!affecting.is_robotic())
@@ -447,9 +452,9 @@ emp_act
if(affecting.sabotaged)
to_chat(user, "[src]'s [affecting.name] is already sabotaged!")
else
- to_chat(user, "You sneakily slide the card into the dataport on [src]'s [affecting.name] and short out the safeties.")
+ to_chat(user, "You sneakily hack into the dataport on [src]'s [affecting.name] and short out the safeties.")
affecting.sabotaged = TRUE
- return 1
+ return TRUE
/mob/living/carbon/human/grabbedby(mob/living/user)
if(w_uniform)
@@ -493,8 +498,6 @@ emp_act
visible_message("[src] blocks [I]!")
return FALSE
- if(istype(I,/obj/item/card/emag))
- emag_act(user, affecting)
send_item_attack_message(I, user, hit_area)
diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm
index 506747dde5c9..c01ab721347b 100644
--- a/code/modules/surgery/organs/organ_external.dm
+++ b/code/modules/surgery/organs/organ_external.dm
@@ -927,7 +927,7 @@ Note that amputating the affected organ does in fact remove the infection from t
"\The [victim]'s [name] explodes violently!",\
"Your [name] explodes!",\
"You hear an explosion!")
- explosion(get_turf(owner),-1,-1,2,3)
+ explosion(get_turf(victim), -1, -1, 2, 3)
do_sparks(5, 0, victim)
qdel(src)