Merge pull request #6703 from Citadel-Station-13/upstream-merge-37656

[MIRROR] Fixes EMPs not working on people/backpacks/other storage being carried on people
This commit is contained in:
deathride58
2018-05-11 03:36:01 +00:00
committed by GitHub
5 changed files with 27 additions and 27 deletions
+8 -10
View File
@@ -407,16 +407,14 @@
*/
//Recursive function to find everything a mob is holding. Really shitty proc tbh.
/mob/living/get_contents()
. = list()
. |= list(src)
for(var/obj/o in .)
var/list/newlist = list()
o.SendSignal(COMSIG_TRY_STORAGE_RETURN_INVENTORY, newlist)
. |= newlist
for(var/obj/item/clothing/under/U in .)
. |= U.contents
for(var/obj/item/folder/F in .)
. |= F.contents
var/list/ret = list()
ret |= contents //add our contents
for(var/i in ret.Copy()) //iterate storage objects
var/atom/A = i
A.SendSignal(COMSIG_TRY_STORAGE_RETURN_INVENTORY, ret)
for(var/obj/item/folder/F in ret.Copy()) //very snowflakey-ly iterate folders
ret |= F.contents
return ret
// Living mobs use can_inject() to make sure that the mob is not syringe-proof in general.
/mob/living/proc/can_inject()
+1 -2
View File
@@ -317,8 +317,7 @@
return shock_damage
/mob/living/emp_act(severity)
var/list/L = src.get_contents()
for(var/obj/O in L)
for(var/obj/O in contents)
O.emp_act(severity)
..()