Uploading all files.

This commit is contained in:
Quotefox
2019-09-23 18:26:34 +02:00
commit 7091cdbe8c
7779 changed files with 2601004 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
/datum/language/aphasia
name = "Gibbering"
desc = "It is theorized that any sufficiently brain-damaged person can speak this language."
speech_verb = "garbles"
ask_verb = "mumbles"
whisper_verb = "mutters"
exclaim_verb = "screams incoherently"
flags = LANGUAGE_HIDE_ICON_IF_NOT_UNDERSTOOD
key = "i"
syllables = list("m","n","gh","h","l","s","r","a","e","i","o","u")
space_chance = 20
default_priority = 10
icon_state = "aphasia"
+22
View File
@@ -0,0 +1,22 @@
/datum/language/beachbum
name = "Beachtongue"
desc = "An ancient language from the distant Beach Planet. People magically learn to speak it under the influence of space drugs."
speech_verb = "mumbles"
ask_verb = "grills"
exclaim_verb = "hollers"
key = "u"
space_chance = 85
default_priority = 90
syllables = list("cowabunga", "rad", "radical", "dudes", "bogus", "weeed", "every",
"dee", "dah", "woah", "surf", "blazed", "high", "heinous", "day",
"brah", "bro", "blown", "catch", "body", "beach", "oooo", "twenty",
"shiz", "phiz", "wizz", "pop", "chill", "awesome", "dude", "it",
"wax", "stoked", "yes", "ding", "way", "no", "wicked", "aaaa",
"cool", "hoo", "wah", "wee", "man", "maaaaaan", "mate", "wick",
"oh", "ocean", "up", "out", "rip", "slide", "big", "stomp",
"weed", "pot", "smoke", "four-twenty", "shove", "wacky", "hah",
"sick", "slash", "spit", "stoked", "shallow", "gun", "party",
"heavy", "stellar", "excellent", "triumphant", "babe", "four",
"tail", "trim", "tube", "wobble", "roll", "gnarly", "epic")
icon_state = "beach"
+83
View File
@@ -0,0 +1,83 @@
/datum/language/codespeak
name = "Codespeak"
desc = "Syndicate operatives can use a series of codewords to convey complex information, while sounding like random concepts and drinks to anyone listening in."
key = "t"
default_priority = 0
flags = TONGUELESS_SPEECH | LANGUAGE_HIDE_ICON_IF_NOT_UNDERSTOOD
icon_state = "codespeak"
/datum/language/codespeak/scramble(input)
var/lookup = check_cache(input)
if(lookup)
return lookup
. = ""
var/list/words = list()
while(length(.) < length(input))
words += generate_code_phrase(return_list=TRUE)
. = jointext(words, ", ")
. = capitalize(.)
var/input_ending = copytext(input, length(input))
var/static/list/endings
if(!endings)
endings = list("!", "?", ".")
if(input_ending in endings)
. += input_ending
add_to_cache(input, .)
/obj/item/codespeak_manual
name = "codespeak manual"
desc = "The book's cover reads: \"Codespeak(tm) - Secure your communication with metaphors so elaborate, they seem randomly generated!\""
icon = 'icons/obj/library.dmi'
icon_state = "book2"
var/charges = 1
/obj/item/codespeak_manual/attack_self(mob/living/user)
if(!isliving(user))
return
if(user.has_language(/datum/language/codespeak))
to_chat(user, "<span class='boldannounce'>You start skimming through [src], but you already know Codespeak.</span>")
return
to_chat(user, "<span class='boldannounce'>You start skimming through [src], and suddenly your mind is filled with codewords and responses.</span>")
user.grant_language(/datum/language/codespeak)
use_charge(user)
/obj/item/codespeak_manual/attack(mob/living/M, mob/living/user)
if(!istype(M) || !istype(user))
return
if(M == user)
attack_self(user)
return
playsound(loc, "punch", 25, 1, -1)
if(M.stat == DEAD)
M.visible_message("<span class='danger'>[user] smacks [M]'s lifeless corpse with [src].</span>", "<span class='userdanger'>[user] smacks your lifeless corpse with [src].</span>", "<span class='italics'>You hear smacking.</span>")
else if(M.has_language(/datum/language/codespeak))
M.visible_message("<span class='danger'>[user] beats [M] over the head with [src]!</span>", "<span class='userdanger'>[user] beats you over the head with [src]!</span>", "<span class='italics'>You hear smacking.</span>")
else
M.visible_message("<span class='notice'>[user] teaches [M] by beating [M.p_them()] over the head with [src]!</span>", "<span class='boldnotice'>As [user] hits you with [src], codewords and responses flow through your mind.</span>", "<span class='italics'>You hear smacking.</span>")
M.grant_language(/datum/language/codespeak)
use_charge(user)
/obj/item/codespeak_manual/proc/use_charge(mob/user)
charges--
if(!charges)
var/turf/T = get_turf(src)
T.visible_message("<span class='warning'>The cover and contents of [src] start shifting and changing!</span>")
qdel(src)
var/obj/item/book/manual/random/book = new(T)
user.put_in_active_hand(book)
/obj/item/codespeak_manual/unlimited
name = "deluxe codespeak manual"
charges = INFINITY
+72
View File
@@ -0,0 +1,72 @@
// 'basic' language; spoken by default.
/datum/language/common
name = "Galactic Common"
desc = "The common galactic tongue."
speech_verb = "says"
whisper_verb = "whispers"
key = "0"
flags = TONGUELESS_SPEECH | LANGUAGE_HIDE_ICON_IF_UNDERSTOOD
default_priority = 100
icon_state = "galcom"
//Syllable Lists
/*
This list really long, mainly because I can't make up my mind about which mandarin syllables should be removed,
and the english syllables had to be duplicated so that there is roughly a 50-50 weighting.
Sources:
http://www.sttmedia.com/syllablefrequency-english
http://www.chinahighlights.com/travelguide/learning-chinese/pinyin-syllables.htm
*/
/datum/language/common/syllables = list(
"a", "ai", "an", "ang", "ao", "ba", "bai", "ban", "bang", "bao", "bei", "ben", "beng", "bi", "bian", "biao",
"bie", "bin", "bing", "bo", "bu", "ca", "cai", "can", "cang", "cao", "ce", "cei", "cen", "ceng", "cha", "chai",
"chan", "chang", "chao", "che", "chen", "cheng", "chi", "chong", "chou", "chu", "chua", "chuai", "chuan", "chuang", "chui", "chun",
"chuo", "ci", "cong", "cou", "cu", "cuan", "cui", "cun", "cuo", "da", "dai", "dan", "dang", "dao", "de", "dei",
"den", "deng", "di", "dian", "diao", "die", "ding", "diu", "dong", "dou", "du", "duan", "dui", "dun", "duo", "e",
"ei", "en", "er", "fa", "fan", "fang", "fei", "fen", "feng", "fo", "fou", "fu", "ga", "gai", "gan", "gang",
"gao", "ge", "gei", "gen", "geng", "gong", "gou", "gu", "gua", "guai", "guan", "guang", "gui", "gun", "guo", "ha",
"hai", "han", "hang", "hao", "he", "hei", "hen", "heng", "hm", "hng", "hong", "hou", "hu", "hua", "huai", "huan",
"huang", "hui", "hun", "huo", "ji", "jia", "jian", "jiang", "jiao", "jie", "jin", "jing", "jiong", "jiu", "ju", "juan",
"jue", "jun", "ka", "kai", "kan", "kang", "kao", "ke", "kei", "ken", "keng", "kong", "kou", "ku", "kua", "kuai",
"kuan", "kuang", "kui", "kun", "kuo", "la", "lai", "lan", "lang", "lao", "le", "lei", "leng", "li", "lia", "lian",
"liang", "liao", "lie", "lin", "ling", "liu", "long", "lou", "lu", "luan", "lun", "luo", "ma", "mai", "man", "mang",
"mao", "me", "mei", "men", "meng", "mi", "mian", "miao", "mie", "min", "ming", "miu", "mo", "mou", "mu", "na",
"nai", "nan", "nang", "nao", "ne", "nei", "nen", "neng", "ng", "ni", "nian", "niang", "niao", "nie", "nin", "ning",
"niu", "nong", "nou", "nu", "nuan", "nuo", "o", "ou", "pa", "pai", "pan", "pang", "pao", "pei", "pen", "peng",
"pi", "pian", "piao", "pie", "pin", "ping", "po", "pou", "pu", "qi", "qia", "qian", "qiang", "qiao", "qie", "qin",
"qing", "qiong", "qiu", "qu", "quan", "que", "qun", "ran", "rang", "rao", "re", "ren", "reng", "ri", "rong", "rou",
"ru", "rua", "ruan", "rui", "run", "ruo", "sa", "sai", "san", "sang", "sao", "se", "sei", "sen", "seng", "sha",
"shai", "shan", "shang", "shao", "she", "shei", "shen", "sheng", "shi", "shou", "shu", "shua", "shuai", "shuan", "shuang", "shui",
"shun", "shuo", "si", "song", "sou", "su", "suan", "sui", "sun", "suo", "ta", "tai", "tan", "tang", "tao", "te",
"teng", "ti", "tian", "tiao", "tie", "ting", "tong", "tou", "tu", "tuan", "tui", "tun", "tuo", "wa", "wai", "wan",
"wang", "wei", "wen", "weng", "wo", "wu", "xi", "xia", "xian", "xiang", "xiao", "xie", "xin", "xing", "xiong", "xiu",
"xu", "xuan", "xue", "xun", "ya", "yan", "yang", "yao", "ye", "yi", "yin", "ying", "yong", "you", "yu", "yuan",
"yue", "yun", "za", "zai", "zan", "zang", "zao", "ze", "zei", "zen", "zeng", "zha", "zhai", "zhan", "zhang", "zhao",
"zhe", "zhei", "zhen", "zheng", "zhi", "zhong", "zhou", "zhu", "zhua", "zhuai", "zhuan", "zhuang", "zhui", "zhun", "zhuo", "zi",
"zong", "zou", "zuan", "zui", "zun", "zuo", "zu",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi")
+20
View File
@@ -0,0 +1,20 @@
/datum/language/draconic
name = "Draconic"
desc = "The common language of lizard-people, composed of sibilant hisses and rattles."
speech_verb = "hisses"
ask_verb = "hisses"
exclaim_verb = "roars"
key = "o"
flags = TONGUELESS_SPEECH
space_chance = 40
syllables = list(
"za", "az", "ze", "ez", "zi", "iz", "zo", "oz", "zu", "uz", "zs", "sz",
"ha", "ah", "he", "eh", "hi", "ih", "ho", "oh", "hu", "uh", "hs", "sh",
"la", "al", "le", "el", "li", "il", "lo", "ol", "lu", "ul", "ls", "sl",
"ka", "ak", "ke", "ek", "ki", "ik", "ko", "ok", "ku", "uk", "ks", "sk",
"sa", "as", "se", "es", "si", "is", "so", "os", "su", "us", "ss", "ss",
"ra", "ar", "re", "er", "ri", "ir", "ro", "or", "ru", "ur", "rs", "sr",
"a", "a", "e", "e", "i", "i", "o", "o", "u", "u", "s", "s"
)
icon_state = "lizard"
default_priority = 90
+16
View File
@@ -0,0 +1,16 @@
/datum/language/drone
name = "Drone"
desc = "A heavily encoded damage control coordination stream, with special flags for hats."
speech_verb = "chitters"
ask_verb = "chitters inquisitively"
exclaim_verb = "chitters loudly"
spans = list(SPAN_ROBOT)
key = "d"
flags = NO_STUTTER
syllables = list(".", "|")
// ...|..||.||||.|.||.|.|.|||.|||
space_chance = 0
sentence_chance = 0
default_priority = 20
icon_state = "drone"
+120
View File
@@ -0,0 +1,120 @@
#define SCRAMBLE_CACHE_LEN 50 //maximum of 50 specific scrambled lines per language
/*
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" // Optional. When not specified speech_verb + quietly/softly is used instead.
var/list/signlang_verb = list("signs", "gestures") // list of emotes that might be displayed if this language has NONVERBAL or SIGNLANG flags
var/key // Character used to speak in language
// If key is null, then the language isn't real or learnable.
var/flags // Various language flags.
var/list/syllables // Used when scrambling text for a non-speaker.
var/sentence_chance = 5 // Likelihood of making a new sentence after each syllable.
var/space_chance = 55 // Likelihood of getting a space in the random scramble string
var/list/spans = list()
var/list/scramble_cache = list()
var/default_priority = 0 // the language that an atom knows with the highest "default_priority" is selected by default.
// if you are seeing someone speak popcorn language, then something is wrong.
var/icon = 'icons/misc/language.dmi'
var/icon_state = "popcorn"
/datum/language/proc/display_icon(atom/movable/hearer)
var/understands = hearer.has_language(src.type)
if(flags & LANGUAGE_HIDE_ICON_IF_UNDERSTOOD && understands)
return FALSE
if(flags & LANGUAGE_HIDE_ICON_IF_NOT_UNDERSTOOD && !understands)
return FALSE
return TRUE
/datum/language/proc/get_icon()
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/goonchat)
return sheet.icon_tag("language-[icon_state]")
/datum/language/proc/get_random_name(gender, name_count=2, syllable_count=4, syllable_divisor=2)
if(!syllables || !syllables.len)
if(gender==FEMALE)
return capitalize(pick(GLOB.first_names_female)) + " " + capitalize(pick(GLOB.last_names))
else
return capitalize(pick(GLOB.first_names_male)) + " " + capitalize(pick(GLOB.last_names))
var/full_name = ""
var/new_name = ""
for(var/i in 0 to name_count)
new_name = ""
var/Y = rand(FLOOR(syllable_count/syllable_divisor, 1), syllable_count)
for(var/x in Y to 0)
new_name += pick(syllables)
full_name += " [capitalize(lowertext(new_name))]"
return "[trim(full_name)]"
/datum/language/proc/check_cache(input)
var/lookup = scramble_cache[input]
if(lookup)
scramble_cache -= input
scramble_cache[input] = lookup
. = lookup
/datum/language/proc/add_to_cache(input, scrambled_text)
// 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)
/datum/language/proc/scramble(input)
if(!syllables || !syllables.len)
return stars(input)
// If the input is cached already, move it to the end of the cache and return it
var/lookup = check_cache(input)
if(lookup)
return lookup
var/input_size = length(input)
var/scrambled_text = ""
var/capitalize = TRUE
while(length(scrambled_text) < input_size)
var/next = pick(syllables)
if(capitalize)
next = capitalize(next)
capitalize = FALSE
scrambled_text += next
var/chance = rand(100)
if(chance <= sentence_chance)
scrambled_text += ". "
capitalize = TRUE
else if(chance > sentence_chance && 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_to_cache(input, scrambled_text)
return scrambled_text
/datum/language/proc/get_spoken_verb(msg_end)
switch(msg_end)
if("!")
return exclaim_verb
if("?")
return ask_verb
return speech_verb
#undef SCRAMBLE_CACHE_LEN
+145
View File
@@ -0,0 +1,145 @@
/datum/language_holder
var/list/languages = list(/datum/language/common)
var/list/shadow_languages = list()
var/only_speaks_language = null
var/selected_default_language = null
var/datum/language_menu/language_menu
var/omnitongue = FALSE
var/owner
/datum/language_holder/New(owner)
src.owner = owner
languages = typecacheof(languages)
shadow_languages = typecacheof(shadow_languages)
/datum/language_holder/Destroy()
owner = null
QDEL_NULL(language_menu)
languages.Cut()
shadow_languages.Cut()
return ..()
/datum/language_holder/proc/copy(newowner)
var/datum/language_holder/copy = new(newowner)
copy.languages = src.languages.Copy()
// shadow languages are not copied.
copy.only_speaks_language = src.only_speaks_language
copy.selected_default_language = src.selected_default_language
// language menu is not copied, that's tied to the holder.
copy.omnitongue = src.omnitongue
return copy
/datum/language_holder/proc/grant_language(datum/language/dt, shadow = FALSE)
if(shadow)
shadow_languages[dt] = TRUE
else
languages[dt] = TRUE
/datum/language_holder/proc/grant_all_languages(omnitongue=FALSE)
for(var/la in GLOB.all_languages)
grant_language(la)
if(omnitongue)
src.omnitongue = TRUE
/datum/language_holder/proc/get_random_understood_language()
var/list/possible = list()
for(var/dt in languages)
possible += dt
. = safepick(possible)
/datum/language_holder/proc/remove_language(datum/language/dt, shadow = FALSE)
if(shadow)
shadow_languages -= dt
else
languages -= dt
/datum/language_holder/proc/remove_all_languages()
languages.Cut()
/datum/language_holder/proc/has_language(datum/language/dt)
if(is_type_in_typecache(dt, languages))
return LANGUAGE_KNOWN
else
var/atom/movable/AM = get_atom()
var/datum/language_holder/L = AM.get_language_holder(shadow=FALSE)
if(L != src)
if(is_type_in_typecache(dt, L.shadow_languages))
return LANGUAGE_SHADOWED
return FALSE
/datum/language_holder/proc/copy_known_languages_from(thing, replace=FALSE)
var/datum/language_holder/other
if(istype(thing, /datum/language_holder))
other = thing
else if(ismovableatom(thing))
var/atom/movable/AM = thing
other = AM.get_language_holder()
else if(istype(thing, /datum/mind))
var/datum/mind/M = thing
other = M.get_language_holder()
if(replace)
src.remove_all_languages()
for(var/l in other.languages)
src.grant_language(l)
/datum/language_holder/proc/open_language_menu(mob/user)
if(!language_menu)
language_menu = new(src)
language_menu.ui_interact(user)
/datum/language_holder/proc/get_atom()
if(ismovableatom(owner))
. = owner
else if(istype(owner, /datum/mind))
var/datum/mind/M = owner
if(M.current)
. = M.current
/datum/language_holder/alien
languages = list(/datum/language/xenocommon)
/datum/language_holder/monkey
languages = list(/datum/language/monkey)
/datum/language_holder/swarmer
languages = list(/datum/language/swarmer)
/datum/language_holder/clockmob
languages = list(/datum/language/common, /datum/language/ratvar)
only_speaks_language = /datum/language/ratvar
/datum/language_holder/construct
languages = list(/datum/language/common, /datum/language/narsie)
/datum/language_holder/drone
languages = list(/datum/language/common, /datum/language/drone, /datum/language/machine)
only_speaks_language = /datum/language/drone
/datum/language_holder/drone/syndicate
only_speaks_language = null
/datum/language_holder/slime
languages = list(/datum/language/common, /datum/language/slime)
only_speaks_language = /datum/language/slime
/datum/language_holder/lightbringer
// TODO change to a lightbringer specific sign language
languages = list(/datum/language/slime)
/datum/language_holder/synthetic
languages = list(/datum/language/common)
shadow_languages = list(/datum/language/common, /datum/language/machine, /datum/language/draconic)
/datum/language_holder/empty
languages = list()
shadow_languages = list()
/datum/language_holder/universal/New()
..()
grant_all_languages(omnitongue=TRUE)
+102
View File
@@ -0,0 +1,102 @@
/datum/language_menu
var/datum/language_holder/language_holder
/datum/language_menu/New(language_holder)
src.language_holder = language_holder
/datum/language_menu/Destroy()
language_holder = null
. = ..()
/datum/language_menu/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.language_menu_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "language_menu", "Language Menu", 700, 800, master_ui, state)
ui.open()
/datum/language_menu/ui_data(mob/user)
var/list/data = list()
var/atom/movable/AM = language_holder.get_atom()
if(isliving(AM))
data["is_living"] = TRUE
else
data["is_living"] = FALSE
data["languages"] = list()
for(var/ld in GLOB.all_languages)
var/result = language_holder.has_language(ld)
if(!result)
continue
var/shadow = result == LANGUAGE_SHADOWED
var/datum/language/LD = ld
var/list/L = list()
L["name"] = initial(LD.name)
L["desc"] = initial(LD.desc)
L["key"] = initial(LD.key)
L["is_default"] = (LD == language_holder.selected_default_language)
L["shadow"] = shadow
if(AM)
L["can_speak"] = AM.can_speak_in_language(LD)
data["languages"] += list(L)
if(check_rights_for(user.client, R_ADMIN) || isobserver(AM))
data["admin_mode"] = TRUE
data["omnitongue"] = language_holder.omnitongue
data["unknown_languages"] = list()
for(var/ld in GLOB.all_languages)
if(language_holder.has_language(ld))
continue
var/datum/language/LD = ld
var/list/L = list()
L["name"] = initial(LD.name)
L["desc"] = initial(LD.desc)
L["key"] = initial(LD.key)
data["unknown_languages"] += list(L)
return data
/datum/language_menu/ui_act(action, params)
if(..())
return
var/mob/user = usr
var/atom/movable/AM = language_holder.get_atom()
var/language_name = params["language_name"]
var/datum/language/language_datum
for(var/ld in GLOB.all_languages)
var/datum/language/LD = ld
if(language_name == initial(LD.name))
language_datum = LD
var/is_admin = check_rights_for(user.client, R_ADMIN)
switch(action)
if("select_default")
if(language_datum && AM.can_speak_in_language(language_datum))
language_holder.selected_default_language = language_datum
. = TRUE
if("grant_language")
if((is_admin || isobserver(AM)) && language_datum)
language_holder.grant_language(language_datum)
if(is_admin)
message_admins("[key_name_admin(user)] granted the [language_name] language to [key_name_admin(AM)].")
log_admin("[key_name(user)] granted the language [language_name] to [key_name(AM)].")
. = TRUE
if("remove_language")
if((is_admin || isobserver(AM)) && language_datum)
language_holder.remove_language(language_datum)
if(is_admin)
message_admins("[key_name_admin(user)] removed the [language_name] language to [key_name_admin(AM)].")
log_admin("[key_name(user)] removed the language [language_name] to [key_name(AM)].")
. = TRUE
if("toggle_omnitongue")
if(is_admin || isobserver(AM))
language_holder.omnitongue = !language_holder.omnitongue
if(is_admin)
message_admins("[key_name_admin(user)] [language_holder.omnitongue ? "enabled" : "disabled"] the ability to speak all languages (that they know) of [key_name_admin(AM)].")
log_admin("[key_name(user)] [language_holder.omnitongue ? "enabled" : "disabled"] the ability to speak all languages (that_they know) of [key_name(AM)].")
. = TRUE
+19
View File
@@ -0,0 +1,19 @@
/datum/language/machine
name = "Encoded Audio Language"
desc = "An efficient language of encoded tones developed by synthetics and cyborgs."
speech_verb = "whistles"
ask_verb = "chirps"
exclaim_verb = "whistles loudly"
spans = list(SPAN_ROBOT)
key = "6"
flags = NO_STUTTER
syllables = list("beep","beep","beep","beep","beep","boop","boop","boop","bop","bop","dee","dee","doo","doo","hiss","hss","buzz","buzz","bzz","ksssh","keey","wurr","wahh","tzzz")
space_chance = 10
default_priority = 90
icon_state = "eal"
/datum/language/machine/get_random_name()
if(prob(70))
return "[pick(GLOB.posibrain_names)]-[rand(100, 999)]"
return pick(GLOB.ai_names)
+12
View File
@@ -0,0 +1,12 @@
/datum/language/monkey
name = "Chimpanzee"
desc = "Ook ook ook."
speech_verb = "chimpers"
ask_verb = "chimpers"
exclaim_verb = "screeches"
key = "1"
space_chance = 100
syllables = list("oop", "aak", "chee", "eek")
default_priority = 80
icon_state = "animal"
+11
View File
@@ -0,0 +1,11 @@
/datum/language/mushroom
name = "Mushroom"
desc = "A language that consists of the sound of periodic gusts of spore-filled air being released."
speech_verb = "puffs"
ask_verb = "puffs inquisitively"
exclaim_verb = "poofs loudly"
whisper_verb = "puffs quietly"
key = "y"
sentence_chance = 0
default_priority = 80
syllables = list("poof", "pff", "pFfF", "piff", "puff", "pooof", "pfffff", "piffpiff", "puffpuff", "poofpoof", "pifpafpofpuf")
+43
View File
@@ -0,0 +1,43 @@
/datum/language/narsie
name = "Nar'Sian"
desc = "The ancient, blood-soaked, impossibly complex language of Nar'Sian cultists."
speech_verb = "intones"
ask_verb = "inquires"
exclaim_verb = "invokes"
key = "n"
sentence_chance = 8
space_chance = 95 //very high due to the potential length of each syllable
var/static/list/base_syllables = list(
"h", "v", "c", "e", "g", "d", "r", "n", "h", "o", "p",
"ra", "so", "at", "il", "ta", "gh", "sh", "ya", "te", "sh", "ol", "ma", "om", "ig", "ni", "in",
"sha", "mir", "sas", "mah", "zar", "tok", "lyr", "nqa", "nap", "olt", "val", "qha",
"fwe", "ath", "yro", "eth", "gal", "gib", "bar", "jin", "kla", "atu", "kal", "lig",
"yoka", "drak", "loso", "arta", "weyh", "ines", "toth", "fara", "amar", "nyag", "eske", "reth", "dedo", "btoh", "nikt", "neth",
"kanas", "garis", "uloft", "tarat", "khari", "thnor", "rekka", "ragga", "rfikk", "harfr", "andid", "ethra", "dedol", "totum",
"ntrath", "keriam"
) //the list of syllables we'll combine with itself to get a larger list of syllables
syllables = list(
"sha", "mir", "sas", "mah", "hra", "zar", "tok", "lyr", "nqa", "nap", "olt", "val",
"yam", "qha", "fel", "det", "fwe", "mah", "erl", "ath", "yro", "eth", "gal", "mud",
"gib", "bar", "tea", "fuu", "jin", "kla", "atu", "kal", "lig",
"yoka", "drak", "loso", "arta", "weyh", "ines", "toth", "fara", "amar", "nyag", "eske", "reth", "dedo", "btoh", "nikt", "neth", "abis",
"kanas", "garis", "uloft", "tarat", "khari", "thnor", "rekka", "ragga", "rfikk", "harfr", "andid", "ethra", "dedol", "totum",
"verbot", "pleggh", "ntrath", "barhah", "pasnar", "keriam", "usinar", "savrae", "amutan", "tannin", "remium", "barada",
"forbici"
) //the base syllables, which include a few rare ones that won't appear in the mixed syllables
icon_state = "narsie"
default_priority = 10
/datum/language/narsie/New()
for(var/syllable in base_syllables) //we only do this once, since there's only ever a single one of each language datum.
for(var/target_syllable in base_syllables)
if(syllable != target_syllable) //don't combine with yourself
if(length(syllable) + length(target_syllable) > 8) //if the resulting syllable would be very long, don't put anything between it
syllables += "[syllable][target_syllable]"
else if(prob(80)) //we'll be minutely different each round.
syllables += "[syllable]'[target_syllable]"
else if(prob(25)) //5% chance of - instead of '
syllables += "[syllable]-[target_syllable]"
else //15% chance of no ' or - at all
syllables += "[syllable][target_syllable]"
..()
+19
View File
@@ -0,0 +1,19 @@
/datum/language/ratvar
name = "Ratvarian"
desc = "A timeless language full of power and incomprehensible to the unenlightened."
var/static/random_speech_verbs = list("clanks", "clinks", "clunks", "clangs")
ask_verb = "requests"
exclaim_verb = "proclaims"
whisper_verb = "imparts"
key = "r"
default_priority = 10
spans = list(SPAN_ROBOT)
icon_state = "ratvar"
/datum/language/ratvar/scramble(var/input)
. = text2ratvar(input)
/datum/language/ratvar/get_spoken_verb(msg_end)
if(!msg_end)
return pick(random_speech_verbs)
return ..()
+12
View File
@@ -0,0 +1,12 @@
/datum/language/slime
name = "Slime"
desc = "A melodic and complex language spoken by slimes. Some of the notes are inaudible to humans."
speech_verb = "warbles"
ask_verb = "warbles"
exclaim_verb = "warbles"
key = "k"
flags = TONGUELESS_SPEECH
syllables = list("qr","qrr","xuq","qil","quum","xuqm","vol","xrim","zaoo","qu-uu","qix","qoo","zix","*","!")
default_priority = 70
icon_state = "slime"
+45
View File
@@ -0,0 +1,45 @@
/datum/language/swarmer
name = "Swarmer"
desc = "A language only consisting of musical notes."
speech_verb = "tones"
ask_verb = "tones inquisitively"
exclaim_verb = "tones loudly"
spans = list(SPAN_ROBOT)
key = "s"
flags = NO_STUTTER
space_chance = 100
sentence_chance = 0
default_priority = 60
icon_state = "swarmer"
// since various flats and sharps are the same,
// all non-accidental notes are doubled in the list
/* The list with unicode symbols for the accents.
syllables = list(
"C", "C",
"C♯", "D♭",
"D", "D",
"D♯", "E♭",
"E", "E",
"F", "F",
"F♯", "G♭",
"G", "G",
"G♯", "A♭",
"A", "A",
"A♯", "B♭",
"B", "B")
*/
syllables = list(
"C", "C",
"C#", "Db",
"D", "D",
"D#", "Eb",
"E", "E",
"F", "F",
"F#", "Gb",
"G", "G",
"G#", "Ab",
"A", "A",
"A#", "Bb",
"B", "B")
+11
View File
@@ -0,0 +1,11 @@
/datum/language/xenocommon
name = "Xenomorph"
desc = "The common tongue of the xenomorphs."
speech_verb = "hisses"
ask_verb = "hisses"
exclaim_verb = "hisses"
key = "4"
syllables = list("sss","sSs","SSS")
default_priority = 50
icon_state = "xeno"