mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-19 13:20:47 +01:00
8b8b981515
* new allergies * Mushroom allergy actually works * handle allergens * rework into element * improved pollen * shroom tweaks * Moved say to non blocking * cleanup * pollen chance tweak * small fixes --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
31 lines
748 B
Plaintext
31 lines
748 B
Plaintext
/datum/component/nervousness_disability
|
|
var/mob/owner
|
|
|
|
/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()
|
|
SIGNAL_HANDLER
|
|
|
|
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.get_jittery() < 50)
|
|
owner.make_jittery(65)
|
|
|
|
/datum/component/nervousness_disability/Destroy(force = FALSE)
|
|
UnregisterSignal(owner, COMSIG_HANDLE_DISABILITIES)
|
|
owner = null
|
|
. = ..()
|