Skip to content

Commit

Permalink
[MIRROR] Makes supermatter charged singularity damage the eyes of vie…
Browse files Browse the repository at this point in the history
…wers [MDB IGNORE] (#24451) (#171)

* Makes supermatter charged singularity damage the eyes of viewers (#79044)

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!!

:cl: ninjanomnom
balance: It damages your eyes to look at the supermatter singularity
/:cl:

* Makes supermatter charged singularity damage the eyes of viewers

* Modular compiler errors

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: Emmett Gaines <[email protected]>
Co-authored-by: Giz <[email protected]>
Co-authored-by: Yaroslav Nurkov <[email protected]>
  • Loading branch information
5 people authored Oct 20, 2023
1 parent 9945c8a commit f64cf6c
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 1 deletion.
26 changes: 26 additions & 0 deletions code/datums/components/vision_hurting.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/// 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")
5 changes: 5 additions & 0 deletions code/modules/power/singularity/singularity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@
new_consume_range = 5
dissipate = FALSE

if(temp_allowed_size == STAGE_SIX)
AddComponent(/datum/component/vision_hurting)
else
qdel(GetComponent(/datum/component/vision_hurting))

var/datum/component/singularity/resolved_singularity = singularity_component.resolve()
if (!isnull(resolved_singularity))
resolved_singularity.consume_range = new_consume_range
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
attack_verb_simple = "attack"

/mob/living/simple_animal/hostile/megafauna/hierophant/astrum/bullet_act(obj/projectile/hitting_projectile, def_zone, piercing_hit = FALSE)
. = ..()
if(. != BULLET_ACT_HIT)
return

Expand Down
5 changes: 4 additions & 1 deletion modular_skyrat/modules/cellguns/code/medigun_cells.dm
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@
name = "clotting agent shot"

/obj/projectile/energy/medical/utility/clotting/on_hit(mob/living/target, blocked = 0, pierce_hit)
. = ..()
if(!IsLivingHuman(target))
return FALSE

Expand All @@ -387,6 +388,7 @@
name = "temperature adjustment shot"

/obj/projectile/energy/medical/utility/temperature/on_hit(mob/living/target, blocked = 0, pierce_hit)
. = ..()
if(!IsLivingHuman(target))
return FALSE

Expand All @@ -409,6 +411,7 @@
name = "hardlight surgical gown field"

/obj/projectile/energy/medical/utility/gown/on_hit(mob/living/target, blocked = 0, pierce_hit)
. = ..()
if(!istype(target, /mob/living/carbon/human)) //Dead check isn't fully needed, since it'd be reasonable for this to work on corpses.
return

Expand Down Expand Up @@ -438,7 +441,7 @@
/obj/projectile/energy/medical/utility/salve/on_hit(mob/living/target, blocked = 0, pierce_hit)
if(!IsLivingHuman(target)) //No using this on the dead or synths.
return FALSE
. = ..()
return ..()

//Hardlight Rollerbed Medicell
/obj/item/ammo_casing/energy/medical/utility/bed
Expand Down
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,7 @@
#include "code\datums\components\uplink.dm"
#include "code\datums\components\usb_port.dm"
#include "code\datums\components\vacuum.dm"
#include "code\datums\components\vision_hurting.dm"
#include "code\datums\components\wall_mounted.dm"
#include "code\datums\components\wearertargeting.dm"
#include "code\datums\components\weatherannouncer.dm"
Expand Down

0 comments on commit f64cf6c

Please sign in to comment.