diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 89730f9a9e4..ac0bd476ae2 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -74,6 +74,11 @@ #define COMSIG_ATOM_NO_LONGER_PULLED "movable_no_longer_pulled" ///signal sent out by an atom when it is no longer pulling something : (atom/pulling) #define COMSIG_ATOM_NO_LONGER_PULLING "movable_no_longer_pulling" +//signal for mass roundstart store voice (very english) +#define COMSIG_SPECIAL_MASS_STORE_VOICE "store_voice" + +//signal for human store ebalo +//#define COMSIG_STORE_FACE "store_face" ///from base of atom/attackby(): (/obj/item, /mob/living, params) #define COMSIG_PARENT_ATTACKBY "atom_attackby" diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 0f780e66738..4bc0a736875 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -52,6 +52,10 @@ #define isitem(A) (istype(A, /obj/item)) +#define isIdCard(A) (istype(A, /obj/item/card/id)) + +#define isWallet(A) (istype(A, /obj/item/storage/wallet)) + #define isstack(A) (istype(A, /obj/item/stack)) #define isstorage(A) (istype(A, /obj/item/storage)) diff --git a/code/_onclick/hud/plane_master/render_plate.dm b/code/_onclick/hud/plane_master/render_plate.dm index 5290ece4cc9..79cd166e727 100644 --- a/code/_onclick/hud/plane_master/render_plate.dm +++ b/code/_onclick/hud/plane_master/render_plate.dm @@ -54,7 +54,7 @@ /atom/movable/screen/plane_master/rendering_plate/master/hide_from(mob/oldmob) . = ..() if(offset == 0) - return + return var/datum/hud/hud = home.our_hud if(hud) UnregisterSignal(hud, COMSIG_HUD_OFFSET_CHANGED, PROC_REF(on_offset_change)) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 9fae7c22d2c..36c3a11bd70 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -1,3 +1,6 @@ + +GLOBAL_LIST_EMPTY(capitalist_manifest) + /datum/datacore var/list/medical = list() var/list/general = list() @@ -111,6 +114,7 @@ GLOBAL_LIST_EMPTY(PDA_Manifest) /datum/datacore/proc/manifest() for(var/mob/living/carbon/human/H in GLOB.player_list) manifest_inject(H) + SEND_GLOBAL_SIGNAL(COMSIG_SPECIAL_MASS_STORE_VOICE, GLOB.capitalist_manifest) /datum/datacore/proc/manifest_modify(name, rank, assignment) if(GLOB.PDA_Manifest.len) @@ -142,15 +146,26 @@ GLOBAL_VAR_INIT(record_id_num, 1001) assignment = H.job else assignment = "Unassigned" - + var/id = num2hex(GLOB.record_id_num++, 6) - + H.adv_voice.RegSignals() + H.UpdateVoice() + var/prom_voice = H.adv_voice.voice_name + + var/datum/job/prom_job = SSjobs.GetJob(H.job) + + for(var/dep_flag in prom_job.college_department) //:catsmile: + if(!isnull(GLOB.capitalist_manifest?[dep_flag])) + GLOB.capitalist_manifest[dep_flag][prom_voice] = H.real_name + else + GLOB.capitalist_manifest[dep_flag] = list((prom_voice) = (H.real_name)) //General Record var/datum/data/record/G = new() G.fields["id"] = id G.fields["name"] = H.real_name G.fields["real_rank"] = H.mind.assigned_role + G.fields["voice"] = H.GetVoice() G.fields["rank"] = assignment G.fields["age"] = H.age G.fields["fingerprint"] = md5(H.dna.uni_identity) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 40dd4d2881b..0c3e3e3485e 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -36,7 +36,8 @@ var/assigned_role //assigned role is what job you're assigned to when you join the station. var/playtime_role //if set, overrides your assigned_role for the purpose of playtime awards. Set by IDcomputer when your ID is changed. - var/special_role //special roles are typically reserved for antags or roles like ERT. If you want to avoid a character being automatically announced by the AI, on arrival (becuase they're an off station character or something); ensure that special_role and assigned_role are equal. + var/special_role //special roles are typically reserved for antags or roles like ERP. If you want to avoid a character being automatically announced by the AI, on arrival (becuase they're an off station character or something); ensure that special_role and assigned_role are equal. + var/special_role_meta_know = FALSE //Если TRUE то ты всегда будешь знать тех у кого такая-же спец роль var/offstation_role = FALSE //set to true for ERT, deathsquad, abductors, etc, that can go from and to z2 at will and shouldn't be antag targets var/list/restricted_roles = list() diff --git a/code/datums/voice.dm b/code/datums/voice.dm new file mode 100644 index 00000000000..0e1b75f016b --- /dev/null +++ b/code/datums/voice.dm @@ -0,0 +1,155 @@ +#define GENDER_NAME_UNKNOW list(MALE = "Незнакомец", FEMALE = "Незнакомка", NEUTER = "Неизвестный", PLURAL = "Неизвестный") +#define FACE_MOD_SWITCH TRUE +//Новая система голоса +/datum/voice_model + var/mob/host = null + var/tts_seed_string = "Arthas" + var/voice_gender = MALE + var/voice_name = "Неизвестный" + var/real_voice_name = "Неизвестный" + + var/list/famous_voices = list() + var/list/famous_faces = list() + +/datum/voice_model/New(var/mob/owner_voice) + if(owner_voice != null) + host = owner_voice + real_voice_name = owner_voice.GetVoice() + voice_name = owner_voice.GetVoice() + voice_gender = owner_voice.gender + famous_voices[voice_name] = owner_voice.name + tts_seed_string = owner_voice.tts_seed + +/datum/voice_model/proc/RegSignals() + RegisterSignal(SSdcs, COMSIG_SPECIAL_MASS_STORE_VOICE, PROC_REF(SpecialMassAddVoice)) + +/datum/voice_model/proc/SpecialMassAddVoice(suka, list/list_voice) + SIGNAL_HANDLER + var/datum/job/prom_job = SSjobs.GetJob(host.job) //WARNING. Fuking byond + var/list/prom_data = list_voice?[prom_job.department] + + if(prom_data) + famous_voices |= prom_data + +/datum/voice_model/proc/JustListAddVoice(list_voice) + SIGNAL_HANDLER + famous_voices |= list_voice + +/datum/voice_model/proc/VoiceUpdate() + voice_name = host.GetVoice() //:badguy: + voice_gender = host.gender + tts_seed_string = host.tts_seed + +/datum/voice_model/proc/get_gender_unknown_name(gender_string) + var/result = (GENDER_NAME_UNKNOW)?[gender_string] + if(result) + return result + return "Неизвестный" +/* Not used +/datum/voice_model/proc/CopyInVoice(datum/voice_model/voice_to_copy) + tts_seed_string = voice_to_copy.tts_seed_string + voice_gender = voice_to_copy.voice_gender + voice_name = voice_to_copy.voice_name + +/datum/voice_model/proc/FullCopyInVoice(datum/voice_model/voice_to_copy) + CopyInVoice(voice_to_copy) + real_voice_name = voice_to_copy.real_voice_name + famous_voices = voice_to_copy.famous_voices +*/ + +/datum/voice_model/proc/GetManifestKnowVoice() + for(var/datum/data/record/t in GLOB.data_core.general) + if(t) + if(t.fields["voice"] == voice_name) + return t.fields["name"] + return "IDENTIFICATION ERROR" + +/datum/voice_model/proc/GetManifestKnowFace(mob/face_target) + for(var/datum/data/record/t in GLOB.data_core.general) + if(t) + if(t.fields["name"] == face_target.name) + return t.fields["name"] + return "IDENTIFICATION FACE ERROR" + +/datum/voice_model/proc/TryStore(mob/target) + if(src == target.adv_voice) + return TRUE + . = FALSE + if(!ishuman(target)) + return target.name + var/mob/living/carbon/human/target_H = target + var/obj/item/card/id/prov_wear_id = null + + if(isIdCard(target_H.wear_id)) //Fuck + prov_wear_id = target_H.wear_id + if(isWallet(target_H.wear_id)) //Мфпмфпф + var/obj/item/storage/wallet/prom = target_H.wear_id + prov_wear_id = prom.front_id + + if(!((target_H.wear_mask?.flags_inv & HIDENAME) || (target_H.head?.flags_inv & HIDENAME)) && prov_wear_id) + + //if(FACE_MOD_SWITCH) + // famous_faces[target_H.name] = prov_wear_id.registered_name //FUCK BYOND + famous_voices[target_H.adv_voice.voice_name] = prov_wear_id.registered_name + . = TRUE + else if(prov_wear_id) + famous_voices[target_H.adv_voice.voice_name] = prov_wear_id.registered_name + . = TRUE + return + +//For examie +// FUCKING BYOND +/* NOT USED +/datum/voice_model/proc/TryRecollectFace(mob/target) + if(src == target.adv_voice) + return target.name + if(!ishuman(target)) //:Roflcat: + return target.name + var/mob/living/carbon/human/target_H = target + + if(!((target_H.wear_mask?.flags_inv & HIDENAME) || (target_H.head?.flags_inv & HIDENAME))) + . = famous_faces?[target_H.name] + + if(.) + return + + if((target_H.wear_suit?.flags_inv & HIDEJUMPSUIT) && (target_H.head?.flags_inv & HIDENAME)) + . = get_gender_unknown_name(NEUTER) + else + . = get_gender_unknown_name(target_H.gender) + return +*/ +//For hear +/datum/voice_model/proc/TryRecollectVoice(mob/target) + if(!ishuman(host)) //Мышки мышки знают все.... + return target.name + if(host.mind.special_role_meta_know && (target.mind.special_role == host.mind.special_role)) + return target.name + if(src == target.adv_voice) + return target.name + if(!ishuman(target)) + return target.name + + . = famous_voices?[target.adv_voice.voice_name] + if(.) + return + + return get_gender_unknown_name(target.adv_voice.voice_gender) + +/datum/voice_model/proc/I_do_remember(mob/target) + . = famous_voices?[target.adv_voice.voice_name] + if(.) + return TRUE + return FALSE + +//HELPERS + +/proc/GenDepartamentVoiceTree(mob/target, list/departments) + var/list/result = list() + + for(var/dep_flag in departments) //:catsmile: + result[dep_flag] = list(target.adv_voice.voice_name = target.name) + + return result + +#undef GENDER_NAME_UNKNOW diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 71eff1cfe86..3f71877e67c 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1706,6 +1706,11 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) /atom/proc/GetTTSVoice() return tts_seed +/mob/proc/UpdateVoice() + voice_name = GetVoice() + tts_seed = GetTTSVoice() + adv_voice.VoiceUpdate() + /// Passes Stat Browser Panel clicks to the game and calls client click on an atom /atom/Topic(href, list/href_list) . = ..() diff --git a/code/game/gamemodes/clockwork/clockwork.dm b/code/game/gamemodes/clockwork/clockwork.dm index b3e52e47ca1..17e10303251 100644 --- a/code/game/gamemodes/clockwork/clockwork.dm +++ b/code/game/gamemodes/clockwork/clockwork.dm @@ -190,6 +190,7 @@ GLOBAL_LIST_EMPTY(all_clockers) clockwork_cult += clock_mind clock_mind.current.faction |= "clockwork_cult" clock_mind.special_role = SPECIAL_ROLE_CLOCKER + clock_mind.special_role_meta_know = TRUE if(clock_mind.assigned_role == JOB_TITLE_CLOWN) to_chat(clock_mind.current, "A dark power has allowed you to overcome your clownish nature, letting you wield weapons without harming yourself.") diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index a6254bc7d85..fa440f4e411 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -187,6 +187,7 @@ GLOBAL_LIST_EMPTY(all_cults) cult += cult_mind cult_mind.current.faction |= "cult" cult_mind.special_role = SPECIAL_ROLE_CULTIST + cult_mind.special_role_meta_know = TRUE ADD_TRAIT(cult_mind.current, TRAIT_HEALS_FROM_CULT_PYLONS, CULT_TRAIT) if(cult_mind.assigned_role == JOB_TITLE_CLOWN) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index fbdc4c534a2..26e42ee8f9c 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -329,7 +329,8 @@ structure_check() searches for nearby cultist structures required for the invoca convertee.visible_message("[convertee] writhes in pain as the markings below them glow a bloody red!", \ "AAAAAAAAAAAAAA-") SSticker.mode.add_cultist(convertee.mind) - convertee.mind.special_role = "Cultist" + convertee.mind.special_role = "Cultist" //wtf + //convertee.mind.special_role_meta_know = TRUE to_chat(convertee, "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible, truth. The veil of reality has been ripped away \ and something evil takes root.") to_chat(convertee, "Assist your new compatriots in their dark dealings. Your goal is theirs, and theirs is yours. You serve [SSticker.cultdat.entity_title3] above all else. Bring it back.\ diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 8ef7feab05c..e100692a68e 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -85,21 +85,60 @@ /** * Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things. - */ + */ /datum/game_mode/proc/post_setup() - + /* + //Cringe zone start + //Data format JOB = list(Voice_name = name) + var/list/communist_manifest = list() + var/list/capitalist_pig = list() + var/list/head_pigs = list() //capitan + /* + var/list/god_ai_list = list() //for AI + for(var/mob/living/silicon/ai) + if(ai.job = JOB_TITLE_AI && ai.loc.z == STATION_LEVEL) + god_ai_list[ai.voice_name] = ai.name + */ + for(var/mob/living/carbon/human/target) + var/datum/job/prom_job = SSjobs.GetJob(target.job) + var/dep_flag = "[prom_job?.department_flag]" + + if(!dep_flag) + continue + if(target.job in GLOB.command_positions) + capitalist_pig[target.GetVoice()] = target.name + if(target.job == JOB_TITLE_CAPTAIN) + head_pigs[target.GetVoice()] = target.name + if(communist_manifest?[dep_flag]) + communist_manifest[dep_flag][target.GetVoice()] = target.name + else + communist_manifest[dep_flag] = list(target.GetVoice() = target.name) + for(var/mob/living/carbon/human/target) + var/datum/job/prom_job = SSjobs.GetJob(target.job) + var/dep_flag = "[prom_job?.department_flag]" + if(!dep_flag) + continue + if(communist_manifest?[dep_flag]) + if(target.job in GLOB.command_positions) + target.adv_voice.famous_voices = (communist_manifest[dep_flag] + capitalist_pig) - target.GetVoice() + else + target.adv_voice.famous_voices = (communist_manifest[dep_flag] + head_pigs) - target.GetVoice() + //Cringe zone stop + */ + spawn(ROUNDSTART_LOGOUT_REPORT_TIME) display_roundstart_logout_report() + INVOKE_ASYNC(src, PROC_REF(set_mode_in_db)) // Async query, dont bother slowing roundstart SScargo_quests.roll_start_quests() generate_station_goals() GLOB.start_state = new /datum/station_state() GLOB.start_state.count() + //SEND_GLOBAL_SIGNAL(COMSIG_SPECIAL_MASS_STORE_VOICE, GLOB.capitalist_manifest) return TRUE - /datum/game_mode/proc/set_mode_in_db() // I wonder what this could do guessing by the name if(SSticker?.mode && SSdbcore.IsConnected()) var/datum/db_query/query_round_game_mode = SSdbcore.NewQuery("UPDATE round SET game_mode=:gm WHERE id=:rid", list( diff --git a/code/game/jobs/job/central.dm b/code/game/jobs/job/central.dm index ba29114705e..c9598a15867 100644 --- a/code/game/jobs/job/central.dm +++ b/code/game/jobs/job/central.dm @@ -13,6 +13,8 @@ admin_only = 1 outfit = /datum/outfit/job/ntnavyofficer + department = "Sedali" + /datum/job/ntnavyofficer/get_access() return get_centcom_access(title) diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm index bfe04726e2b..246b8a89b54 100644 --- a/code/game/jobs/job/engineering.dm +++ b/code/game/jobs/job/engineering.dm @@ -1,3 +1,4 @@ +#define PRIMITIVE_STATION_DEPARTMENTS list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Support", "Civilian") /datum/job/chief_engineer title = JOB_TITLE_CHIEF flag = JOB_FLAG_CHIEF @@ -28,6 +29,9 @@ min_start_money = 400 max_start_money = 700 + defoult_dep = FALSE + college_department = PRIMITIVE_STATION_DEPARTMENTS + /datum/outfit/job/chief_engineer name = "Chief Engineer" jobtype = /datum/job/chief_engineer diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 4aac6998041..d8ba8006c74 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -1,5 +1,5 @@ /datum/job - + //ПРЕДУПРЕЖДЕНИЕ ВСЕМ И ВСЯ, НЕ ЗАБЫВАЙТЕ ПРОПИСЫВАТЬ ДЕПОРТАМЕНТ В Job_Departamenst.dm ИНАЧЕ НАХУЙ ВСЕ СЛОМАЕТСЯ //The name of the job var/title = "NOPE" @@ -81,7 +81,15 @@ var/insurance = INSURANCE_STANDART var/insurance_type = INSURANCE_TYPE_STANDART + var/defoult_dep = TRUE + var/list/college_department = list() //Указаные отделы будут знать тебя. По умолчанию тебя знает твой отдел + //Only override this proc +/datum/job/New() + if(department && defoult_dep) + college_department.Add(department) + + /datum/job/proc/after_spawn(mob/living/carbon/human/H) /datum/job/proc/announce(mob/living/carbon/human/H) diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index 06879c0c751..0d79c46db5a 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -26,6 +26,9 @@ min_start_money = 400 max_start_money = 700 + defoult_dep = FALSE + college_department = PRIMITIVE_STATION_DEPARTMENTS + /datum/outfit/job/cmo name = JOB_TITLE_CMO jobtype = /datum/job/cmo @@ -261,6 +264,8 @@ min_start_money = 200 max_start_money = 400 + college_department = list("Medical", "Science") + /datum/outfit/job/geneticist name = "Geneticist" jobtype = /datum/job/geneticist diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index 9529e98f49a..8b1117dd787 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -31,7 +31,9 @@ salary = 300 min_start_money = 400 max_start_money = 700 - + + defoult_dep = FALSE + college_department = PRIMITIVE_STATION_DEPARTMENTS /datum/outfit/job/rd name = "Research Director" diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 9f6e5f2a2f4..230e73b2e89 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -30,6 +30,9 @@ min_start_money = 400 max_start_money = 700 + defoult_dep = FALSE + college_department = PRIMITIVE_STATION_DEPARTMENTS + /datum/outfit/job/hos name = "Head of Security" jobtype = /datum/job/hos @@ -271,6 +274,8 @@ min_start_money = 200 max_start_money = 550 + college_department = list("Security", "Medical") //:catsmile: + /datum/outfit/job/brigdoc name = "Brig Physician" jobtype = /datum/job/brigdoc diff --git a/code/game/jobs/job/silicon.dm b/code/game/jobs/job/silicon.dm index be71c5ee5da..bcb45e9ed33 100644 --- a/code/game/jobs/job/silicon.dm +++ b/code/game/jobs/job/silicon.dm @@ -36,6 +36,8 @@ alt_titles = list("Robot") insurance_type = INSURANCE_TYPE_NONE + defoult_dep = FALSE + /datum/job/cyborg/equip(mob/living/carbon/human/H) if(!H) return FALSE diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm index 964541d55f6..9c8c240d8c9 100644 --- a/code/game/jobs/job/supervisor.dm +++ b/code/game/jobs/job/supervisor.dm @@ -25,6 +25,9 @@ GLOBAL_DATUM_INIT(captain_announcement, /datum/announcement/minor, new(do_newsca min_start_money = 600 max_start_money = 1200 + defoult_dep = FALSE + college_department = PRIMITIVE_STATION_DEPARTMENTS + /datum/job/captain/get_access() return get_all_accesses() @@ -96,6 +99,9 @@ GLOBAL_DATUM_INIT(captain_announcement, /datum/announcement/minor, new(do_newsca min_start_money = 400 max_start_money = 700 + defoult_dep = FALSE + college_department = PRIMITIVE_STATION_DEPARTMENTS + /datum/outfit/job/hop name = "Head of Personnel" jobtype = /datum/job/hop @@ -202,6 +208,8 @@ GLOBAL_DATUM_INIT(captain_announcement, /datum/announcement/minor, new(do_newsca min_start_money = 400 max_start_money = 700 + college_department = list("Command", "Security") + /datum/outfit/job/blueshield name = "Blueshield" jobtype = /datum/job/blueshield diff --git a/code/game/jobs/job/support.dm b/code/game/jobs/job/support.dm index f8d0eeb1bc1..f9da1b5266e 100644 --- a/code/game/jobs/job/support.dm +++ b/code/game/jobs/job/support.dm @@ -23,6 +23,9 @@ min_start_money = 400 max_start_money = 700 + defoult_dep = FALSE + college_department = PRIMITIVE_STATION_DEPARTMENTS + /datum/outfit/job/qm name = "Quartermaster" jobtype = /datum/job/qm diff --git a/code/game/jobs/job/syndicate.dm b/code/game/jobs/job/syndicate.dm index 97ed2ea9c05..eebeb30175e 100644 --- a/code/game/jobs/job/syndicate.dm +++ b/code/game/jobs/job/syndicate.dm @@ -12,6 +12,7 @@ syndicate_command = 1 outfit = /datum/outfit/job/syndicateofficer insurance_type = INSURANCE_TYPE_NONE + department = "SyndiCat" /datum/job/syndicateofficer/get_access() return get_syndicate_access(title) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 42de0b94b54..e2ab095cd24 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -66,6 +66,7 @@ spamcheck = 0 /obj/item/megaphone/proc/saymsg(mob/living/user, message) + user.UpdateVoice() add_say_logs(user, message, language = "Megaphone") var/message_tts = message message = replace_characters(message, list("+")) diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm index f8e1005915b..af5d69ea670 100644 --- a/code/modules/antagonists/_common/antag_datum.dm +++ b/code/modules/antagonists/_common/antag_datum.dm @@ -43,6 +43,8 @@ GLOBAL_LIST_EMPTY(antagonists) var/russian_wiki_name /// Show antag in ghost orbit var/show_in_orbit = TRUE + //for voice.dm :catsmile: + var/meta_acquaintances = FALSE /datum/antagonist/New() GLOB.antagonists += src diff --git a/code/modules/economy/Job_Departments.dm b/code/modules/economy/Job_Departments.dm index 97950816208..0b4781a0e43 100644 --- a/code/modules/economy/Job_Departments.dm +++ b/code/modules/economy/Job_Departments.dm @@ -1,6 +1,8 @@ GLOBAL_LIST_INIT(station_departments, list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Support", "Civilian")) +//Это нужно поскольку GLOB.station_departments определяется во время выполнения // The department the job belongs to. +// fuck you cib /datum/job/var/department = null // Whether this is a head position @@ -9,6 +11,10 @@ GLOBAL_LIST_INIT(station_departments, list("Command", "Medical", "Engineering", /datum/job/captain/department = "Command" /datum/job/captain/head_position = 1 +/datum/job/nanotrasenrep/department = "Command" + +/datum/job/blueshield/department = "Command" + /datum/job/hop/department = "Support" /datum/job/hop/head_position = 1 @@ -20,26 +26,34 @@ GLOBAL_LIST_INIT(station_departments, list("Command", "Medical", "Engineering", /datum/job/hydro/department = "Support" -/datum/job/mining/department = "Support" - /datum/job/janitor/department = "Support" +/datum/job/clown/department = "Support" + +/datum/job/mime/department = "Support" + /datum/job/librarian/department = "Support" /datum/job/lawyer/department = "Support" /datum/job/chaplain/department = "Support" +/datum/job/explorer/department = "Support" + /datum/job/qm/department = "Cargo" /datum/job/qm/head_position = 1 /datum/job/cargo_tech/department = "Cargo" +/datum/job/mining/department = "Cargo" + /datum/job/chief_engineer/department = "Engineering" /datum/job/chief_engineer/head_position = 1 /datum/job/engineer/department = "Engineering" +/datum/job/mechanic/department = "Engineering" + /datum/job/atmos/department = "Engineering" /datum/job/engineer/trainee/department = "Engineering" @@ -49,10 +63,16 @@ GLOBAL_LIST_INIT(station_departments, list("Command", "Medical", "Engineering", /datum/job/doctor/department = "Medical" +/datum/job/coroner/department = "Medical" + /datum/job/chemist/department = "Medical" +/datum/job/virologist/department = "Medical" + /datum/job/geneticist/department = "Medical" +/datum/job/paramedic/department = "Medical" + /datum/job/psychiatrist/department = "Medical" /datum/job/doctor/intern/department = "Medical" @@ -75,3 +95,12 @@ GLOBAL_LIST_INIT(station_departments, list("Command", "Medical", "Engineering", /datum/job/officer/department = "Security" +/datum/job/brigdoc/department = "Security" + +/datum/job/pilot/department = "Security" + +/datum/job/judge/department = "Security" + +/datum/job/lawyer/department = "Security" + + diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index c0e99de82c6..21d34720a49 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -138,7 +138,7 @@ if(italics) message = "[message]" - + speaker_name = adv_voice.TryRecollectVoice(speaker) var/track = null if(isobserver(src)) if(speaker_name != speaker.real_name && speaker.real_name) @@ -245,17 +245,15 @@ INVOKE_ASYNC(GLOBAL_PROC, /proc/tts_cast, src, src, message_tts, speaker.tts_seed, FALSE, effect, null, null, 'sound/effects/radio_chatter.ogg') /mob/proc/handle_speaker_name(mob/speaker = null, vname, hard_to_hear) - var/speaker_name = "unknown" - if(speaker) - speaker_name = speaker.name - - if(vname) - speaker_name = vname - + var/speaker_name = "Неизвестный" if(hard_to_hear) - speaker_name = "unknown" + return speaker_name + if(!(speaker)) + return vname + if(!ishuman(speaker)) + return speaker.adv_voice.voice_name - return speaker_name + return adv_voice.TryRecollectVoice(speaker) /mob/proc/handle_track(message, verb = "says", mob/speaker = null, speaker_name, atom/follow_target, hard_to_hear) return diff --git a/code/modules/mob/living/carbon/brain/brain_say.dm b/code/modules/mob/living/carbon/brain/brain_say.dm index 5527c61def1..5f2d26dc631 100644 --- a/code/modules/mob/living/carbon/brain/brain_say.dm +++ b/code/modules/mob/living/carbon/brain/brain_say.dm @@ -1,5 +1,6 @@ //TODO: Convert this over for languages. /mob/living/carbon/brain/say(message, datum/language/speaking = null) + if(stat == DEAD) return ..() if(!can_speak(warning = TRUE)) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 1cfac94b198..2d43e9ab331 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -29,7 +29,8 @@ skipears |= wear_mask.flags_inv & HIDEHEADSETS var/msg = "This is " - + if(!user.adv_voice.TryStore(src)) + to_chat(user, "Кажется вам не за что зацепится взглядом...") if(!(skipjumpsuit && skipface) && icon) //big suits/masks/helmets make it hard to tell their gender msg += "[bicon(icon(icon, dir=SOUTH))] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated msg += "[name]" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 8fe2746464a..65c003ec848 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1,3 +1,4 @@ + /mob/living/carbon/human/Initialize(mapload, datum/species/new_species = /datum/species/human) icon = null // This is now handled by overlays -- we just keep an icon for the sake of the map editor. create_dna() @@ -390,9 +391,9 @@ if(name_override) return name_override if(wear_mask && (wear_mask.flags_inv & HIDENAME)) //Wearing a mask which hides our face, use id-name if possible - return get_id_name("Unknown") + return get_id_name(adv_voice.get_gender_unknown_name(gender)) if(head && (head.flags_inv & HIDENAME)) - return get_id_name("Unknown") //Likewise for hats + return get_id_name(adv_voice.get_gender_unknown_name(gender)) //Likewise for hats var/face_name = get_face_name() var/id_name = get_id_name("") if(add_id_name && id_name && (id_name != face_name)) @@ -403,7 +404,7 @@ /mob/living/carbon/human/proc/get_face_name() var/obj/item/organ/external/head_organ = get_organ(BODY_ZONE_HEAD) if(!head_organ || head_organ.is_disfigured() || cloneloss > 50 || !real_name || HAS_TRAIT(src, TRAIT_HUSK)) //disfigured. use id-name if possible - return "Unknown" + return adv_voice.get_gender_unknown_name(gender) return real_name @@ -412,6 +413,7 @@ * Useful when player is being seen by other mobs. */ /mob/living/carbon/human/proc/get_id_name(if_no_id = "Unknown") + if_no_id = adv_voice.get_gender_unknown_name(gender) var/obj/item/card/id/id = wear_id?.GetID() if(istype(id)) return id.registered_name @@ -1962,7 +1964,6 @@ Eyes need to have significantly high darksight to shine unless the mob has the X if(istype(potential_spine)) carrydelay *= potential_spine.athletics_boost_multiplier */ - if(carrydelay <= 3 SECONDS) skills_space = " very quickly" else if(carrydelay <= 4 SECONDS) @@ -1978,5 +1979,6 @@ Eyes need to have significantly high darksight to shine unless the mob has the X if(!can_be_firemanned(target) || incapacitated(INC_IGNORE_GRABBED) || target.buckled) visible_message(span_warning("[src] fails to fireman carry [target]!")) return - + return buckle_mob(target, TRUE, FALSE, CARRIER_NEEDS_ARM) //checkloc is false because we usually grab people from nearest tile +//НЕ ВНОСИТЬ ИЗМЕНЕНИЯ, ЮБИЛЕЙНОЕ ЧИСЛО СТРОК diff --git a/code/modules/mob/living/carbon/human/human_say.dm b/code/modules/mob/living/carbon/human/human_say.dm index bcc9abbb6b4..7e244316cc5 100644 --- a/code/modules/mob/living/carbon/human/human_say.dm +++ b/code/modules/mob/living/carbon/human/human_say.dm @@ -8,6 +8,15 @@ return " (as [get_id_name("Unknown")])" return ..() +/mob/living/carbon/human/proc/GetDescription() + var/datum/species/prom_spec = dna.species + if(age < 24) + return "Young [prom_spec.name] [gender]" + if(age < 45) + return "Mature [prom_spec.name] [gender]" + if(age < 60) + return "Old [prom_spec.name] [gender]" + return "Ancient [prom_spec.name] [gender]" /mob/living/carbon/human/say_understands(mob/other, datum/language/speaking = null) if(dna?.species?.can_understand(other)) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d625200111c..cf149bf18fa 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -11,8 +11,9 @@ life_tick++ - voice = GetVoice() - tts_seed = GetTTSVoice() + //Теперь это этажом ниже + //voice = GetVoice() + //tts_seed = GetTTSVoice() if(.) //not dead diff --git a/code/modules/mob/living/carbon/human/npcs.dm b/code/modules/mob/living/carbon/human/npcs.dm index ca2c22d05e5..484d0ccf745 100644 --- a/code/modules/mob/living/carbon/human/npcs.dm +++ b/code/modules/mob/living/carbon/human/npcs.dm @@ -9,15 +9,16 @@ . = ..() name = "Pun Pun" real_name = name + job = "Bartender" + tts_seed = "Chen" var/obj/item/clothing/under/punpun/prom = new(src) - var/obj/item/clothing/accessory/petcollar/prom_collar = new(src) - var/obj/item/card/id/punpun/punpun_id = new(prom_collar) - prom_collar.access_id = punpun_id - prom_collar.on_attached(prom, src) + //var/obj/item/clothing/accessory/petcollar/prom_collar = new(src) + var/obj/item/card/id/punpun/punpun_id = new(src) + //prom_collar.access_id = punpun_id + //prom_collar.on_attached(prom, src) equip_to_slot_if_possible(prom, ITEM_SLOT_CLOTH_INNER) - - tts_seed = "Chen" + equip_to_slot_if_possible(punpun_id, ITEM_SLOT_ID) /mob/living/carbon/human/lesser/monkey/punpun/can_use_machinery(obj/machinery/mas) . = ..() diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index cf013ce2c08..f01e2fef133 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -1,6 +1,12 @@ /mob/living/carbon/Life(seconds, times_fired) set invisibility = 0 + //:roflcat: + voice_name = GetVoice() + tts_seed = GetTTSVoice() + adv_voice.voice_gender = gender + adv_voice.voice_name = voice_name + adv_voice.tts_seed_string = tts_seed if(HAS_TRAIT(src, TRAIT_NO_TRANSFORM)) return diff --git a/code/modules/mob/living/living_say.dm b/code/modules/mob/living/living_say.dm index 2e0ad06133e..4ca2e766541 100644 --- a/code/modules/mob/living/living_say.dm +++ b/code/modules/mob/living/living_say.dm @@ -200,6 +200,7 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key) /mob/living/say(message, verb = "says", sanitize = TRUE, ignore_speech_problems = FALSE, ignore_atmospherics = FALSE, ignore_languages = FALSE) + ..() if(client) client.check_say_flood(5) if(check_mute(client.ckey, MUTE_IC)) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 4304861f5c6..ef5ef408559 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -204,6 +204,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( /mob/living/silicon/robot/proc/init(alien, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null) + adv_voice.RegSignals() aiCamera = new/obj/item/camera/siliconcam/robot_camera(src) make_laws() additional_law_channels["Binary"] = get_language_prefix(LANGUAGE_BINARY) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 62c4b4b530a..ce482f7f543 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -61,6 +61,13 @@ /mob/living/silicon/med_hud_set_status() return diag_hud_set_status() //we use a different hud +/mob/living/silicon/handle_speaker_name(mob/speaker = null, vname, hard_to_hear) + if(speaker.adv_voice == adv_voice) //HeLLO Is I + return speaker.name + if(adv_voice.I_do_remember(speaker)) + return adv_voice.TryRecollectVoice(speaker) + return speaker.adv_voice.GetManifestKnowVoice() + /mob/living/silicon/Destroy() UnregisterSignal(SSalarm, list( COMSIG_TRIGGERED_ALARM, diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 02b62e4adf1..a63d366acc1 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -25,7 +25,12 @@ return ..() /mob/Initialize(mapload) + GLOB.mob_list += src + voice_name = GetVoice() + adv_voice = new(src) + add_to_mob_list() + if(stat == DEAD) add_to_dead_mob_list() else diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 66ecf8a68a2..1456667769b 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -159,8 +159,8 @@ var/radiation = 0 //Carbon //see: setup.dm for list of mutations - var/voice_name = "неизвестный голос" + var/datum/voice_model/adv_voice = null var/list/faction = list("neutral") //Used for checking whether hostile simple animals will attack you, possibly more stuff later diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index fd397aea8e3..3befd346abf 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -525,7 +525,7 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM check_eye(src) return TRUE -/mob/proc/rename_character(oldname, newname) +/mob/proc/rename_character(oldname, newname, list/mass_update = list()) if(!newname) return 0 real_name = newname @@ -577,9 +577,12 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM length = length_char(oldname) pos = findtextEx_char(objective.explanation_text, oldname) objective.explanation_text = copytext_char(objective.explanation_text, 1, pos)+newname+copytext_char(objective.explanation_text, pos+length) + UpdateVoice() + if(LAZYLEN(mass_update) != 0) + SEND_GLOBAL_SIGNAL(COMSIG_SPECIAL_MASS_STORE_VOICE, GenDepartamentVoiceTree(src, mass_update)) return 1 -/mob/proc/rename_self(var/role, var/allow_numbers = FALSE, var/force = FALSE) +/mob/proc/rename_self(var/role, var/allow_numbers = FALSE, var/force = FALSE, list/mass_update = list()) spawn(0) var/oldname = real_name @@ -608,8 +611,7 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM if(!newname) //we'll stick with the oldname then return - - rename_character(oldname, newname) + rename_character(oldname, newname, mass_update) /proc/cultslur(n) // Inflicted on victims of a stun talisman var/phrase = html_decode(n) diff --git a/code/modules/mob/mob_say.dm b/code/modules/mob/mob_say.dm index 50f0010cdf2..e4d456a34fb 100644 --- a/code/modules/mob/mob_say.dm +++ b/code/modules/mob/mob_say.dm @@ -3,6 +3,7 @@ "\[" = "", "]" = "", "{" = "", "}" = "") /mob/proc/say(message, verb = "says", sanitize = TRUE, ignore_speech_problems = FALSE, ignore_atmospherics = FALSE, ignore_languages = FALSE) + UpdateVoice() return /mob/verb/whisper(message as text) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 5fba35858c8..a3290052804 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -614,15 +614,14 @@ // stop_sound_channel(CHANNEL_LOBBYMUSIC) client?.tgui_panel?.stop_music() - if(mind) mind.active = 0 //we wish to transfer the key manually if(mind.assigned_role == JOB_TITLE_CLOWN) //give them a clownname if they are a clown new_character.real_name = pick(GLOB.clown_names) //I hate this being here of all places but unfortunately dna is based on real_name! - new_character.rename_self(JOB_TITLE_CLOWN) + new_character.rename_self(JOB_TITLE_CLOWN, mass_update = list("Support")) else if(mind.assigned_role == JOB_TITLE_MIME) new_character.real_name = pick(GLOB.mime_names) - new_character.rename_self(JOB_TITLE_MIME) + new_character.rename_self(JOB_TITLE_MIME, mass_update = list("Support")) mind.set_original_mob(new_character) mind.transfer_to(new_character) //won't transfer key since the mind is not active GLOB.human_names_list += new_character.real_name diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 3da7a445057..393109922ec 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -32,6 +32,7 @@ client?.tgui_panel?.stop_music() var/mob/living/silicon/ai/O = new (loc,,,1)//No MMI but safety is in effect. + O.adv_voice.RegSignals() O.invisibility = 0 O.aiRestorePowerRoutine = 0 @@ -44,7 +45,7 @@ O.on_mob_init() O.add_ai_verbs() - + O.rename_self(JOB_TITLE_AI,1) O.tts_seed = tts_seed diff --git a/paradise.dme b/paradise.dme index 17870ec3db3..b334884c567 100644 --- a/paradise.dme +++ b/paradise.dme @@ -443,6 +443,7 @@ #include "code\datums\uplink_item.dm" #include "code\datums\verb_callback.dm" #include "code\datums\vision_override.dm" +#include "code\datums\voice.dm" #include "code\datums\weakrefs.dm" #include "code\datums\cache\air_alarm.dm" #include "code\datums\cache\apc.dm"