Skip to content

Commit

Permalink
фпмпмфпмф
Browse files Browse the repository at this point in the history
  • Loading branch information
Pelmenik123 committed Jan 12, 2025
1 parent 6848e9e commit e0969e5
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 21 deletions.
4 changes: 2 additions & 2 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@

#define isitem(A) (istype(A, /obj/item))

#define isIdCard(A) (istype(A, /obj/item/card/id))
#define isidcard(A) (istype(A, /obj/item/card/id))

#define isWallet(A) (istype(A, /obj/item/storage/wallet))
#define iswallet(A) (istype(A, /obj/item/storage/wallet))

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

Expand Down
2 changes: 1 addition & 1 deletion code/datums/datacore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ GLOBAL_VAR_INIT(record_id_num, 1001)
assignment = "Unassigned"

var/id = num2hex(GLOB.record_id_num++, 6)
H.UpdateVoice()
H.update_voice()
var/datum/component/voice_model/prom_adv_voice = H.GetComponent(/datum/component/voice_model)
var/prom_voice = prom_adv_voice.voice_name

Expand Down
20 changes: 9 additions & 11 deletions code/datums/voice.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define GENDER_NAME_UNKNOW list(MALE = "Незнакомец", FEMALE = "Незнакомка", NEUTER = "Неизвестный", PLURAL = "Неизвестный")
#define GENDER_NAME_UNKNOWN list(MALE = "Незнакомец", FEMALE = "Незнакомка", NEUTER = "Неизвестный", PLURAL = "Неизвестный")
//Voice cumponent
/datum/component/voice_model
var/mob/host = null
Expand Down Expand Up @@ -96,9 +96,9 @@
var/mob/living/carbon/human/target_H = target
var/obj/item/card/id/prov_wear_id = null

if(isIdCard(target_H.wear_id)) //Fuck
if(isidcard(target_H.wear_id)) //Fuck
prov_wear_id = target_H.wear_id
if(isWallet(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

Expand Down Expand Up @@ -146,17 +146,15 @@
return target.name
var/datum/component/voice_model/adv_voice = target.GetComponent(/datum/component/voice_model)

. = famous_voices?[adv_voice.voice_name]
if(.)
if(famous_voices?[adv_voice.voice_name])
return

return get_gender_unknown_name(adv_voice.voice_gender)

/datum/component/voice_model/proc/I_do_remember(mob/target)
can_remember_voice
/datum/component/voice_model/proc/can_remember_voice(mob/target)
var/datum/component/voice_model/adv_voice = target.GetComponent(/datum/component/voice_model)

. = famous_voices?[adv_voice.voice_name]
if(.)
if(famous_voices?[adv_voice.voice_name])
return TRUE
return FALSE

Expand All @@ -171,9 +169,9 @@
return result

/proc/get_gender_unknown_name(gender_string) //Что ты мне сделаешь. я в другом городе
var/result = (GENDER_NAME_UNKNOW)?[gender_string]
var/result = (GENDER_NAME_UNKNOWN)?[gender_string]
if(result)
return result
return "Неизвестный"

#undef GENDER_NAME_UNKNOW
#undef GENDER_NAME_UNKNOWN
2 changes: 1 addition & 1 deletion code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1706,7 +1706,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
/atom/proc/GetTTSVoice()
return tts_seed

/mob/proc/UpdateVoice()
/mob/proc/update_voice()
voice_name = GetVoice()
tts_seed = GetTTSVoice()
SEND_SIGNAL(src, COMSIG_VOICE_UPDATE)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/megaphone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
spamcheck = 0

/obj/item/megaphone/proc/saymsg(mob/living/user, message)
user.UpdateVoice()
user.update_voice()
add_say_logs(user, message, language = "Megaphone")
var/message_tts = message
message = replace_characters(message, list("+"))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//:roflcat:
tts_seed = GetTTSVoice()

UpdateVoice()
//update_voice()

if(HAS_TRAIT(src, TRAIT_NO_TRANSFORM))
return
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/silicon/silicon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
return speaker.name

var/datum/component/voice_model/src_adv_voice = src.GetComponent(/datum/component/voice_model)
if(src_adv_voice.I_do_remember(speaker))
if(src_adv_voice.can_remember_voice(speaker))
return src_adv_voice.try_recollect_voice(speaker)
var/datum/component/voice_model/speaker_adv_voice = speaker.GetComponent(/datum/component/voice_model)
return speaker_adv_voice.get_manifest_know_voice()
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/mob_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,8 @@ 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)
update_voice()
if(!LAZYLEN(mass_update))
SEND_GLOBAL_SIGNAL(COMSIG_SPECIAL_MASS_STORE_VOICE, GenDepartamentVoiceTree(src, mass_update))
return 1

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/mob_say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"\[" = "", "]" = "", "{" = "", "}" = "")

/mob/proc/say(message, verb = "says", sanitize = TRUE, ignore_speech_problems = FALSE, ignore_atmospherics = FALSE, ignore_languages = FALSE)
UpdateVoice()
update_voice()
return

/mob/verb/whisper(message as text)
Expand Down

0 comments on commit e0969e5

Please sign in to comment.