From 2e63a86d175c681fadb1cc28c181eaf600d40b47 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Sun, 7 Sep 2025 20:39:49 -0700 Subject: [PATCH] [MIRROR] Better Tourette's (#11583) Co-authored-by: MeepleMuncher <76881946+MeepleMuncher@users.noreply.github.com> Co-authored-by: Cameron Lennox --- code/__defines/dna.dm | 2 +- .../components/disabilities/coprolalia.dm | 36 ++++++++++++++ .../components/disabilities/tourettes.dm | 47 +++++++++++++++---- .../objects/items/weapons/dna_injector.dm | 2 +- .../species/station/traits/negative_genes.dm | 6 +-- .../species/station/traits/neutral_genes.dm | 13 +++++ vorestation.dme | 1 + 7 files changed, 92 insertions(+), 15 deletions(-) create mode 100644 code/datums/components/disabilities/coprolalia.dm diff --git a/code/__defines/dna.dm b/code/__defines/dna.dm index 29c924197d..e96a17b864 100644 --- a/code/__defines/dna.dm +++ b/code/__defines/dna.dm @@ -161,7 +161,7 @@ var/SMALLSIZEBLOCK = 0 // Needs to match the highest number above. #define DNA_UI_LENGTH 65 -#define DNA_SE_LENGTH 90 // Traitgenes (Expanded from 49 to 84, there have been a considerable expansion of genes. +#define DNA_SE_LENGTH 91 // Traitgenes (Expanded from 49 to 84, there have been a considerable expansion of genes. //CHOMPEdit: Upped to 91. NOTE: Ensure it's increased when there is a conflict here! Thanks! // This leaves room for future expansion. This can be arbitrarily raised without worry if genes start to get crowded. // Should have more than 10 empty genes after setup. - Willbird) diff --git a/code/datums/components/disabilities/coprolalia.dm b/code/datums/components/disabilities/coprolalia.dm new file mode 100644 index 0000000000..618cd164e4 --- /dev/null +++ b/code/datums/components/disabilities/coprolalia.dm @@ -0,0 +1,36 @@ +/datum/component/coprolalia_disability + var/mob/living/owner + +/datum/component/coprolalia_disability/Initialize() + if (!ishuman(parent)) + return COMPONENT_INCOMPATIBLE + + owner = parent + RegisterSignal(owner, COMSIG_HANDLE_DISABILITIES, PROC_REF(process_component)) + +/datum/component/coprolalia_disability/proc/process_component() + SIGNAL_HANDLER + + if(QDELETED(parent)) + return + if(isbelly(owner.loc)) + return + if(owner.stat != CONSCIOUS) + return + if(owner.transforming) + return + if(owner.client && (owner.client.prefs.muted & MUTE_IC)) + return + if((prob(1) && prob(2) && owner.paralysis <= 1)) + owner.Stun(10) + owner.make_jittery(100) + switch(rand(1, 3)) + if(1) + owner.emote("twitch") + if(2 to 3) + owner.direct_say("[prob(50) ? ";" : ""][pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")]") + +/datum/component/coprolalia_disability/Destroy(force = FALSE) + UnregisterSignal(owner, COMSIG_HANDLE_DISABILITIES) + owner = null + . = ..() diff --git a/code/datums/components/disabilities/tourettes.dm b/code/datums/components/disabilities/tourettes.dm index f64e16403c..82ba274848 100644 --- a/code/datums/components/disabilities/tourettes.dm +++ b/code/datums/components/disabilities/tourettes.dm @@ -1,17 +1,50 @@ /datum/component/tourettes_disability var/mob/living/owner - var/gutdeathpressure = 0 + var/list/motor_tics = list() /datum/component/tourettes_disability/Initialize() if (!ishuman(parent)) return COMPONENT_INCOMPATIBLE owner = parent + var/list/possible_tics = list( + "nod", + "shake", + "shiver", + "twitch", + "salute", + "blink", + "blink_r", + "wink", + "shrug", + "eyebrow", + "afold", + "hshrug", + "ftap", + "sniff", + "cough", + "snap", + "whistle", + "qwhistle", + "wwhistle", + "swhistle", + "awoo", + "prbt", + "snort", + "merp", + "nya", + "crack", + "rshoulder" + ) + for(var/i = 0, i < rand(4, 6), i++) + motor_tics += pick(possible_tics) RegisterSignal(owner, COMSIG_HANDLE_DISABILITIES, PROC_REF(process_component)) /datum/component/tourettes_disability/proc/process_component() SIGNAL_HANDLER + var/mob/living/carbon/human/H = owner + if(QDELETED(parent)) return if(isbelly(owner.loc)) @@ -22,15 +55,9 @@ return if(owner.client && (owner.client.prefs.muted & MUTE_IC)) return - if((prob(1) && prob(2) && owner.paralysis <= 1)) - owner.Stun(10) - owner.make_jittery(100) - switch(rand(1, 3)) - if(1) - owner.emote("twitch") - if(2 to 3) - owner.direct_say("[prob(50) ? ";" : ""][pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")]") - + if(owner.paralysis <= 1 && (H.pulse == PULSE_NORM ? (prob(1)) : (prob(50)))) + owner.make_jittery(30 + rand(10, 30)) + owner.emote(pick(motor_tics)) /datum/component/tourettes_disability/Destroy(force = FALSE) UnregisterSignal(owner, COMSIG_HANDLE_DISABILITIES) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index c9570ef986..70d6a1eaa0 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -247,7 +247,7 @@ disabling = TRUE //VOREStation Note: TRAITGENETICS - tourettes Disabled on VS //CHOMPStation Edit - Enable /obj/item/dnainjector/set_trait/tourettes // tour - trait_path = /datum/trait/negative/disability_tourettes + trait_path = /datum/trait/neutral/disability_tourettes /obj/item/dnainjector/set_trait/tourettes/disable disabling = TRUE //VOREStation Note: TRAITGENETICS - tourettes Disabled on VS //CHOMPStation Edit - Enable diff --git a/code/modules/mob/living/carbon/human/species/station/traits/negative_genes.dm b/code/modules/mob/living/carbon/human/species/station/traits/negative_genes.dm index 8f1aa5025f..33f5458989 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits/negative_genes.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits/negative_genes.dm @@ -53,8 +53,8 @@ activation_message="You feel lightheaded." primitive_expression_messages=list("trips.") -/datum/trait/negative/disability_tourettes - name = "Tourettes Syndrome" +/datum/trait/negative/disability_coprolalia + name = "Coprolalia" desc = "You have periodic motor seizures, and cannot stop yourself from yelling profanity." cost = -2 custom_only = FALSE @@ -64,7 +64,7 @@ activation_message="You twitch." primitive_expression_messages=list("twitches and chitters.") - added_component_path = /datum/component/tourettes_disability + added_component_path = /datum/component/coprolalia_disability /* Replaced by /datum/trait/negative/blindness /datum/trait/negative/disability_blind diff --git a/code/modules/mob/living/carbon/human/species/station/traits/neutral_genes.dm b/code/modules/mob/living/carbon/human/species/station/traits/neutral_genes.dm index d7aa0a7cc6..15d92ee55f 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits/neutral_genes.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits/neutral_genes.dm @@ -26,3 +26,16 @@ activation_message="You feel nervous." primitive_expression_messages=list("nervously chitters.") added_component_path = /datum/component/nervousness_disability + +/datum/trait/neutral/disability_tourettes + name = "Tourettes Syndrome" + desc = "You suffer from occasional motor and vocal tics, which are exacerbated during times of stress." + cost = 0 // Originally was -2 + custom_only = FALSE + + is_genetrait = TRUE //CHOMPEdit - Enable tourettes + hidden = FALSE //CHOMPEdit - Enable tourettes + + activation_message="You twitch." + primitive_expression_messages=list("twitches and chitters.") + added_component_path = /datum/component/tourettes_disability diff --git a/vorestation.dme b/vorestation.dme index 59ad22b34e..38c4b885dc 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -638,6 +638,7 @@ #include "code\datums\components\crafting\recipes\primitive.dm" #include "code\datums\components\crafting\recipes\survival.dm" #include "code\datums\components\crafting\recipes\weapons.dm" +#include "code\datums\components\disabilities\coprolalia.dm" #include "code\datums\components\disabilities\coughing.dm" #include "code\datums\components\disabilities\epilepsy.dm" #include "code\datums\components\disabilities\gibbing.dm"