/* Datum based languages. Easily editable and modular. */ /datum/language var/name = "an unknown language" // Fluff name of language if any. var/desc = "A language." // Short description for 'Check Languages'. var/speech_verb = "says" // 'says', 'hisses', 'farts'. var/ask_verb = "asks" // Used when sentence ends in a ? var/exclaim_verb = "exclaims" // Used when sentence ends in a ! var/whisper_verb = "whispers" // For whispers and final whispers. var/colour = "body" // CSS style to use for strings in this language. var/key = "x" // Character used to speak in language eg. :o for Unathi. var/flags = 0 // Various language flags. var/native // If set, non-native speakers will have trouble speaking. var/list/syllables var/list/space_chance = 55 // Likelihood of getting a space in the random scramble string. /datum/language/proc/get_spoken_verb(var/msg, var/silicon, var/mode) switch(mode) if(SPEECH_MODE_WHISPER) return "[whisper_verb]" if(SPEECH_MODE_FINAL) return "[whisper_verb] with their final breath" var/msg_end = copytext(msg,length(msg)) switch(msg_end) if("!") return (silicon ? "declares" : exclaim_verb) if("?") return (silicon ? "queries" : ask_verb) return (silicon ? "states" : speech_verb) /datum/language/proc/say_misunderstood(mob/M, message) return stars(message) // N3X15-saycode splits saycode into two phases: filtering and rendering. // Therefore, filtering is in one proc while actual rendering is last. /datum/language/proc/filter_speech(var/datum/speech/speech) //var/datum/speech/speech2 = speech.clone() speech.message_classes.Add(colour) speech.message=capitalize(speech.message) return speech /datum/language/proc/render_speech(var/datum/speech/speech, var/html_message) // html_message is the message itself + tags. Do NOT filter it. return "[get_spoken_verb(speech.message,issilicon(speech.speaker),speech.mode)], [html_message]" /* Obsolete, here for reference /datum/language/proc/format_message(mob/M, message) return "[get_spoken_verb(message,issilicon(M))], \"[capitalize(message)]\"" /datum/language/proc/format_message_plain(mob/M, message) return "[get_spoken_verb(message,issilicon(M))], \"[capitalize(message)]\"" /datum/language/proc/format_message_radio(mob/M, message) return "[get_spoken_verb(message,issilicon(M))], \"[capitalize(message)]\"" */ /datum/language/unathi name = "Sinta'unathi" desc = "The common language of Moghes, composed of sibilant hisses and rattles. Spoken natively by Unathi." speech_verb = "hisses" ask_verb = "hisses" exclaim_verb = "roars" colour = "soghun" key = "o" flags = RESTRICTED syllables = list("ss","ss","ss","ss","skak","seeki","resh","las","esi","kor","sh") /datum/language/tajaran name = "Siik'tajr" desc = "An expressive language that combines yowls and chirps with posture, tail and ears. Native to the Tajaran." speech_verb = "mrowls" ask_verb = "mrowls" exclaim_verb = "yowls" colour = "tajaran" key = "j" flags = RESTRICTED syllables = list("rr","rr","tajr","kir","raj","kii","mir","kra","ahk","nal","vah","khaz","jri","ran","darr", \ "mi","jri","dynh","manq","rhe","zar","rrhaz","kal","chur","eech","thaa","dra","jurl","mah","sanu","dra","ii'r", \ "ka","aasi","far","wa","baq","ara","qara","zir","sam","mak","hrar","nja","rir","khan","jun","dar","rik","kah", \ "hal","ket","jurl","mah","tul","cresh","azu","ragh", "mro", "mra") /datum/language/skrell name = "Skrellian" desc = "A melodic and complex language spoken by the Skrell of Qerrbalak. Some of the notes are inaudible to humans." speech_verb = "warbles" ask_verb = "warbles" exclaim_verb = "warbles" colour = "skrell" key = "k" flags = RESTRICTED syllables = list("qr","qrr","xuq","qil","quum","xuqm","vol","xrim","zaoo","qu-uu","qix","qoo","zix","*","!") /datum/language/vox name = "Vox-pidgin" desc = "The common tongue of the various Vox ships making up the Shoal. It sounds like chaotic shrieking to everyone else." speech_verb = "caws" ask_verb = "creels" exclaim_verb = "shrieks" colour = "vox" key = "v" flags = RESTRICTED syllables = list("ti","ti","ti","hi","hi","ki","ki","ki","ki","ya","ta","ha","ka","ya","chi","cha","kah", \ "SKRE","AHK","EHK","RAWK","KRA","AAA","EEE","KI","II","KRI","KA") /datum/language/diona name = "Rootspeak" desc = "A creaking, subvocal language spoken instinctively by the Dionaea. Due to the unique makeup of the average Diona, a phrase of Rootspeak can be a combination of anywhere from one to twelve individual voices and notes." speech_verb = "creaks and rustles" ask_verb = "creaks" exclaim_verb = "rustles" colour = "soghun" key = "q" flags = RESTRICTED syllables = list("hs","zt","kr","st","sh") /datum/language/human name = "Sol Common" desc = "A bastardized hybrid of informal English and elements of Mandarin Chinese; the common language of the Sol system." key = "1" flags = RESTRICTED /datum/language/human/monkey name = "Monkey" desc = "Ook ook ook." speech_verb = "chimpers" ask_verb = "chimpers" exclaim_verb = "screeches" key = "6" syllables = list("ook","eek", "ack", "ookie", "eekie", "AHAH", "ree", "mudik", "bix", "nood", "mof", "ugga") // Galactic common languages (systemwide accepted standards). /datum/language/trader name = "Tradeband" desc = "Maintained by the various trading cartels in major systems, this elegant, structured language is used for bartering and bargaining." speech_verb = "enunciates" colour = "say_quote" key = "2" space_chance = 100 syllables = list("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit", "sed", "do", "eiusmod", "tempor", "incididunt", "ut", "labore", "et", "dolore", "magna", "aliqua", "ut", "enim", "ad", "minim", "veniam", "quis", "nostrud", "exercitation", "ullamco", "laboris", "nisi", "ut", "aliquip", "ex", "ea", "commodo", "consequat", "duis", "aute", "irure", "dolor", "in", "reprehenderit", "in", "voluptate", "velit", "esse", "cillum", "dolore", "eu", "fugiat", "nulla", "pariatur", "excepteur", "sint", "occaecat", "cupidatat", "non", "proident", "sunt", "in", "culpa", "qui", "officia", "deserunt", "mollit", "anim", "id", "est", "laborum") /datum/language/gutter name = "Gutter" desc = "Much like Standard, this crude pidgin tongue descended from numerous languages and serves as Tradeband for criminal elements." speech_verb = "growls" colour = "gutter" key = "3" syllables = list("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit", "sed", "do", "eiusmod", "tempor", "incididunt", "ut", "labore", "et", "dolore", "magna", "aliqua", "ut", "enim", "ad", "minim", "veniam", "quis", "nostrud", "exercitation", "ullamco", "laboris", "nisi", "ut", "aliquip", "ex", "ea", "commodo", "consequat", "duis", "aute", "irure", "dolor", "in", "reprehenderit", "in", "voluptate", "velit", "esse", "cillum", "dolore", "eu", "fugiat", "nulla", "pariatur", "excepteur", "sint", "occaecat", "cupidatat", "non", "proident", "sunt", "in", "culpa", "qui", "officia", "deserunt", "mollit", "anim", "id", "est", "laborum") /datum/language/grey name = "Grey" desc = "Sounds more like quacking than anything else." key = "k" speech_verb = "quacks" ask_verb = "acks" exclaim_verb = "quacks loudly" colour = "grey" native=1 flags = RESTRICTED space_chance = 100 syllables = list("ACK", "AKACK", "ACK") /datum/language/grey/say_misunderstood(mob/M, message) message="ACK" var/len = max(1,Ceiling(length(message)/3)) if(len > 1) for(var/i=0,i 1) for(var/i=0,i 5 && chance <= space_chance) scrambled_text += " " scrambled_text = trim(scrambled_text) var/ending = copytext(scrambled_text, length(scrambled_text)) if(ending == ".") scrambled_text = copytext(scrambled_text,1,length(scrambled_text)-1) var/input_ending = copytext(input, input_size) if(input_ending in list("!","?",".")) scrambled_text += input_ending // Add it to cache, cutting old entries if the list is too long scramble_cache[input] = scrambled_text if(scramble_cache.len > SCRAMBLE_CACHE_LEN) scramble_cache.Cut(1, scramble_cache.len-SCRAMBLE_CACHE_LEN-1) return scrambled_text #undef SCRAMBLE_CACHE_LEN