mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-02 05:22:40 +00:00
Silicon Accents (#9429)
Stationbounds now have accents, starting off with Text-to-Speech, and can choose to mimic any accent.
The bots that robotics can produce now also have TTS accents.
IPCs can choose to use the TTS accent if they wish.
This commit is contained in:
@@ -41,15 +41,12 @@
|
||||
else
|
||||
message = stars(message)
|
||||
|
||||
var/accent_icon
|
||||
|
||||
var/accent_icon = speaker.get_accent_icon(language)
|
||||
var/speaker_name = speaker.name
|
||||
if(ishuman(speaker))
|
||||
var/mob/living/carbon/human/H = speaker
|
||||
speaker_name = H.GetVoice()
|
||||
|
||||
accent_icon = H.get_accent_icon(language)
|
||||
|
||||
if(italics)
|
||||
message = "<i>[message]</i>"
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/mob/living/bot
|
||||
name = "Bot"
|
||||
accent = ACCENT_SILICON
|
||||
health = 20
|
||||
maxHealth = 20
|
||||
icon = 'icons/obj/aibots.dmi'
|
||||
@@ -28,6 +29,8 @@
|
||||
/mob/living/bot/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
add_language(LANGUAGE_TCB)
|
||||
set_default_language(LANGUAGE_TCB)
|
||||
|
||||
botcard = new /obj/item/card/id(src)
|
||||
botcard.access = botcard_access.Copy()
|
||||
|
||||
@@ -2014,27 +2014,24 @@
|
||||
randmutg(src) // Applies good mutation
|
||||
domutcheck(src,null,MUTCHK_FORCED)
|
||||
|
||||
/mob/living/carbon/human/proc/get_accent_icon(var/datum/language/speaking = null)
|
||||
if(accent && speaking && speaking.allow_accents)
|
||||
var/used_accent = accent //starts with the mob's default accent
|
||||
/mob/living/carbon/human/get_accent_icon(var/datum/language/speaking = null)
|
||||
var/used_accent = accent //starts with the mob's default accent
|
||||
|
||||
if(mind?.changeling)
|
||||
used_accent = mind.changeling.mimiced_accent
|
||||
if(mind?.changeling)
|
||||
used_accent = mind.changeling.mimiced_accent
|
||||
|
||||
if(istype(back,/obj/item/rig)) //checks for the rig voice changer module
|
||||
var/obj/item/rig/rig = back
|
||||
if(rig.speech && rig.speech.voice_holder && rig.speech.voice_holder.active && rig.speech.voice_holder.current_accent)
|
||||
used_accent = rig.speech.voice_holder.current_accent
|
||||
if(istype(back,/obj/item/rig)) //checks for the rig voice changer module
|
||||
var/obj/item/rig/rig = back
|
||||
if(rig.speech && rig.speech.voice_holder && rig.speech.voice_holder.active && rig.speech.voice_holder.current_accent)
|
||||
used_accent = rig.speech.voice_holder.current_accent
|
||||
|
||||
for(var/obj/item/gear in list(wear_mask,wear_suit,head)) //checks for voice changers masks now
|
||||
if(gear)
|
||||
var/obj/item/voice_changer/changer = locate() in gear
|
||||
if(changer && changer.active && changer.current_accent)
|
||||
used_accent = changer.current_accent
|
||||
for(var/obj/item/gear in list(wear_mask,wear_suit,head)) //checks for voice changers masks now
|
||||
if(gear)
|
||||
var/obj/item/voice_changer/changer = locate() in gear
|
||||
if(changer && changer.active && changer.current_accent)
|
||||
used_accent = changer.current_accent
|
||||
|
||||
var/datum/accent/a = SSrecords.accents[used_accent]
|
||||
var/final_icon = a.tag_icon
|
||||
return "<IMG src='\ref['./icons/accent_tags.dmi']' class='text_tag' iconstate='[final_icon]'>"
|
||||
return ..(speaking, used_accent)
|
||||
|
||||
/mob/living/carbon/human/proc/generate_valid_accent()
|
||||
var/list/valid_accents = new()
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
var/citizenship = ""
|
||||
var/employer_faction = ""
|
||||
var/religion = ""
|
||||
var/accent = ""
|
||||
|
||||
//Equipment slots
|
||||
var/obj/item/wear_suit = null
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
bodyfall_sound = "bodyfall_machine"
|
||||
|
||||
allowed_accents = list(ACCENT_CETI, ACCENT_GIBSON, ACCENT_SOL, ACCENT_COC, ACCENT_ERIDANI, ACCENT_ERIDANIDREG, ACCENT_ELYRA, ACCENT_KONYAN, ACCENT_JUPITER, ACCENT_MARTIAN, ACCENT_LUNA,
|
||||
ACCENT_HIMEO, ACCENT_VENUS, ACCENT_VENUSJIN, ACCENT_PHONG)
|
||||
ACCENT_HIMEO, ACCENT_VENUS, ACCENT_VENUSJIN, ACCENT_PHONG, ACCENT_SILICON)
|
||||
|
||||
// Special snowflake machine vars.
|
||||
var/sprint_temperature_factor = 1.15
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
bodyfall_sound = "bodyfall"
|
||||
|
||||
allowed_accents = list(ACCENT_CETI, ACCENT_GIBSON, ACCENT_SOL, ACCENT_COC, ACCENT_ERIDANI, ACCENT_ERIDANIDREG, ACCENT_ELYRA, ACCENT_KONYAN, ACCENT_JUPITER, ACCENT_MARTIAN, ACCENT_LUNA,
|
||||
ACCENT_HIMEO, ACCENT_VENUS, ACCENT_VENUSJIN, ACCENT_PHONG, ACCENT_SILVERSUN)
|
||||
ACCENT_HIMEO, ACCENT_VENUS, ACCENT_VENUSJIN, ACCENT_PHONG, ACCENT_SILVERSUN, ACCENT_SILICON)
|
||||
|
||||
/datum/species/machine/shell/get_light_color()
|
||||
return
|
||||
@@ -495,7 +495,7 @@
|
||||
)
|
||||
|
||||
allowed_accents = list(ACCENT_CETI, ACCENT_GIBSON, ACCENT_SOL, ACCENT_COC, ACCENT_ERIDANI, ACCENT_ERIDANIDREG, ACCENT_ELYRA, ACCENT_KONYAN, ACCENT_JUPITER, ACCENT_MARTIAN, ACCENT_LUNA,
|
||||
ACCENT_HIMEO, ACCENT_VENUS, ACCENT_VENUSJIN, ACCENT_PHONG, ACCENT_SILVERSUN)
|
||||
ACCENT_HIMEO, ACCENT_VENUS, ACCENT_VENUSJIN, ACCENT_PHONG, ACCENT_SILVERSUN, ACCENT_SILICON)
|
||||
|
||||
/datum/species/machine/bishop/get_light_color(mob/living/carbon/human/H)
|
||||
if (istype(H))
|
||||
@@ -553,4 +553,4 @@
|
||||
|
||||
/datum/species/machine/unbranded/get_light_color(mob/living/carbon/human/H)
|
||||
if (istype(H))
|
||||
return rgb(H.r_eyes, H.g_eyes, H.b_eyes)
|
||||
return rgb(H.r_eyes, H.g_eyes, H.b_eyes)
|
||||
@@ -957,4 +957,4 @@ default behaviour is:
|
||||
return ..()
|
||||
|
||||
/mob/living/proc/needs_wheelchair()
|
||||
return FALSE
|
||||
return FALSE
|
||||
@@ -6,12 +6,16 @@
|
||||
/mob/living/silicon/proc/subsystem_alarm_monitor,
|
||||
/mob/living/silicon/proc/subsystem_law_manager,
|
||||
/mob/living/silicon/ai/proc/subsystem_ntnet_monitor,
|
||||
/mob/living/silicon/proc/computer_interact
|
||||
/mob/living/silicon/proc/computer_interact,
|
||||
/mob/living/silicon/proc/silicon_mimic_accent
|
||||
)
|
||||
|
||||
/mob/living/silicon/robot/syndicate
|
||||
register_alarms = 0
|
||||
silicon_subsystems = list(/mob/living/silicon/proc/subsystem_law_manager)
|
||||
silicon_subsystems = list(
|
||||
/mob/living/silicon/proc/subsystem_law_manager,
|
||||
/mob/living/silicon/proc/silicon_mimic_accent
|
||||
)
|
||||
|
||||
/mob/living/silicon/ai/Destroy()
|
||||
QDEL_NULL(ntnet_monitor)
|
||||
|
||||
@@ -180,6 +180,7 @@
|
||||
verbs += /mob/living/silicon/pai/proc/choose_chassis
|
||||
verbs += /mob/living/silicon/pai/proc/choose_verbs
|
||||
verbs += /mob/living/silicon/proc/computer_interact
|
||||
verbs += /mob/living/silicon/proc/silicon_mimic_accent
|
||||
|
||||
//PDA
|
||||
pda = new(src)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
// Speaking
|
||||
gender = NEUTER
|
||||
voice_name = "Synthesized Voice"
|
||||
accent = ACCENT_SILICON
|
||||
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
|
||||
var/speak_statement = "states"
|
||||
var/speak_exclamation = "declares"
|
||||
@@ -42,7 +43,8 @@
|
||||
var/list/silicon_subsystems = list(
|
||||
/mob/living/silicon/proc/subsystem_alarm_monitor,
|
||||
/mob/living/silicon/proc/subsystem_law_manager,
|
||||
/mob/living/silicon/proc/computer_interact
|
||||
/mob/living/silicon/proc/computer_interact,
|
||||
/mob/living/silicon/proc/silicon_mimic_accent
|
||||
)
|
||||
|
||||
// Utility
|
||||
|
||||
10
code/modules/mob/living/silicon/silicon_procs.dm
Normal file
10
code/modules/mob/living/silicon/silicon_procs.dm
Normal file
@@ -0,0 +1,10 @@
|
||||
/mob/living/silicon/proc/silicon_mimic_accent()
|
||||
set name = "Mimic Accent"
|
||||
set category = "Subsystems"
|
||||
|
||||
var/chosen_accent = input(src, "Choose an accent to mimic.", "Accent Mimicry") as null|anything in SSrecords.accents
|
||||
if(!chosen_accent)
|
||||
return
|
||||
|
||||
accent = chosen_accent
|
||||
to_chat(src, SPAN_NOTICE("You have set your synthesizer to mimic the [chosen_accent] accent."))
|
||||
@@ -171,6 +171,7 @@
|
||||
//see: setup.dm for list of mutations
|
||||
|
||||
var/voice_name = "unidentifiable voice"
|
||||
var/accent
|
||||
|
||||
var/faction = "neutral" //Used for checking whether hostile simple animals will attack you, possibly more stuff later
|
||||
var/captured = 0 //Functionally, should give the same effect as being buckled into a chair when true.
|
||||
|
||||
@@ -1224,4 +1224,12 @@ proc/is_blind(A)
|
||||
W.add_fingerprint(src)
|
||||
|
||||
/mob/proc/set_intent(var/set_intent)
|
||||
a_intent = set_intent
|
||||
a_intent = set_intent
|
||||
|
||||
/mob/proc/get_accent_icon(var/datum/language/speaking = null, var/force_accent)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
var/used_accent = force_accent ? force_accent : accent
|
||||
if(used_accent && speaking?.allow_accents)
|
||||
var/datum/accent/a = SSrecords.accents[used_accent]
|
||||
var/final_icon = a.tag_icon
|
||||
return "<IMG src='\ref['./icons/accent_tags.dmi']' class='text_tag' iconstate='[final_icon]'>"
|
||||
Reference in New Issue
Block a user