diff --git a/code/modules/mob/living/carbon/alien/say.dm b/code/modules/mob/living/carbon/alien/say.dm index 8393ae5b645..680e78091db 100644 --- a/code/modules/mob/living/carbon/alien/say.dm +++ b/code/modules/mob/living/carbon/alien/say.dm @@ -37,6 +37,8 @@ if(S.alien_talk_understand) if(S.alien_talk_understand == src.alien_talk_understand) S.show_message(rendered, 2) + else if (S.hivecheck()) + S.show_message(rendered, 2) var/list/listening = hearers(1, src) listening -= src diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 8ce4e8d22f5..63f607ce107 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -686,10 +686,6 @@ handle_regular_hud_updates() - if (istype(src.ears, /obj/item/device/radio/headset)) - var/obj/item/device/radio/headset/H = src.ears - src.robot_talk_understand = H.translate_binary - if (src.stat == 2 || src.mutations & 4) src.sight |= SEE_TURFS src.sight |= SEE_MOBS diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index a4aec223567..47400af1473 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -1,3 +1,21 @@ +/mob/living/proc/binarycheck() + if (istype(src, /mob/living/silicon)) return 1 + if (!istype(src, /mob/living/carbon/human)) return + var/mob/living/carbon/human/H = src + if (H.ears) + var/obj/item/device/radio/headset/dongle = H.ears + if(!istype(dongle)) return + if(dongle.translate_binary) return 1 + +/mob/living/proc/hivecheck() + if (istype(src, /mob/living/carbon/alien)) return 1 + if (!istype(src, /mob/living/carbon/human)) return + var/mob/living/carbon/human/H = src + if (H.ears) + var/obj/item/device/radio/headset/dongle = H.ears + if(!istype(dongle)) return + if(dongle.translate_hive) return 1 + /mob/living/say(var/message) message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) @@ -65,7 +83,7 @@ ":t" = "Syndicate", ":d" = "Mining", ":q" = "Cargo", - + //kinda localization -- rastaf0 //same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding. ":ê" = "right hand", @@ -84,7 +102,7 @@ ":â" = "Mining", ":é" = "Cargo", ) - + message_mode = keys[channel_prefix] //world << "channel_prefix=[channel_prefix]; message_mode=[message_mode]" if (message_mode) @@ -166,13 +184,15 @@ return if ("binary") + if(src.robot_talk_understand || src.binarycheck()) //message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant - src.robot_talk(message) + src.robot_talk(message) return if ("alientalk") + if(src.alien_talk_understand || src.hivecheck()) //message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant - src.alien_talk(message) + src.alien_talk(message) return if ("department") diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index 89a5d464c00..7f07cb7fe53 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -40,6 +40,8 @@ if(S.robot_talk_understand) if(S.robot_talk_understand == src.robot_talk_understand) S.show_message(rendered, 2) + else if (S.binarycheck()) + S.show_message(rendered, 2) var/list/listening = hearers(1, src) listening -= src