From cfa5c1afd8ea279d909aca33ecdbb0874f62f133 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 20 Oct 2023 05:45:46 +0200 Subject: [PATCH 1/3] [MIRROR] Makes supermatter charged singularity damage the eyes of viewers [MDB IGNORE] (#24451) * 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: Emmett Gaines Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com> --- code/datums/components/vision_hurting.dm | 26 +++++++++++++++++++ code/modules/power/singularity/singularity.dm | 5 ++++ .../mothership_astrum/mob.dm | 12 +++++++++ .../modules/cellguns/code/medigun_cells.dm | 17 +++++++++++- tgstation.dme | 1 + 5 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 code/datums/components/vision_hurting.dm diff --git a/code/datums/components/vision_hurting.dm b/code/datums/components/vision_hurting.dm new file mode 100644 index 00000000000..acf2d186bb4 --- /dev/null +++ b/code/datums/components/vision_hurting.dm @@ -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") diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 0a797a2d7d6..44d318d3467 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -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 diff --git a/modular_skyrat/modules/awaymissions_skyrat/mothership_astrum/mob.dm b/modular_skyrat/modules/awaymissions_skyrat/mothership_astrum/mob.dm index 6efc58b3e75..6598ab3308c 100644 --- a/modular_skyrat/modules/awaymissions_skyrat/mothership_astrum/mob.dm +++ b/modular_skyrat/modules/awaymissions_skyrat/mothership_astrum/mob.dm @@ -121,8 +121,20 @@ attack_verb_continuous = "attacks" attack_verb_simple = "attack" +<<<<<<< HEAD /mob/living/simple_animal/hostile/megafauna/hierophant/astrum/bullet_act(obj/projectile/bullet) apply_damage(bullet.damage, bullet.damage_type) // no damage reduction +======= +/mob/living/simple_animal/hostile/megafauna/hierophant/astrum/bullet_act(obj/projectile/hitting_projectile, def_zone, piercing_hit = FALSE) + . = ..() + if(. != BULLET_ACT_HIT) + return + + if(!hitting_projectile.is_hostile_projectile()) + return + + apply_damage(hitting_projectile.damage, hitting_projectile.damage_type) // no damage reduction +>>>>>>> 27d894493 ([MIRROR] Makes supermatter charged singularity damage the eyes of viewers [MDB IGNORE] (#24451)) /mob/living/simple_animal/hostile/megafauna/hierophant/astrum/death(gibbed) spawn_gibs() diff --git a/modular_skyrat/modules/cellguns/code/medigun_cells.dm b/modular_skyrat/modules/cellguns/code/medigun_cells.dm index c02118d226e..0401f9c77b5 100644 --- a/modular_skyrat/modules/cellguns/code/medigun_cells.dm +++ b/modular_skyrat/modules/cellguns/code/medigun_cells.dm @@ -367,7 +367,12 @@ /obj/projectile/energy/medical/utility/clotting name = "clotting agent shot" +<<<<<<< HEAD /obj/projectile/energy/medical/utility/clotting/on_hit(mob/living/target) +======= +/obj/projectile/energy/medical/utility/clotting/on_hit(mob/living/target, blocked = 0, pierce_hit) + . = ..() +>>>>>>> 27d894493 ([MIRROR] Makes supermatter charged singularity damage the eyes of viewers [MDB IGNORE] (#24451)) if(!IsLivingHuman(target)) return FALSE @@ -386,7 +391,12 @@ /obj/projectile/energy/medical/utility/temperature name = "temperature adjustment shot" +<<<<<<< HEAD /obj/projectile/energy/medical/utility/temperature/on_hit(mob/living/target) +======= +/obj/projectile/energy/medical/utility/temperature/on_hit(mob/living/target, blocked = 0, pierce_hit) + . = ..() +>>>>>>> 27d894493 ([MIRROR] Makes supermatter charged singularity damage the eyes of viewers [MDB IGNORE] (#24451)) if(!IsLivingHuman(target)) return FALSE @@ -408,7 +418,12 @@ /obj/projectile/energy/medical/utility/gown name = "hardlight surgical gown field" +<<<<<<< HEAD /obj/projectile/energy/medical/utility/gown/on_hit(mob/living/target) +======= +/obj/projectile/energy/medical/utility/gown/on_hit(mob/living/target, blocked = 0, pierce_hit) + . = ..() +>>>>>>> 27d894493 ([MIRROR] Makes supermatter charged singularity damage the eyes of viewers [MDB IGNORE] (#24451)) 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 @@ -438,7 +453,7 @@ /obj/projectile/energy/medical/utility/salve/on_hit(mob/living/target) 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 diff --git a/tgstation.dme b/tgstation.dme index bdb23a0f0d3..bbaff863a95 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -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" From 63049c91a51fb070f64e7ecf4f7938f058319302 Mon Sep 17 00:00:00 2001 From: Yaroslav Nurkov Date: Fri, 20 Oct 2023 13:59:47 +0300 Subject: [PATCH 2/3] doubletaps --- modular_skyrat/modules/cellguns/code/medigun_cells.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modular_skyrat/modules/cellguns/code/medigun_cells.dm b/modular_skyrat/modules/cellguns/code/medigun_cells.dm index b1ea74b8caf..c7a859dcb76 100644 --- a/modular_skyrat/modules/cellguns/code/medigun_cells.dm +++ b/modular_skyrat/modules/cellguns/code/medigun_cells.dm @@ -368,7 +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 @@ -388,7 +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 @@ -411,7 +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 From 30fc94c2b24031162a77b98ed5b044e536ae78d6 Mon Sep 17 00:00:00 2001 From: Yaroslav Nurkov Date: Fri, 20 Oct 2023 14:05:13 +0300 Subject: [PATCH 3/3] spaces != tabs --- modular_skyrat/modules/cellguns/code/medigun_cells.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_skyrat/modules/cellguns/code/medigun_cells.dm b/modular_skyrat/modules/cellguns/code/medigun_cells.dm index c7a859dcb76..f0e9f877515 100644 --- a/modular_skyrat/modules/cellguns/code/medigun_cells.dm +++ b/modular_skyrat/modules/cellguns/code/medigun_cells.dm @@ -411,7 +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