Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: [bounty] Voice update #6326

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
02328c7
ладно похуй уже
Pelmenik123 Dec 1, 2024
1c44ae7
микрофикс
Pelmenik123 Dec 8, 2024
a18ef9f
умер от кринжа
Pelmenik123 Dec 8, 2024
e64f2c7
костыльный фикс
Pelmenik123 Dec 8, 2024
6116f77
уу бляя
Pelmenik123 Jan 6, 2025
494e2d7
Merge branch 'master220' into VOICE-UPDATE
Pelmenik123 Jan 6, 2025
c4a3473
буэээ
Pelmenik123 Jan 7, 2025
e8345a3
Merge branch 'VOICE-UPDATE' of https://github.com/Pelmenik123/Pelmen-…
Pelmenik123 Jan 7, 2025
a39ddcd
bugfix
Pelmenik123 Jan 7, 2025
9b42ae5
nanofix
Pelmenik123 Jan 7, 2025
ae87b01
пендосия апдейт
Pelmenik123 Jan 8, 2025
6cd72b2
ух бля, ложка компоненты апдейт
Pelmenik123 Jan 12, 2025
6848e9e
ложка вантуз апдейт
Pelmenik123 Jan 12, 2025
e0969e5
фпмпмфпмф
Pelmenik123 Jan 12, 2025
157f632
нанотрахен
Pelmenik123 Jan 12, 2025
3536689
ДА КАК ВЫ
Pelmenik123 Jan 12, 2025
fa4acca
уэээ
Pelmenik123 Jan 12, 2025
7908280
уэээ сбэу
Pelmenik123 Jan 12, 2025
a357cc0
я хочу пиццу
Pelmenik123 Jan 13, 2025
a5503e5
GET OUT
Pelmenik123 Jan 13, 2025
6f8c836
бобр курва
Pelmenik123 Jan 13, 2025
2aea791
ыфвыфвыф
Pelmenik123 Jan 13, 2025
64516f4
суки
Pelmenik123 Jan 14, 2025
e8082ea
change comment back
Den109G Jan 14, 2025
caf3822
cultist
Den109G Jan 14, 2025
c14ac8a
апдейте форматирование
Pelmenik123 Jan 14, 2025
3a1ee78
adsfa
Pelmenik123 Jan 14, 2025
0d7156b
very nice
Pelmenik123 Jan 14, 2025
74a2fff
Update code/datums/voice.dm
Pelmenik123 Jan 15, 2025
bfa77b1
фмпмфппмфпмф апдейте
Pelmenik123 Jan 15, 2025
6195c0f
я ебал в сраку
Pelmenik123 Jan 15, 2025
4c6f42b
Merge branch 'master220' into VOICE-UPDATE
Pelmenik123 Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved

///from base of atom/attackby(): (/obj/item, /mob/living, params)
#define COMSIG_PARENT_ATTACKBY "atom_attackby"
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved

#define isstack(A) (istype(A, /obj/item/stack))

#define isstorage(A) (istype(A, /obj/item/storage))
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/plane_master/render_plate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
19 changes: 17 additions & 2 deletions code/datums/datacore.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

GLOBAL_LIST_EMPTY(capitalist_manifest)

/datum/datacore
var/list/medical = list()
var/list/general = list()
Expand Down Expand Up @@ -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)
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved

/datum/datacore/proc/manifest_modify(name, rank, assignment)
if(GLOB.PDA_Manifest.len)
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
Den109G marked this conversation as resolved.
Show resolved Hide resolved
var/special_role_meta_know = FALSE //Если TRUE то ты всегда будешь знать тех у кого такая-же спец роль
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
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()

Expand Down
155 changes: 155 additions & 0 deletions code/datums/voice.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
#define GENDER_NAME_UNKNOW list(MALE = "Незнакомец", FEMALE = "Незнакомка", NEUTER = "Неизвестный", PLURAL = "Неизвестный")
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
#define FACE_MOD_SWITCH TRUE
//Новая система голоса
/datum/voice_model
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
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()
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved

/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

Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
/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
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved

/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"
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved

/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)
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
. = famous_voices?[target.adv_voice.voice_name]
if(.)
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
return TRUE
return FALSE

//HELPERS

/proc/GenDepartamentVoiceTree(mob/target, list/departments)
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
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
5 changes: 5 additions & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1706,6 +1706,11 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
/atom/proc/GetTTSVoice()
return tts_seed

/mob/proc/UpdateVoice()
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
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)
. = ..()
Expand Down
1 change: 1 addition & 0 deletions code/game/gamemodes/clockwork/clockwork.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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, "<span class='clockitalic'>A dark power has allowed you to overcome your clownish nature, letting you wield weapons without harming yourself.</span>")
Expand Down
1 change: 1 addition & 0 deletions code/game/gamemodes/cult/cult.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion code/game/gamemodes/cult/runes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ structure_check() searches for nearby cultist structures required for the invoca
convertee.visible_message("<span class='warning'>[convertee] writhes in pain as the markings below them glow a bloody red!</span>", \
"<span class='cultlarge'><i>AAAAAAAAAAAAAA-</i></span>")
SSticker.mode.add_cultist(convertee.mind)
convertee.mind.special_role = "Cultist"
convertee.mind.special_role = "Cultist" //wtf
Den109G marked this conversation as resolved.
Show resolved Hide resolved
//convertee.mind.special_role_meta_know = TRUE
to_chat(convertee, "<span class='cultitalic'><b>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.</b></span>")
to_chat(convertee, "<span class='cultitalic'><b>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.\
Expand Down
45 changes: 42 additions & 3 deletions code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved

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(
Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/job/central.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
admin_only = 1
outfit = /datum/outfit/job/ntnavyofficer

department = "Sedali"

/datum/job/ntnavyofficer/get_access()
return get_centcom_access(title)

Expand Down
4 changes: 4 additions & 0 deletions code/game/jobs/job/engineering.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define PRIMITIVE_STATION_DEPARTMENTS list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Support", "Civilian")
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
/datum/job/chief_engineer
title = JOB_TITLE_CHIEF
flag = JOB_FLAG_CHIEF
Expand Down Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/datum/job

//ПРЕДУПРЕЖДЕНИЕ ВСЕМ И ВСЯ, НЕ ЗАБЫВАЙТЕ ПРОПИСЫВАТЬ ДЕПОРТАМЕНТ В Job_Departamenst.dm ИНАЧЕ НАХУЙ ВСЕ СЛОМАЕТСЯ
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
//The name of the job
var/title = "NOPE"

Expand Down Expand Up @@ -81,7 +81,15 @@
var/insurance = INSURANCE_STANDART
var/insurance_type = INSURANCE_TYPE_STANDART

var/defoult_dep = TRUE
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
var/list/college_department = list() //Указаные отделы будут знать тебя. По умолчанию тебя знает твой отдел

//Only override this proc
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved
/datum/job/New()
if(department && defoult_dep)
college_department.Add(department)
Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved


/datum/job/proc/after_spawn(mob/living/carbon/human/H)

/datum/job/proc/announce(mob/living/carbon/human/H)
Expand Down
Loading
Loading