Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emp act on human fix #7605

Merged
merged 4 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions code/modules/mob/living/carbon/human/human_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,6 @@ Contains most of the procs that are called when a mob is attacked by something
return TRUE
return FALSE

/mob/living/carbon/human/emp_act(severity)
. = ..()
for(var/obj/O in src)
if(!O)
continue
O.emp_act(severity)
for(var/obj/limb/O in limbs)
if(O.status & LIMB_DESTROYED)
continue
O.emp_act(severity)
for(var/datum/internal_organ/I in O.internal_organs)
if(I.robotic == FALSE)
continue
I.emp_act(severity)


//Returns 1 if the attack hit, 0 if it missed.
Expand Down
4 changes: 4 additions & 0 deletions code/modules/organs/limbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@
droplimb(0, 0, "EMP")
else
take_damage(damage, 0, 1, 1, used_weapon = "EMP")
for(var/datum/internal_organ/internal_organ in internal_organs)
if(internal_organ.robotic == FALSE)
continue
internal_organ.emp_act(severity)

/// If this limb can be dropped as a result of an EMP
/obj/limb/proc/can_emp_delimb()
Expand Down
Loading