mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
[MIRROR] Better Tourette's (#11583)
Co-authored-by: MeepleMuncher <76881946+MeepleMuncher@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
0fee82d7f9
commit
2e63a86d17
36
code/datums/components/disabilities/coprolalia.dm
Normal file
36
code/datums/components/disabilities/coprolalia.dm
Normal file
@@ -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
|
||||
. = ..()
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user