Fixes earmuffs not protecting from vampire screeches

Fixes a bug where earmuffs wouldn't protect you from vampire screeches if you were wearing earmuffs in your right ear slot while wearing something else in your left ear slot.
This commit is contained in:
TheSardele
2019-07-30 00:36:45 +02:00
parent fba32dd761
commit 9e5fe62155
@@ -261,8 +261,10 @@
for(var/mob/living/carbon/C in hearers(4))
if(C == user)
continue
if(ishuman(C) && (C:l_ear || C:r_ear) && istype((C:l_ear || C:r_ear), /obj/item/clothing/ears/earmuffs))
continue
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs))
continue
if(!affects(C))
continue
to_chat(C, "<span class='warning'><font size='3'><b>You hear a ear piercing shriek and your senses dull!</font></b></span>")