/* NTTC system This is basically the replacement for NTSL and allows tickbox features such as job titles and colours, without needing a script This also means that there is no user input here, which means the system isnt prone to exploits since its only selecting options, no user input Basically, just imagine pfSense for tcomms All this code was written by Tigercat2000. I take no credit -aa07 */ #define JOB_STYLE_1 "Name (Job)" #define JOB_STYLE_2 "Name - Job" #define JOB_STYLE_3 "\[Job\] Name" #define JOB_STYLE_4 "(Job) Name" /datum/nttc_configuration var/regex/word_blacklist = new("([tcm.sender_name]" tcm.sender_name = new_name tcm.vname = new_name // this is required because the broadcaster uses this directly if the speaker doesn't have a voice changer on if(toggle_jobs) var/new_name = "" var/job = tcm.sender_job if(job in ert_jobs) job = "ERT" if(toggle_job_color) switch(job_indicator_type) if(JOB_STYLE_1) new_name = "[tcm.sender_name] ([job])" if(JOB_STYLE_2) new_name = "[tcm.sender_name] - [job]" if(JOB_STYLE_3) new_name = "\[[job]\] [tcm.sender_name]" if(JOB_STYLE_4) new_name = "([job]) [tcm.sender_name]" else switch(job_indicator_type) if(JOB_STYLE_1) new_name = "[tcm.sender_name] ([job])" if(JOB_STYLE_2) new_name = "[tcm.sender_name] - [job]" if(JOB_STYLE_3) new_name = "\[[job]\] [tcm.sender_name]" if(JOB_STYLE_4) new_name = "([job]) [tcm.sender_name]" // Only change the name if they have a job tag set, otherwise everyone becomes unknown, and thats bad if(new_name != "") tcm.sender_name = new_name tcm.vname = new_name // this is required because the broadcaster uses this directly if the speaker doesn't have a voice changer on // This is hacky stuff for multilingual messages... var/list/message_pieces = tcm.message_pieces // Makes heads of staff bold if(toggle_command_bold) var/job = tcm.sender_job var/rank = tcm.sender_rank var/realjob = job if(!(job in all_jobs)) realjob = rank if((realjob in ert_jobs) || (realjob in heads) || (realjob in cc_jobs) || (realjob in tsf_jobs)) for(var/I in 1 to length(message_pieces)) var/datum/multilingual_say_piece/S = message_pieces[I] if(!S.message) continue if(I == 1 && !istype(S.speaking, /datum/language/noise)) // Capitalise the first section only, unless it's an emote. S.message = "[capitalize(S.message)]" S.message = "[S.message]" // Make everything bolded // Language Conversion if(setting_language && valid_languages[setting_language]) if(setting_language == "--DISABLE--") setting_language = null else for(var/datum/multilingual_say_piece/S in message_pieces) if(S.speaking != GLOB.all_languages["Noise"]) // check if they are emoting, these do not need to be translated S.speaking = GLOB.all_languages[setting_language] return tcm #undef JOB_STYLE_1 #undef JOB_STYLE_2 #undef JOB_STYLE_3 #undef JOB_STYLE_4