Skip to content

Commit

Permalink
исправил
Browse files Browse the repository at this point in the history
  • Loading branch information
KefirTT committed Nov 16, 2024
1 parent dde4acd commit d7f4f1a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
21 changes: 12 additions & 9 deletions code/game/dna/genes/disabilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -398,18 +398,21 @@
..()
block = GLOB.aphasiablock

/datum/dna/gene/disability/aphasia/activate(mob/living/carbon/human/H, flags)
/datum/dna/gene/disability/aphasia/can_activate(mob/living/carbon/human/H, flags)
if(isplasmaman(H) || iswryn(H))
to_chat(H, span_warning("Вы чувствуете, что что-то не так, но не можете понять, что именно."))
return
return FALSE
. = ..()

/datum/dna/gene/disability/aphasia/activate(mob/living/carbon/human/H, flags)
. = ..()
if(H.remove_language("Galactic Common"))
H.add_language("Galactic Common", TRUE)
H.dna.species.default_language = H.dna.species.language
if(H.remove_language(LANGUAGE_GALACTIC_COMMON))
H.add_language(LANGUAGE_GALACTIC_COMMON, TRUE)
H.dna.species.default_language = H.dna.species.language


/datum/dna/gene/disability/aphasia/deactivate(mob/living/H, flags)
/datum/dna/gene/disability/aphasia/deactivate(mob/living/carbon/human/H, flags)
. = ..()
if(H.remove_language("Galactic Common", TRUE))
H.add_language("Galactic Common")
H.dna.species.default_language = LANGUAGE_GALACTIC_COMMON
if(H.remove_language(LANGUAGE_GALACTIC_COMMON, TRUE))
H.add_language(LANGUAGE_GALACTIC_COMMON)
H.dna.species.default_language = initial(H.dna.species.default_language)
8 changes: 4 additions & 4 deletions code/modules/mob/language.dm
Original file line number Diff line number Diff line change
Expand Up @@ -921,9 +921,9 @@
return FALSE

if(only_listening)
. = !LAZYIN(languages_listening, new_language)
. = !LAZYIN(languages_only_listen, new_language)
if(.)
LAZYADD(languages_listening, new_language)
LAZYADD(languages_only_listen, new_language)
else
. = !LAZYIN(languages, new_language)
if(.)
Expand All @@ -940,9 +940,9 @@
if(!istype(rem_language))
return FALSE
if(only_listening)
. = LAZYIN(languages_listening, rem_language)
. = LAZYIN(languages_only_listen, rem_language)
if(.)
LAZYREMOVE(languages_listening, rem_language)
LAZYREMOVE(languages_only_listen, rem_language)
else
. = LAZYIN(languages, rem_language)
if(.)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
if(dna?.species?.can_understand(other))
return TRUE

if(speaking in languages_listening)
if(speaking in languages_only_listen)
return TRUE

//These only pertain to common. Languages are handled by mob/say_understands()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/mob_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
var/exploit_record = ""
/// For speaking/listening.
var/list/datum/language/languages
var/list/datum/language/languages_listening // For understanding the language without ability to speak. Still can speak if lang is in /languages list
var/list/datum/language/languages_only_listen // For understanding the language without ability to speak. Still can speak if lang is in /languages list
/// For reagents that grant language knowlege.
var/list/temporary_languages
var/list/speak_emote = list("says") // Verbs used when speaking. Defaults to 'say' if speak_emote is null.
Expand Down

0 comments on commit d7f4f1a

Please sign in to comment.