Skip to content

Commit

Permalink
You can now emag humans again (#26857)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Qwertytoforty and Burzah authored Sep 28, 2024
1 parent fafb2d6 commit c6f9a5e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions code/modules/mob/living/carbon/human/human_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -447,9 +452,9 @@ emp_act
if(affecting.sabotaged)
to_chat(user, "<span class='warning'>[src]'s [affecting.name] is already sabotaged!</span>")
else
to_chat(user, "<span class='warning'>You sneakily slide the card into the dataport on [src]'s [affecting.name] and short out the safeties.</span>")
to_chat(user, "<span class='warning'>You sneakily hack into the dataport on [src]'s [affecting.name] and short out the safeties.</span>")
affecting.sabotaged = TRUE
return 1
return TRUE

/mob/living/carbon/human/grabbedby(mob/living/user)
if(w_uniform)
Expand Down Expand Up @@ -493,8 +498,6 @@ emp_act
visible_message("<span class='warning'>[src] blocks [I]!</span>")
return FALSE

if(istype(I,/obj/item/card/emag))
emag_act(user, affecting)

send_item_attack_message(I, user, hit_area)

Expand Down
2 changes: 1 addition & 1 deletion code/modules/surgery/organs/organ_external.dm
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ Note that amputating the affected organ does in fact remove the infection from t
"<span class='danger'>\The [victim]'s [name] explodes violently!</span>",\
"<span class='userdanger'>Your [name] explodes!</span>",\
"<span class='danger'>You hear an explosion!</span>")
explosion(get_turf(owner),-1,-1,2,3)
explosion(get_turf(victim), -1, -1, 2, 3)
do_sparks(5, 0, victim)
qdel(src)

Expand Down

0 comments on commit c6f9a5e

Please sign in to comment.