Language icons
This commit is contained in:
@@ -5,9 +5,11 @@
|
||||
speech_verb = "says"
|
||||
whisper_verb = "whispers"
|
||||
key = "0"
|
||||
flags = TONGUELESS_SPEECH
|
||||
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,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
speech_verb = "chitters"
|
||||
ask_verb = "chitters inquisitively"
|
||||
exclaim_verb = "chitters loudly"
|
||||
spans = list(SPAN_ROBOT, "drone")
|
||||
spans = list(SPAN_ROBOT)
|
||||
key = "d"
|
||||
flags = NO_STUTTER
|
||||
syllables = list(".", "|")
|
||||
@@ -12,3 +12,5 @@
|
||||
space_chance = 0
|
||||
sentence_chance = 0
|
||||
default_priority = 20
|
||||
|
||||
icon_state = "drone"
|
||||
|
||||
@@ -21,6 +21,21 @@
|
||||
var/static/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()
|
||||
return "<img class=icon src=\ref[icon] iconstate='[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)
|
||||
@@ -93,3 +108,13 @@
|
||||
return speech_verb
|
||||
|
||||
#undef SCRAMBLE_CACHE_LEN
|
||||
|
||||
/proc/get_language_instance(langtype)
|
||||
if(!ispath(langtype, /datum/language))
|
||||
return
|
||||
|
||||
if(!GLOB.language_datums[langtype])
|
||||
var/datum/language/langdatum = new langtype
|
||||
GLOB.language_datums[langtype] = langdatum
|
||||
|
||||
. = GLOB.language_datums[langtype]
|
||||
|
||||
@@ -4,13 +4,15 @@
|
||||
speech_verb = "whistles"
|
||||
ask_verb = "chirps"
|
||||
exclaim_verb = "whistles loudly"
|
||||
spans = list(SPAN_ROBOT, "changeling")
|
||||
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)]"
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
speech_verb = "chimpers"
|
||||
ask_verb = "chimpers"
|
||||
exclaim_verb = "screeches"
|
||||
spans = list("monkey")
|
||||
key = "1"
|
||||
space_chance = 100
|
||||
syllables = list("oop", "aak", "chee", "eek")
|
||||
default_priority = 80
|
||||
|
||||
icon_state = "animal"
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
exclaim_verb = "clanks"
|
||||
key = "r"
|
||||
default_priority = 10
|
||||
spans = list(SPAN_ROBOT, "brass")
|
||||
spans = list(SPAN_ROBOT)
|
||||
|
||||
icon_state = "ratvar"
|
||||
|
||||
/datum/language/ratvar/scramble(var/input)
|
||||
. = text2ratvar(input)
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
speech_verb = "warbles"
|
||||
ask_verb = "warbles"
|
||||
exclaim_verb = "warbles"
|
||||
spans = list("slime")
|
||||
key = "k"
|
||||
syllables = list("qr","qrr","xuq","qil","quum","xuqm","vol","xrim","zaoo","qu-uu","qix","qoo","zix","*","!")
|
||||
default_priority = 70
|
||||
|
||||
icon_state = "slime"
|
||||
|
||||
@@ -4,12 +4,15 @@
|
||||
speech_verb = "tones"
|
||||
ask_verb = "tones inquisitively"
|
||||
exclaim_verb = "tones loudly"
|
||||
spans = list(SPAN_ROBOT, "swarmer")
|
||||
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.
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
speech_verb = "hisses"
|
||||
ask_verb = "hisses"
|
||||
exclaim_verb = "hisses"
|
||||
spans = list("alien")
|
||||
key = "4"
|
||||
syllables = list("sss","sSs","SSS")
|
||||
default_priority = 50
|
||||
|
||||
icon_state = "xeno"
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/mob/living/carbon/human/say_quote(input, spans, message_mode)
|
||||
/mob/living/carbon/human/say_mod(input, message_mode)
|
||||
verb_say = dna.species.say_mod
|
||||
. = ..()
|
||||
if(src.slurring)
|
||||
input = attach_spans(input, spans)
|
||||
return "slurs, \"[input]\""
|
||||
|
||||
if(slurring)
|
||||
return "slurs"
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/treat_message(message)
|
||||
message = dna.species.handle_speech(message,src)
|
||||
|
||||
@@ -423,18 +423,17 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
return 3
|
||||
return 0
|
||||
|
||||
/mob/living/say_quote(input, list/spans, message_mode)
|
||||
var/tempinput = attach_spans(input, spans)
|
||||
/mob/living/say_mod(input, message_mode)
|
||||
if(message_mode == MODE_WHISPER)
|
||||
return "[verb_whisper], \"[tempinput]\""
|
||||
if(message_mode == MODE_WHISPER_CRIT)
|
||||
return "[verb_whisper] in [p_their()] last breath, \"[tempinput]\""
|
||||
if (stuttering)
|
||||
return "stammers, \"[tempinput]\""
|
||||
if (getBrainLoss() >= 60)
|
||||
return "gibbers, \"[tempinput]\""
|
||||
|
||||
return ..()
|
||||
. = verb_whisper
|
||||
else if(message_mode == MODE_WHISPER_CRIT)
|
||||
. = "[verb_whisper] in [p_their()] last breath"
|
||||
else if(stuttering)
|
||||
. = "stammers"
|
||||
else if(getBrainLoss() >= 60)
|
||||
. = "gibbers"
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/mob/living/get_default_language()
|
||||
if(selected_default_language)
|
||||
|
||||
@@ -254,10 +254,10 @@
|
||||
if(icon_gib)
|
||||
new /obj/effect/overlay/temp/gib_animation/animal(loc, icon_gib)
|
||||
|
||||
/mob/living/simple_animal/say_quote(input, list/spans)
|
||||
/mob/living/simple_animal/say_mod(input, message_mode)
|
||||
if(speak_emote && speak_emote.len)
|
||||
verb_say = pick(speak_emote)
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/emote(act, m_type=1, message = null)
|
||||
if(stat)
|
||||
|
||||
Reference in New Issue
Block a user