From fa39318e347a5b5a847e27e80133fe23dad23246 Mon Sep 17 00:00:00 2001 From: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Date: Wed, 9 Apr 2025 23:35:41 -0500 Subject: [PATCH] Fix divine smites (#90511) ## About The Pull Request Fixes #90510 I added the overlay when only smites that destroyed the body had the divine smite flag, then I added the flag to a bunch more things. Oops ## Changelog :cl: Melbert fix: Fix divine smites making you glow forever /:cl: --- code/datums/status_effects/neutral.dm | 13 +++++++++++-- code/modules/admin/smites/_smite.dm | 7 +++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm index dd80a09e43f..fb83ade3aa3 100644 --- a/code/datums/status_effects/neutral.dm +++ b/code/datums/status_effects/neutral.dm @@ -742,10 +742,14 @@ var/obj/effect/overlay/spotlight/beam_from_above_a /// Second visual overlay, this one sits on the front of the mob. var/obj/effect/overlay/spotlight/beam_from_above_b + /// An additional overlay to supply with the spotlight + var/image/additional_overlay -/datum/status_effect/spotlight_light/on_creation(mob/living/new_owner, duration) +/datum/status_effect/spotlight_light/on_creation(mob/living/new_owner, duration, additional_overlay) if(duration) src.duration = duration + if(additional_overlay) + src.additional_overlay = additional_overlay return ..() /datum/status_effect/spotlight_light/on_apply() @@ -764,6 +768,9 @@ beam_from_above_b.pixel_y = -2 //Slight vertical offset for an illusion of volume owner.vis_contents += beam_from_above_b + if(additional_overlay) + owner.add_overlay(additional_overlay) + return TRUE /datum/status_effect/spotlight_light/on_remove() @@ -773,8 +780,10 @@ QDEL_NULL(beam_from_above_b) QDEL_NULL(mob_light_obj) + if(additional_overlay) + owner.cut_overlay(additional_overlay) + /datum/status_effect/spotlight_light/divine id = "divine_spotlight" - duration = 3 SECONDS #undef BEAM_ALPHA diff --git a/code/modules/admin/smites/_smite.dm b/code/modules/admin/smites/_smite.dm index ca66bedf2d5..f0885cca96b 100644 --- a/code/modules/admin/smites/_smite.dm +++ b/code/modules/admin/smites/_smite.dm @@ -16,8 +16,11 @@ /datum/smite/proc/do_effect(client/user, mob/living/target) if(smite_flags & SMITE_DIVINE) playsound(target, 'sound/effects/pray.ogg', 50, FALSE, -1) - target.add_overlay(mutable_appearance('icons/mob/effects/genetics.dmi', "servitude", -MUTATIONS_LAYER)) - target.apply_status_effect(/datum/status_effect/spotlight_light/divine) + target.apply_status_effect( + /datum/status_effect/spotlight_light/divine, + 3 SECONDS, + mutable_appearance('icons/mob/effects/genetics.dmi', "servitude", -MUTATIONS_LAYER), + ) if(smite_flags & SMITE_STUN) target.Stun(3 SECONDS, ignore_canstun = TRUE)