diff --git a/code/datums/brain_damage/phobia.dm b/code/datums/brain_damage/phobia.dm index 996021850..a75ff92f7 100644 --- a/code/datums/brain_damage/phobia.dm +++ b/code/datums/brain_damage/phobia.dm @@ -40,7 +40,7 @@ ..() if(HAS_TRAIT(owner, TRAIT_FEARLESS)) return - if(is_blind(owner)) + if(owner.is_blind()) return if(world.time > next_check && world.time > next_scare) next_check = world.time + 50 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 113cb529c..18abbf249 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -220,7 +220,7 @@ GLOBAL_VAR_INIT(mobids, 1) if(!msg) continue - if(visible_message_flags & EMOTE_MESSAGE) + if(visible_message_flags & EMOTE_MESSAGE && !M.is_blind()) M.create_chat_message(src, raw_message = raw_msg, runechat_flags = visible_message_flags) M.show_message(msg, MSG_VISUAL, blind_message, MSG_AUDIBLE) @@ -250,7 +250,7 @@ GLOBAL_VAR_INIT(mobids, 1) if(audible_message_flags & EMOTE_MESSAGE) message = "[src] [message]" for(var/mob/M in hearers) - if(audible_message_flags & EMOTE_MESSAGE) + if(audible_message_flags & EMOTE_MESSAGE && M.can_hear()) M.create_chat_message(src, raw_message = raw_msg, runechat_flags = audible_message_flags) M.show_message(message, MSG_AUDIBLE, deaf_message, MSG_VISUAL) @@ -443,7 +443,7 @@ GLOBAL_VAR_INIT(mobids, 1) // shift-click catcher may issue examinate() calls for out-of-sight turfs return - if(is_blind(src)) + if(is_blind()) to_chat(src, span_warning("Something is there but I can't see it!")) return diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 04ec45c91..a85fba03d 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -689,13 +689,9 @@ aimheight = 1 ///Checks if passed through item is blind -/proc/is_blind(A) - if(ismob(A)) - var/mob/B = A - if(HAS_TRAIT(B, TRAIT_BLIND)) - return TRUE - return B.eye_blind - return FALSE +/mob/proc/is_blind(A) + SHOULD_BE_PURE(TRUE) + return eye_blind ? TRUE : HAS_TRAIT(src, TRAIT_BLIND) ///Is the mob hallucinating? /mob/proc/hallucinating() diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 452c221bf..714d8f26e 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -417,7 +417,7 @@ if(mailer) return ..() - if(is_blind(user)) + if(user.is_blind()) return ..() if(istype(P, /obj/item/pen) || istype(P, /obj/item/natural/thorn)|| istype(P, /obj/item/natural/feather))