Files
VOREStation/code/datums/components/disabilities/gibbing.dm
T
Will 8b8b981515 Allergic Reaction Element (And direct_say proc) (#18131)
* 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>
2025-08-08 11:59:26 -04:00

43 lines
1.1 KiB
Plaintext

/datum/component/gibbing_disability
var/mob/living/owner
var/gutdeathpressure = 0
var/death_time = FALSE
dupe_mode = COMPONENT_DUPE_UNIQUE
/datum/component/gibbing_disability/Initialize()
if (!isliving(parent))
return COMPONENT_INCOMPATIBLE
owner = parent
RegisterSignal(owner, COMSIG_HANDLE_DISABILITIES, PROC_REF(process_component))
/datum/component/gibbing_disability/proc/process_component()
SIGNAL_HANDLER
if(QDELETED(parent))
return
if(isbelly(owner.loc))
return
if(owner.transforming)
return
if(death_time)
if(death_time < 4)
owner.emote(pick("whimper","belch","shiver"))
death_time++
return
else
owner.emote(pick("belch"))
owner.gib()
return
gutdeathpressure += 0.01
if(gutdeathpressure > 0 && prob(gutdeathpressure))
owner.emote(pick("whimper","belch","belch","belch","choke","shiver"))
owner.Weaken(gutdeathpressure / 3)
if((gutdeathpressure/3) >= 1 && prob(gutdeathpressure/3))
death_time = TRUE
/datum/component/gibbing_disability/Destroy(force = FALSE)
UnregisterSignal(owner, COMSIG_HANDLE_DISABILITIES)
owner = null
. = ..()