Files
CHOMPStation2/code/datums/components/disabilities/nervousness.dm
CHOMPStation2StaffMirrorBot b65ce59551 [MIRROR] Component Traits. (#10886)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-05-15 21:18:51 +02:00

30 lines
755 B
Plaintext

/datum/component/nervousness_disability
var/mob/owner
var/gutdeathpressure = 0
/datum/component/nervousness_disability/Initialize()
if (!ishuman(parent))
return COMPONENT_INCOMPATIBLE
owner = parent
RegisterSignal(owner, COMSIG_HANDLE_DISABILITIES, PROC_REF(process_component))
/datum/component/nervousness_disability/proc/process_component()
if(QDELETED(parent))
return
if(isbelly(owner.loc))
return
if(owner.stat != CONSCIOUS)
return
if(owner.transforming)
return
if(prob(5) && prob(7))
owner.stuttering = max(15, owner.stuttering)
if(owner.jitteriness < 50)
owner.make_jittery(65)
/datum/component/nervousness_disability/Destroy(force = FALSE)
UnregisterSignal(owner, COMSIG_HANDLE_DISABILITIES)
owner = null
. = ..()