mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-20 22:54:46 +00:00
* Makes supermatter charged singularity damage the eyes of viewers (#79044) ## About The Pull Request Mostly made this for the component for admin abuse but let's put it on supermatter singulo as well. Screaming as your eyes fail you while your station is being consumed seems like it would be !!fun!! ## Changelog 🆑 ninjanomnom balance: It damages your eyes to look at the supermatter singularity /🆑 * Makes supermatter charged singularity damage the eyes of viewers * Modular compiler errors --------- Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com> Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
27 lines
922 B
Plaintext
27 lines
922 B
Plaintext
/// A component that damages eyes that look at the owner
|
|
/datum/component/vision_hurting
|
|
var/damage_per_second
|
|
var/message
|
|
|
|
/datum/component/vision_hurting/Initialize(damage_per_second=1, message="Your eyes burn as you look at")
|
|
if(!isatom(parent))
|
|
return COMPONENT_INCOMPATIBLE
|
|
|
|
src.damage_per_second = damage_per_second
|
|
src.message = message
|
|
|
|
START_PROCESSING(SSdcs, src)
|
|
|
|
/datum/component/vision_hurting/process(seconds_per_tick)
|
|
for(var/mob/living/carbon/viewer in viewers(parent))
|
|
if(viewer.is_blind() || viewer.get_eye_protection() >= damage_per_second)
|
|
continue
|
|
var/obj/item/organ/internal/eyes/burning_orbs = locate() in viewer.organs
|
|
if(!burning_orbs)
|
|
continue
|
|
burning_orbs.apply_organ_damage(damage_per_second * seconds_per_tick)
|
|
if(SPT_PROB(50, seconds_per_tick))
|
|
to_chat(viewer, span_userdanger("[message] [parent]!"))
|
|
if(SPT_PROB(20, seconds_per_tick))
|
|
viewer.emote("scream")
|