From ccb95c996c21fb8e5d6102db5d141608b9b224f5 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Tue, 15 Jul 2014 15:57:28 +0930 Subject: [PATCH] Made Vox-Pidgin and Rootspeak untranslatable even by pAIs. --- code/modules/mob/language.dm | 10 +++++----- code/modules/mob/living/silicon/pai/pai.dm | 10 +++++----- code/modules/mob/living/silicon/say.dm | 14 +++++++------- code/modules/mob/say.dm | 14 +++++++------- code/setup.dm | 9 +++++---- 5 files changed, 29 insertions(+), 28 deletions(-) diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index 1d8f363953f..1a8b76c11c6 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -34,10 +34,10 @@ speech_verb = "mrowls" colour = "tajaran_signlang" key = "y" //only "dfpqxyz" left. - + //need to find a way to resolve possesive macros signlang_verb = list("flicks their left ear", "flicks their right ear", "swivels their ears", "twitches their tail", "curls the end of their tail", "arches their tail", "wiggles the end of their tail", "waves their tail about", "holds up a claw", "gestures with their left hand", "gestures with their right hand", "gestures with their tail", "gestures with their ears") - + flags = WHITELISTED | NONVERBAL /datum/language/skrell @@ -54,7 +54,7 @@ speech_verb = "shrieks" colour = "vox" key = "v" - flags = RESTRICTED + flags = RESTRICTED | UNTRANSLATABLE /datum/language/diona name = "Rootspeak" @@ -62,7 +62,7 @@ speech_verb = "creaks and rustles" colour = "soghun" key = "q" - flags = RESTRICTED + flags = RESTRICTED | UNTRANSLATABLE /datum/language/human name = "Sol Common" @@ -106,7 +106,7 @@ // Can we speak this language, as opposed to just understanding it? /mob/proc/can_speak(datum/language/speaking) - return (universal_speak || speaking in src.languages) + return ((universal_speak && !(speaking.flags & UNTRANSLATABLE)) || speaking in src.languages) //TBD /mob/verb/check_languages() diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 8f65ee384e6..95e6dac83e4 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -67,7 +67,7 @@ add_language("Sol Common", 1) add_language("Tradeband", 1) add_language("Gutter", 1) - + //PDA pda = new(src) spawn(5) @@ -81,20 +81,20 @@ ..() usr << browse_rsc('html/paigrid.png') // Go ahead and cache the interface resources as early as possible - + // this function shows the information about being silenced as a pAI in the Status panel /mob/living/silicon/pai/proc/show_silenced() if(src.silence_time) var/timeleft = round((silence_time - world.timeofday)/10 ,1) stat(null, "Communications system reboot in -[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]") - - + + /mob/living/silicon/pai/Stat() ..() statpanel("Status") if (src.client.statpanel == "Status") show_silenced() - + if (proc_holder_list.len)//Generic list for proc_holder objects. for(var/obj/effect/proc_holder/P in proc_holder_list) statpanel("[P.panel]","",P) diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index 0811a52cd88..ad6a0408ba1 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -15,7 +15,7 @@ /mob/living/silicon/say_understands(var/other,var/datum/language/speaking = null) //These only pertain to common. Languages are handled by mob/say_understands() if (!speaking) - if (istype(other, /mob/living/carbon/human)) + if (istype(other, /mob/living/carbon)) return 1 if (istype(other, /mob/living/silicon)) return 1 @@ -60,7 +60,7 @@ return var/verb = say_quote(message) - + //parse radio key and consume it var/message_mode = parse_message_mode(message, "general") if (message_mode) @@ -68,19 +68,19 @@ message = trim(copytext(message,2)) else message = trim(copytext(message,3)) - + if(message_mode && bot_type == IS_ROBOT && message_mode != "binary" && !R.is_component_functioning("radio")) src << "\red Your radio isn't functional at this time." return - - + + //parse language key and consume it var/datum/language/speaking = parse_language(message) if (speaking) verb = speaking.speech_verb message = copytext(message,3) - - + + switch(message_mode) if("department") switch(bot_type) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 2c1b41a953d..1a5e93495bf 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -72,11 +72,11 @@ if (src.stat == 2) //Dead return 1 - + //Universal speak makes everything understandable, for obvious reasons. - else if(src.universal_speak || src.universal_understand) + else if((src.universal_speak || src.universal_understand) && !(speaking.flags & UNTRANSLATABLE)) return 1 - + //Languages are handled after. if (!speaking) if(!other) @@ -88,12 +88,12 @@ if (istype(other, src.type) || istype(src, other.type)) return 1 return 0 - + //Language check. for(var/datum/language/L in src.languages) if(speaking.name == L.name) return 1 - + return 0 /mob/proc/say_quote(var/text,var/datum/language/speaking) @@ -156,7 +156,7 @@ if(length(message) >= 2) var/channel_prefix = copytext(message, 1 ,3) return department_radio_keys[channel_prefix] - + return null //parses the language code (e.g. :j) from text, such as that supplied to say. @@ -167,6 +167,6 @@ var/datum/language/L = language_keys[language_prefix] if (can_speak(L)) return L - + return null diff --git a/code/setup.dm b/code/setup.dm index a86e0665765..2d38dd89962 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -744,10 +744,11 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse #define IS_SYNTHETIC 16384 //Language flags. -#define WHITELISTED 1 // Language is available if the speaker is whitelisted. -#define RESTRICTED 2 // Language can only be accquired by spawning or an admin. -#define NONVERBAL 4 // Language has a significant non-verbal component. Speech is garbled without line-of-sight -#define SIGNLANG 8 // Language is completely non-verbal. Speech is displayed through emotes for those who can understand. +#define WHITELISTED 1 // Language is available if the speaker is whitelisted. +#define RESTRICTED 2 // Language can only be accquired by spawning or an admin. +#define NONVERBAL 4 // Language has a significant non-verbal component. Speech is garbled without line-of-sight +#define SIGNLANG 8 // Language is completely non-verbal. Speech is displayed through emotes for those who can understand. +#define UNTRANSLATABLE 16 // Language is not translated by universal_speak or universal_understand. //Flags for zone sleeping #define ZONE_ACTIVE 1