Component Traits. (#17665)

* Drippy component

* Converts disabilities to components.

* Makes weaver a component

* living

* Update vorestation.dme

* Update weaver.dm

* yeah tis

* no spawn

* yes

* signals hell yeah

* Teaching

* yeaaah

* makes gargoyle follow the law

* whoops

* return properly

* wah

* Update station.dm
This commit is contained in:
Cameron Lennox
2025-05-15 00:59:47 -07:00
committed by GitHub
parent adbc9063fb
commit 5d95b50db9
27 changed files with 646 additions and 342 deletions
@@ -0,0 +1,28 @@
/datum/component/coughing_disability
var/mob/living/owner
var/cough_chance = 5
/datum/component/coughing_disability/Initialize()
if (!isliving(parent))
return COMPONENT_INCOMPATIBLE
owner = parent
RegisterSignal(owner, COMSIG_HANDLE_DISABILITIES, PROC_REF(process_component))
/datum/component/coughing_disability/proc/process_component()
if (QDELETED(parent))
return
if(isbelly(owner.loc))
return
if(owner.stat != CONSCIOUS)
return
if(owner.transforming)
return
if((prob(cough_chance) && owner.paralysis <= 1))
owner.drop_item()
owner.emote("cough")
/datum/component/coughing_disability/Destroy(force = FALSE)
UnregisterSignal(owner, COMSIG_HANDLE_DISABILITIES)
owner = null
. = ..()
@@ -0,0 +1,32 @@
/datum/component/epilepsy_disability
var/mob/living/owner
/datum/component/epilepsy_disability/Initialize()
if (!isliving(parent))
return COMPONENT_INCOMPATIBLE
owner = parent
RegisterSignal(owner, COMSIG_HANDLE_DISABILITIES, PROC_REF(process_component))
/datum/component/epilepsy_disability/proc/process_component()
if (QDELETED(parent))
return
if(isbelly(owner.loc))
return
if(owner.stat != CONSCIOUS)
return
if(owner.transforming)
return
if((prob(1) && prob(1) && owner.paralysis < 1))
to_chat(owner, span_red("You have a seizure!"))
for(var/mob/O in viewers(owner, null))
if(O == owner)
continue
O.show_message(span_danger("[owner] starts having a seizure!"), 1)
owner.Paralyse(10)
owner.make_jittery(1000)
/datum/component/epilepsy_disability/Destroy(force = FALSE)
UnregisterSignal(owner, COMSIG_HANDLE_DISABILITIES)
owner = null
. = ..()
@@ -0,0 +1,40 @@
/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()
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
. = ..()
@@ -0,0 +1,29 @@
/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
. = ..()
@@ -0,0 +1,41 @@
/datum/component/rotting_disability
var/mob/living/carbon/human/owner
/datum/component/rotting_disability/Initialize()
if (!ishuman(parent))
return COMPONENT_INCOMPATIBLE
owner = parent
RegisterSignal(owner, COMSIG_HANDLE_DISABILITIES, PROC_REF(process_component))
/datum/component/rotting_disability/proc/process_component()
if (QDELETED(parent))
return
if(isbelly(owner.loc))
return
if(owner.transforming)
return
if(prob(2) && prob(3)) // stacked percents for rarity
// random strange symptoms from organ/limb
owner.automatic_custom_emote(VISIBLE_MESSAGE, "flinches slightly.", check_stat = TRUE)
switch(rand(1,4))
if(1)
owner.adjustToxLoss(rand(2,8))
if(2)
owner.adjustCloneLoss(rand(1,2))
if(3)
owner.add_chemical_effect(CE_PAINKILLER, rand(8,28))
else
owner.adjustOxyLoss(rand(13,26))
// external organs need to fall off if damaged enough
var/obj/item/organ/O = pick(owner.organs)
if(O && !(O.organ_tag == BP_GROIN || O.organ_tag == BP_TORSO) && istype(O,/obj/item/organ/external))
var/obj/item/organ/external/E = O
if(O.damage >= O.min_broken_damage && O.robotic <= ORGAN_ASSISTED && prob(70))
owner.add_chemical_effect(CE_PAINKILLER, 120) // what limb? Extreme nerve damage. Can't feel a thing + shock
E.droplimb(TRUE, DROPLIMB_ACID)
/datum/component/rotting_disability/Destroy(force = FALSE)
UnregisterSignal(owner, COMSIG_HANDLE_DISABILITIES)
owner = null
. = ..()
@@ -0,0 +1,34 @@
/datum/component/tourettes_disability
var/mob/living/owner
var/gutdeathpressure = 0
/datum/component/tourettes_disability/Initialize()
if (!ishuman(parent))
return COMPONENT_INCOMPATIBLE
owner = parent
RegisterSignal(owner, COMSIG_HANDLE_DISABILITIES, PROC_REF(process_component))
/datum/component/tourettes_disability/proc/process_component()
if(QDELETED(parent))
return
if(isbelly(owner.loc))
return
if(owner.stat != CONSCIOUS)
return
if(owner.transforming)
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.say("[prob(50) ? ";" : ""][pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")]")
/datum/component/tourettes_disability/Destroy(force = FALSE)
UnregisterSignal(owner, COMSIG_HANDLE_DISABILITIES)
owner = null
. = ..()