Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pelmenik123 committed Jan 7, 2025
1 parent e8345a3 commit a39ddcd
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 21 deletions.
24 changes: 18 additions & 6 deletions code/datums/voice.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#define GENDER_NAME_UNKNOW list(MALE = "Незнакомец", FEMALE = "Незнакомка", NEUTER = "Неизвестный", PLURAL = "Неизвестный")
#define FACE_MOD_SWITCH TRUE
//Новая система голоса
/datum/voice_model
var/mob/host = null //Носитель этой хуеты
Expand All @@ -8,7 +9,7 @@
var/real_voice_name = "Неизвестный"

var/list/famous_voices = list()
//var/list/famous_faces = list()
var/list/famous_faces = list()

/datum/voice_model/New(var/mob/owner_voice)
if(owner_voice != null)
Expand Down Expand Up @@ -66,14 +67,14 @@
return t.fields["name"]
return "IDENTIFICATION ERROR"
//Технически name это представление твоего ебала
/* BYOND...

/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)
Expand All @@ -92,7 +93,8 @@

if(!((target_H.wear_mask?.flags_inv & HIDENAME) || (target_H.head?.flags_inv & HIDENAME)) && prov_wear_id)

//famous_faces[target_H.name] = prov_wear_id.registered_name //FUCK BYOND
if(FACE_MOD_SWITCH)

Check failure on line 96 in code/datums/voice.dm

View workflow job for this annotation

GitHub Actions / Run Linters

control flow condition is a static term

Check failure on line 96 in code/datums/voice.dm

View workflow job for this annotation

GitHub Actions / Run Linters

if condition is always true
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)
Expand All @@ -101,7 +103,7 @@
return

//For examie
/* FUCKING BYOND
// FUCKING BYOND
/datum/voice_model/proc/TryRecollectFace(mob/target)
if(src == target.adv_voice)
return target.name
Expand All @@ -120,7 +122,7 @@
else
. = get_gender_unknown_name(target_H.gender)
return
*/

//For hear
/datum/voice_model/proc/TryRecollectVoice(mob/target)
if(!ishuman(host)) //Мышки мышки знают все....
Expand All @@ -144,4 +146,14 @@
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
2 changes: 1 addition & 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 ИНАЧЕ НАХУЙ ВСЕ СЛОМАЕТСЯ
//The name of the job
var/title = "NOPE"

Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/job/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -264,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
Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/job/security.dm
Original file line number Diff line number Diff line change
Expand Up @@ -274,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
Expand Down
3 changes: 0 additions & 3 deletions code/game/jobs/job/silicon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
exp_type = EXP_TYPE_SILICON
insurance_type = INSURANCE_TYPE_NONE

college_department = list() //Синтам не нужны коллеги, ибо у них имена потом идут

/datum/job/ai/equip(mob/living/carbon/human/H)
if(!H)
return 0
Expand All @@ -39,7 +37,6 @@
insurance_type = INSURANCE_TYPE_NONE

defoult_dep = FALSE
college_department = list()

/datum/job/cyborg/equip(mob/living/carbon/human/H)
if(!H)
Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/job/supervisor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -208,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
Expand Down
31 changes: 29 additions & 2 deletions code/modules/economy/Job_Departments.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,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

Expand All @@ -22,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"
Expand All @@ -51,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"
Expand All @@ -77,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"


4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1964,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)
Expand All @@ -1980,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
//НЕ ВНОСИТЬ ИЗМЕНЕНИЯ, ЮБИЛЕЙНОЕ ЧИСЛО СТРОК
9 changes: 9 additions & 0 deletions code/modules/mob/living/carbon/human/human_say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
8 changes: 4 additions & 4 deletions code/modules/mob/mob_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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, mass_update = FALSE)
/mob/proc/rename_character(oldname, newname, list/mass_update = list())
if(!newname)
return 0
real_name = newname
Expand Down Expand Up @@ -578,11 +578,11 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
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(mass_update)
SEND_GLOBAL_SIGNAL(COMSIG_SPECIAL_MASS_STORE_VOICE, list("AbsolutePomny" = (list((adv_voice.voice_name) = name))))
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, var/mass_update = FALSE)
/mob/proc/rename_self(var/role, var/allow_numbers = FALSE, var/force = FALSE, list/mass_update = list())
spawn(0)
var/oldname = real_name

Expand Down
5 changes: 2 additions & 3 deletions code/modules/mob/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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, mass_update = TRUE)
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, mass_update = TRUE)
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
Expand Down

0 comments on commit a39ddcd

Please sign in to comment.