ID:169302
 
mob/proc/CheckOre(A)
switch(A)
if("Junk")
for(var/obj/stack/ore/junk/J in src)
return 1
return 0

is there a better way to check for an item in a player's contents than to use ugly procs like that?
Just use locate().

atom/proc/HasItem(type_path)
return locate(type_path) in src

mob/verb/Die()
if(HasItem(/obj/item/cyanide_pill))
del src
In response to YMIHere
Thankee kindly, that helped me avoid a long switch...

PS nice abs =P