From 4a0cce5d068169359f1761d5b88c0e979b210fef Mon Sep 17 00:00:00 2001 From: kefirka41 Date: Fri, 15 Nov 2024 20:01:14 +0600 Subject: [PATCH 01/11] 1 --- code/__DEFINES/genetics.dm | 3 +- code/_globalvars/genetics.dm | 2 +- code/game/dna/genes/disabilities.dm | 29 +++++++++++++++++-- code/game/dna/genes/gene.dm | 6 ---- code/game/gamemodes/setupgame.dm | 2 +- code/modules/client/preference/preferences.dm | 7 ++++- code/modules/mob/language.dm | 27 +++++++++++------ code/modules/mob/mob_defines.dm | 1 + 8 files changed, 55 insertions(+), 22 deletions(-) diff --git a/code/__DEFINES/genetics.dm b/code/__DEFINES/genetics.dm index 84bbaf40e6e..5bd97e6aabe 100644 --- a/code/__DEFINES/genetics.dm +++ b/code/__DEFINES/genetics.dm @@ -25,7 +25,8 @@ #define DISABILITY_FLAG_TEA_ADDICT (1<<13) #define DISABILITY_FLAG_ALCOHOLE_ADDICT (1<<14) #define DISABILITY_FLAG_NICOTINE_ADDICT (1<<15) -#define DISABILITY_FLAG_PARAPLEGIA (1<<16) +#define DISABILITY_FLAG_PARAPLEGIA (1<<16) +#define DISABILITY_FLAG_APHASIA (1<<17) //Nutrition levels for humans. No idea where else to put it diff --git a/code/_globalvars/genetics.dm b/code/_globalvars/genetics.dm index d3d4a4aaad6..b4099db0e82 100644 --- a/code/_globalvars/genetics.dm +++ b/code/_globalvars/genetics.dm @@ -46,6 +46,7 @@ GLOBAL_VAR_INIT(weakblock, 0) GLOBAL_VAR_INIT(hornsblock, 0) GLOBAL_VAR_INIT(comicblock, 0) GLOBAL_VAR_INIT(paraplegiablock, 0) +GLOBAL_VAR_INIT(aphasiablock, 0) // Powers GLOBAL_VAR_INIT(soberblock, 0) @@ -74,5 +75,4 @@ GLOBAL_LIST_EMPTY(global_mutations) GLOBAL_VAR_INIT(fakeblock1, 0) GLOBAL_VAR_INIT(fakeblock2, 0) GLOBAL_VAR_INIT(fakeblock3, 0) -GLOBAL_VAR_INIT(fakeblock4, 0) diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index 3e17d60509f..89ba1835319 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -266,7 +266,7 @@ /datum/dna/gene/disability/wingdings name = "Alien Voice" desc = "Искажает голос субъекта, превращая его в непонятную речь." - activation_message = list(span_wingdings("Vashi golosovyye svyazki kazhutsya chuzhimi.")) + activation_message = list(span_wingdings("Ваши голосовые связки кажутся инородными.")) deactivation_message = list("Ваши голосовые связки больше не кажутся инородными.") instability = -GENE_INSTABILITY_MINOR traits_to_add = list(TRAIT_WINGDINGS) @@ -303,7 +303,7 @@ /datum/dna/gene/disability/weak name = "Weak" desc = "Делает мышцы субъекта более слабыми." - activation_message = list("Вы чувствуете внезапную слабость в мышцах.") + activation_message = list("Вы чуствуете внезапную слабость в мышцах.") deactivation_message = list("Вы снова ощущаете силу в мышцах.") instability = -GENE_INSTABILITY_MODERATE traits_to_add = list(TRAIT_GENE_WEAK) @@ -378,7 +378,7 @@ /datum/dna/gene/disability/paraplegia name = "Paraplegia" desc = "Парализует мышцы ног." - activation_message = list("Вы не чувствуете своих ног.") + activation_message = list("Вы не чуствуете своих ног.") deactivation_message = list("Вы возвращаете контроль над ногами.") instability = -GENE_INSTABILITY_MAJOR traits_to_add = list(TRAIT_FLOORED) @@ -386,3 +386,26 @@ /datum/dna/gene/disability/paraplegia/New() ..() block = GLOB.paraplegiablock + +/datum/dna/gene/disability/aphasia + name = "Aphasia" + desc = "Цель забывает как говорить на общегалактическом." + activation_message = list("Вам становится труднее выражать свои мысли. Meh nahbleh blahmeh?") + deactivation_message = list("Ваша речь возвращается в норму.") + instability = -GENE_INSTABILITY_MINOR + +/datum/dna/gene/disability/aphasia/New() + ..() + block = GLOB.aphasiablock + +/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.set_default_language(GLOB.all_languages[H.dna.species.language]) + + +/datum/dna/gene/disability/aphasia/deactivate(mob/living/H, flags) + . = ..() + if(H.remove_language("Galactic Common", TRUE)) + H.add_language("Galactic Common") diff --git a/code/game/dna/genes/gene.dm b/code/game/dna/genes/gene.dm index a38be8e0513..3f59e965099 100644 --- a/code/game/dna/genes/gene.dm +++ b/code/game/dna/genes/gene.dm @@ -174,9 +174,3 @@ /datum/dna/gene/basic/fake/fake3/New() ..() block = GLOB.fakeblock3 - - -/datum/dna/gene/basic/fake/fake4/New() - ..() - block = GLOB.fakeblock4 - diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index b5bcb8c187d..e7f3cae9311 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -46,7 +46,6 @@ GLOB.fakeblock1 = getAssignedBlock("", numsToAssign) GLOB.fakeblock2 = getAssignedBlock("", numsToAssign) GLOB.fakeblock3 = getAssignedBlock("", numsToAssign) - GLOB.fakeblock4 = getAssignedBlock("", numsToAssign) // Bay muts GLOB.breathlessblock = getAssignedBlock("BREATHLESS", numsToAssign, DNA_HARD_BOUNDS, good = TRUE) @@ -100,6 +99,7 @@ // Paradise1984 Disabilities GLOB.auld_imperial_block = getAssignedBlock("AULD_IMPERIAL", numsToAssign) GLOB.paraplegiablock = getAssignedBlock("PARAPLEGIA", numsToAssign) + GLOB.aphasiablock = getAssignedBlock("APHASIA", numsToAssign) // // Static Blocks diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 7a371b75989..6033e84cb2b 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -1191,6 +1191,8 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts HTML += ShowDisabilityState(user, DISABILITY_FLAG_ALCOHOLE_ADDICT, "Alcohole addict") if(!(S.blacklisted_disabilities & DISABILITY_FLAG_PARAPLEGIA)) HTML += ShowDisabilityState(user, DISABILITY_FLAG_PARAPLEGIA, "Paraplegia") + if(!(S.blacklisted_disabilities & DISABILITY_FLAG_APHASIA)) + HTML += ShowDisabilityState(user, DISABILITY_FLAG_APHASIA, "Aphasia") HTML += {" \[Done\] @@ -1761,7 +1763,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts b_type = new_b_type if("hair") - if(species in list(SPECIES_HUMAN, SPECIES_UNATHI, SPECIES_TAJARAN, SPECIES_SKRELL, SPECIES_MACNINEPERSON, SPECIES_VULPKANIN, SPECIES_VOX, SPECIES_WRYN)) //Species that have hair. (No HAS_HAIR flag) + if(species in list(SPECIES_HUMAN, SPECIES_UNATHI, SPECIES_TAJARAN, SPECIES_SKRELL, SPECIES_MACNINEPERSON, SPECIES_VULPKANIN, SPECIES_VOX)) //Species that have hair. (No HAS_HAIR flag) var/input = "Choose your character's hair colour:" var/new_hair = input(user, input, "Character Preference", h_colour) as color|null if(new_hair) @@ -2959,6 +2961,9 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if((disabilities & DISABILITY_FLAG_PARAPLEGIA) && !(new_species.blacklisted_disabilities & DISABILITY_FLAG_PARAPLEGIA)) character.force_gene_block(GLOB.paraplegiablock, TRUE, TRUE) + if((disabilities & DISABILITY_FLAG_APHASIA) && !(new_species.blacklisted_disabilities & DISABILITY_FLAG_APHASIA)) + character.force_gene_block(GLOB.aphasiablock, TRUE, TRUE) + character.dna.species.handle_dna(character) if(character.dna.dirtySE) diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index 50f9f03aab0..7c8652f920e 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -907,7 +907,7 @@ // Language handling. -/mob/proc/add_language(language_name) +/mob/proc/add_language(language_name, var/only_listening = FALSE) if(SEND_SIGNAL(src, COMSIG_MOB_LANGUAGE_ADD, language_name) & DISEASE_MOB_LANGUAGE_PROCESSED) return TRUE @@ -920,12 +920,17 @@ if(!istype(new_language)) return FALSE - . = !LAZYIN(languages, new_language) - if(.) - LAZYADD(languages, new_language) + if(only_listening) + . = !LAZYIN(languages_listening, new_language) + if(.) + LAZYADD(languages_listening, new_language) + else + . = !LAZYIN(languages, new_language) + if(.) + LAZYADD(languages, new_language) -/mob/proc/remove_language(language_name) +/mob/proc/remove_language(language_name, var/only_listening = FALSE) if(SEND_SIGNAL(src, COMSIG_MOB_LANGUAGE_REMOVE, language_name) & DISEASE_MOB_LANGUAGE_PROCESSED) return TRUE @@ -934,10 +939,14 @@ rem_language = GLOB.all_languages[convert_lang_key_to_name(language_name)] if(!istype(rem_language)) return FALSE - - . = LAZYIN(languages, rem_language) - if(.) - LAZYREMOVE(languages, rem_language) + if(only_listening) + . = LAZYIN(languages_listening, rem_language) + if(.) + LAZYREMOVE(languages_listening, rem_language) + else + . = LAZYIN(languages, rem_language) + if(.) + LAZYREMOVE(languages, rem_language) /mob/living/remove_language(language_name) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index a76ad7796fa..9e546de4787 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -91,6 +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 /// 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. From b2756316a45532d1ccbd6ed612e919af78b774dd Mon Sep 17 00:00:00 2001 From: kefirka41 Date: Fri, 15 Nov 2024 20:12:12 +0600 Subject: [PATCH 02/11] =?UTF-8?q?=D0=B3=D0=BE=D0=B2=D0=BD=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/game/dna/genes/disabilities.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index 89ba1835319..5812acd7c27 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -399,13 +399,18 @@ block = GLOB.aphasiablock /datum/dna/gene/disability/aphasia/activate(mob/living/carbon/human/H, flags) + if(isplasmaman(H) || iswryn(H)) + to_chat(H, span_warning("Вы чувствуете, что что-то не так, но не можете понять, что именно.")) + return . = ..() if(H.remove_language("Galactic Common")) H.add_language("Galactic Common", TRUE) - H.set_default_language(GLOB.all_languages[H.dna.species.language]) + H.set_default_language(GLOB.all_languages[H.dna.species.language]) + H.dna.species.default_language = H.dna.species.default_language /datum/dna/gene/disability/aphasia/deactivate(mob/living/H, flags) . = ..() if(H.remove_language("Galactic Common", TRUE)) H.add_language("Galactic Common") + H.dna.species.default_language = LANGUAGE_GALACTIC_COMMON From dc19c5374435efb97bfe4aac28fd21ca9df43174 Mon Sep 17 00:00:00 2001 From: kefirka41 Date: Fri, 15 Nov 2024 20:36:43 +0600 Subject: [PATCH 03/11] =?UTF-8?q?=D0=B7=D0=B0=D0=B1=D1=8B=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/game/dna/genes/disabilities.dm | 4 ++-- code/modules/mob/living/carbon/human/human_say.dm | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index 5812acd7c27..255e5691eb2 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -405,8 +405,8 @@ . = ..() if(H.remove_language("Galactic Common")) H.add_language("Galactic Common", TRUE) - H.set_default_language(GLOB.all_languages[H.dna.species.language]) - H.dna.species.default_language = H.dna.species.default_language + H.set_default_language(GLOB.all_languages[H.dna.species.language]) + H.dna.species.default_language = H.dna.species.language /datum/dna/gene/disability/aphasia/deactivate(mob/living/H, flags) diff --git a/code/modules/mob/living/carbon/human/human_say.dm b/code/modules/mob/living/carbon/human/human_say.dm index b9a48672e86..49b7cde64c0 100644 --- a/code/modules/mob/living/carbon/human/human_say.dm +++ b/code/modules/mob/living/carbon/human/human_say.dm @@ -13,6 +13,9 @@ if(dna?.species?.can_understand(other)) return TRUE + if(speaking in languages_listening) + return TRUE + //These only pertain to common. Languages are handled by mob/say_understands() if(!speaking) if(isnymph(other) && LAZYLEN(other.languages) >= 2) //They've sucked down some blood and can speak common now. From 7f6d64ca4eb94c65c4ee18100ee04a89de91f21d Mon Sep 17 00:00:00 2001 From: kefirka41 Date: Fri, 15 Nov 2024 20:41:00 +0600 Subject: [PATCH 04/11] =?UTF-8?q?=D0=BF=D0=BE=D1=85=D1=83=D0=B9=20=D0=BD?= =?UTF-8?q?=D0=B5=20=D0=BD=D0=B0=D0=B4=D0=BE=20=D1=83=D0=B6=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/game/dna/genes/disabilities.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index 255e5691eb2..2a5e2924625 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -405,7 +405,6 @@ . = ..() if(H.remove_language("Galactic Common")) H.add_language("Galactic Common", TRUE) - H.set_default_language(GLOB.all_languages[H.dna.species.language]) H.dna.species.default_language = H.dna.species.language From dfba5c07e18b2b2842e4cf075af8122f720211ac Mon Sep 17 00:00:00 2001 From: kefirka41 Date: Fri, 15 Nov 2024 20:55:24 +0600 Subject: [PATCH 05/11] =?UTF-8?q?=D0=B1=D0=BB=D1=8F=D1=82=D1=8C...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/game/dna/genes/disabilities.dm | 6 +++--- code/modules/client/preference/preferences.dm | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index 2a5e2924625..9e6df1362c5 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -266,7 +266,7 @@ /datum/dna/gene/disability/wingdings name = "Alien Voice" desc = "Искажает голос субъекта, превращая его в непонятную речь." - activation_message = list(span_wingdings("Ваши голосовые связки кажутся инородными.")) + activation_message = list(span_wingdings("Vashi golosovyye svyazki kazhutsya chuzhimi.")) deactivation_message = list("Ваши голосовые связки больше не кажутся инородными.") instability = -GENE_INSTABILITY_MINOR traits_to_add = list(TRAIT_WINGDINGS) @@ -303,7 +303,7 @@ /datum/dna/gene/disability/weak name = "Weak" desc = "Делает мышцы субъекта более слабыми." - activation_message = list("Вы чуствуете внезапную слабость в мышцах.") + activation_message = list("Вы чувствуете внезапную слабость в мышцах.") deactivation_message = list("Вы снова ощущаете силу в мышцах.") instability = -GENE_INSTABILITY_MODERATE traits_to_add = list(TRAIT_GENE_WEAK) @@ -378,7 +378,7 @@ /datum/dna/gene/disability/paraplegia name = "Paraplegia" desc = "Парализует мышцы ног." - activation_message = list("Вы не чуствуете своих ног.") + activation_message = list("Вы не чувствуете своих ног.") deactivation_message = list("Вы возвращаете контроль над ногами.") instability = -GENE_INSTABILITY_MAJOR traits_to_add = list(TRAIT_FLOORED) diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 6033e84cb2b..2c77c6cadd7 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -1763,7 +1763,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts b_type = new_b_type if("hair") - if(species in list(SPECIES_HUMAN, SPECIES_UNATHI, SPECIES_TAJARAN, SPECIES_SKRELL, SPECIES_MACNINEPERSON, SPECIES_VULPKANIN, SPECIES_VOX)) //Species that have hair. (No HAS_HAIR flag) + if(species in list(SPECIES_HUMAN, SPECIES_UNATHI, SPECIES_TAJARAN, SPECIES_SKRELL, SPECIES_MACNINEPERSON, SPECIES_VULPKANIN, SPECIES_VOX, SPECIES_WRYN)) //Species that have hair. (No HAS_HAIR flag) var/input = "Choose your character's hair colour:" var/new_hair = input(user, input, "Character Preference", h_colour) as color|null if(new_hair) @@ -2947,7 +2947,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts character.force_gene_block(GLOB.swedeblock, TRUE, TRUE) if((disabilities & DISABILITY_FLAG_AULD_IMPERIAL) && !(new_species.blacklisted_disabilities & DISABILITY_FLAG_AULD_IMPERIAL)) - character.force_gene_block(GLOB.auld_imperial_block, TRUE, TRUE) + character.force_gene_block(GLOB.auld_imяperial_block, TRUE, TRUE) if((disabilities & DISABILITY_FLAG_LISP) && !(new_species.blacklisted_disabilities & DISABILITY_FLAG_LISP)) character.force_gene_block(GLOB.lispblock, TRUE, TRUE) From 70c22b6a5fe077f179d5782e6e5946b9ec1be576 Mon Sep 17 00:00:00 2001 From: kefirka41 Date: Fri, 15 Nov 2024 20:57:08 +0600 Subject: [PATCH 06/11] =?UTF-8?q?=D1=8D=D1=82=D0=BE=20=D0=BA=D0=B0=D0=BA?= =?UTF-8?q?=20=D0=B2=D0=BE=D0=BE=D0=B1=D1=89=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/modules/client/preference/preferences.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 2c77c6cadd7..a2342f40c0c 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -2947,7 +2947,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts character.force_gene_block(GLOB.swedeblock, TRUE, TRUE) if((disabilities & DISABILITY_FLAG_AULD_IMPERIAL) && !(new_species.blacklisted_disabilities & DISABILITY_FLAG_AULD_IMPERIAL)) - character.force_gene_block(GLOB.auld_imяperial_block, TRUE, TRUE) + character.force_gene_block(GLOB.auld_imeperial_block, TRUE, TRUE) if((disabilities & DISABILITY_FLAG_LISP) && !(new_species.blacklisted_disabilities & DISABILITY_FLAG_LISP)) character.force_gene_block(GLOB.lispblock, TRUE, TRUE) From dde4acdd6bcf4eb9a695992bf09340dd8b461ebc Mon Sep 17 00:00:00 2001 From: kefirka41 Date: Fri, 15 Nov 2024 20:59:26 +0600 Subject: [PATCH 07/11] 2 --- code/modules/client/preference/preferences.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index a2342f40c0c..65784135c5a 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -2947,7 +2947,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts character.force_gene_block(GLOB.swedeblock, TRUE, TRUE) if((disabilities & DISABILITY_FLAG_AULD_IMPERIAL) && !(new_species.blacklisted_disabilities & DISABILITY_FLAG_AULD_IMPERIAL)) - character.force_gene_block(GLOB.auld_imeperial_block, TRUE, TRUE) + character.force_gene_block(GLOB.auld_imperial_block, TRUE, TRUE) if((disabilities & DISABILITY_FLAG_LISP) && !(new_species.blacklisted_disabilities & DISABILITY_FLAG_LISP)) character.force_gene_block(GLOB.lispblock, TRUE, TRUE) From d7f4f1a980b9571cd498b79b3dd9343f6bcf81ef Mon Sep 17 00:00:00 2001 From: kefirka41 Date: Sat, 16 Nov 2024 18:40:44 +0600 Subject: [PATCH 08/11] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/game/dna/genes/disabilities.dm | 21 +++++++++++-------- code/modules/mob/language.dm | 8 +++---- .../mob/living/carbon/human/human_say.dm | 2 +- code/modules/mob/mob_defines.dm | 2 +- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index 9e6df1362c5..d7c488b4a3f 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -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) diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index 7c8652f920e..4ee07c0ddda 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -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(.) @@ -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(.) diff --git a/code/modules/mob/living/carbon/human/human_say.dm b/code/modules/mob/living/carbon/human/human_say.dm index 49b7cde64c0..557151c57f4 100644 --- a/code/modules/mob/living/carbon/human/human_say.dm +++ b/code/modules/mob/living/carbon/human/human_say.dm @@ -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() diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 9e546de4787..916d5352489 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -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. From eef7e0aa2accfc866ccda326b5ebed58942c4ca4 Mon Sep 17 00:00:00 2001 From: kefirka41 Date: Sat, 16 Nov 2024 19:27:02 +0600 Subject: [PATCH 09/11] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20x2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/game/dna/genes/disabilities.dm | 3 ++- code/modules/mob/mob_defines.dm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index d7c488b4a3f..48f057bdabc 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -408,7 +408,8 @@ . = ..() if(H.remove_language(LANGUAGE_GALACTIC_COMMON)) H.add_language(LANGUAGE_GALACTIC_COMMON, TRUE) - H.dna.species.default_language = H.dna.species.language + if(H.dna.species.default_language == LANGUAGE_GALACTIC_COMMON) + H.dna.species.default_language = H.dna.species.language /datum/dna/gene/disability/aphasia/deactivate(mob/living/carbon/human/H, flags) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 916d5352489..f66272c5b47 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -91,7 +91,8 @@ var/exploit_record = "" /// For speaking/listening. var/list/datum/language/languages - 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 understanding the language without ability to speak. Still can speak if lang is in /languages list + var/list/datum/language/languages_only_listen /// 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. From 36272ccbce047fc99da3fb160841522f76db1d51 Mon Sep 17 00:00:00 2001 From: Antoonij <42318445+Antoonij@users.noreply.github.com> Date: Sat, 16 Nov 2024 16:35:49 +0100 Subject: [PATCH 10/11] dorabotochka --- code/game/dna/genes/disabilities.dm | 18 +++++++++--------- code/modules/mob/language.dm | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index 48f057bdabc..825122bedc3 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -389,31 +389,31 @@ /datum/dna/gene/disability/aphasia name = "Aphasia" - desc = "Цель забывает как говорить на общегалактическом." + desc = "Цель забывает язык повседневного общения." activation_message = list("Вам становится труднее выражать свои мысли. Meh nahbleh blahmeh?") deactivation_message = list("Ваша речь возвращается в норму.") instability = -GENE_INSTABILITY_MINOR /datum/dna/gene/disability/aphasia/New() - ..() + . = ..() block = GLOB.aphasiablock /datum/dna/gene/disability/aphasia/can_activate(mob/living/carbon/human/H, flags) if(isplasmaman(H) || iswryn(H)) to_chat(H, span_warning("Вы чувствуете, что что-то не так, но не можете понять, что именно.")) return FALSE - . = ..() + + return ..() /datum/dna/gene/disability/aphasia/activate(mob/living/carbon/human/H, flags) . = ..() - if(H.remove_language(LANGUAGE_GALACTIC_COMMON)) - H.add_language(LANGUAGE_GALACTIC_COMMON, TRUE) - if(H.dna.species.default_language == LANGUAGE_GALACTIC_COMMON) - H.dna.species.default_language = H.dna.species.language + if(H.remove_language(H.dna.species.default_language)) + H.add_language(H.dna.species.default_language, TRUE) + H.dna.species.default_language = H.dna.species.language /datum/dna/gene/disability/aphasia/deactivate(mob/living/carbon/human/H, flags) . = ..() - if(H.remove_language(LANGUAGE_GALACTIC_COMMON, TRUE)) - H.add_language(LANGUAGE_GALACTIC_COMMON) + if(H.remove_language(initial(H.dna.species.default_language), TRUE)) + H.add_language(initial(H.dna.species.default_language)) H.dna.species.default_language = initial(H.dna.species.default_language) diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index 4ee07c0ddda..d0e4aecf34b 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -909,7 +909,7 @@ // Language handling. /mob/proc/add_language(language_name, var/only_listening = FALSE) if(SEND_SIGNAL(src, COMSIG_MOB_LANGUAGE_ADD, language_name) & DISEASE_MOB_LANGUAGE_PROCESSED) - return TRUE + return FALSE var/datum/language/new_language = GLOB.all_languages[language_name] if(new_language in languages) @@ -932,7 +932,7 @@ /mob/proc/remove_language(language_name, var/only_listening = FALSE) if(SEND_SIGNAL(src, COMSIG_MOB_LANGUAGE_REMOVE, language_name) & DISEASE_MOB_LANGUAGE_PROCESSED) - return TRUE + return FALSE var/datum/language/rem_language = GLOB.all_languages[language_name] if(!istype(rem_language)) From 56b8fa18bb9b9f0c56e17f509b55630f82aed5ca Mon Sep 17 00:00:00 2001 From: Antoonij <42318445+Antoonij@users.noreply.github.com> Date: Sat, 16 Nov 2024 16:57:25 +0100 Subject: [PATCH 11/11] =?UTF-8?q?dorabotochka=20=E2=84=962?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/game/dna/genes/disabilities.dm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index 825122bedc3..3aeafaef56e 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -389,10 +389,12 @@ /datum/dna/gene/disability/aphasia name = "Aphasia" - desc = "Цель забывает язык повседневного общения." + desc = "Цель теряет возможность говорить на своем основном языке." activation_message = list("Вам становится труднее выражать свои мысли. Meh nahbleh blahmeh?") deactivation_message = list("Ваша речь возвращается в норму.") instability = -GENE_INSTABILITY_MINOR + /// Default language can be changed, so don't use initial(), use this. + var/cached_default_language /datum/dna/gene/disability/aphasia/New() . = ..() @@ -407,13 +409,14 @@ /datum/dna/gene/disability/aphasia/activate(mob/living/carbon/human/H, flags) . = ..() - if(H.remove_language(H.dna.species.default_language)) - H.add_language(H.dna.species.default_language, TRUE) + cached_default_language = H.dna.species.default_language + if(H.remove_language(cached_default_language)) + H.add_language(cached_default_language, TRUE) H.dna.species.default_language = H.dna.species.language /datum/dna/gene/disability/aphasia/deactivate(mob/living/carbon/human/H, flags) . = ..() - if(H.remove_language(initial(H.dna.species.default_language), TRUE)) - H.add_language(initial(H.dna.species.default_language)) - H.dna.species.default_language = initial(H.dna.species.default_language) + if(H.remove_language(cached_default_language, TRUE)) + H.add_language(cached_default_language) + H.dna.species.default_language = cached_default_language