mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Co-authored-by: MeepleMuncher <76881946+MeepleMuncher@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com>
37 lines
975 B
Plaintext
37 lines
975 B
Plaintext
/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
|
|
. = ..()
|