From dd9a1de77ffc68e26d097e4671aa269d4d56e724 Mon Sep 17 00:00:00 2001 From: TheGrimbeeper Date: Fri, 24 Oct 2025 20:10:19 +1100 Subject: [PATCH] Fix radiation damage being misattributed to radiation receiver (caused artifacts to not be triggered by ambient rads) (#41065) * Xenoartifact: Fixed ambient radiation damage not triggering Fixed ambient radiation damage not triggering artifact. * Revert "Xenoartifact: Fixed ambient radiation damage not triggering" This reverts commit 30e5c7cdb49c15574b49ddd1a1f7b1768abd2614. * Fix radiation damage misattribution --- Content.Server/Radiation/Systems/RadiationSystem.cs | 4 ++-- Content.Shared/Radiation/Events/OnIrradiatedEvent.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Server/Radiation/Systems/RadiationSystem.cs b/Content.Server/Radiation/Systems/RadiationSystem.cs index 34dbec6f86..4a4d0f8930 100644 --- a/Content.Server/Radiation/Systems/RadiationSystem.cs +++ b/Content.Server/Radiation/Systems/RadiationSystem.cs @@ -49,9 +49,9 @@ public sealed partial class RadiationSystem : EntitySystem _accumulator = 0f; } - public void IrradiateEntity(EntityUid uid, float radsPerSecond, float time) + public void IrradiateEntity(EntityUid uid, float radsPerSecond, float time, EntityUid? origin = null) { - var msg = new OnIrradiatedEvent(time, radsPerSecond, uid); + var msg = new OnIrradiatedEvent(time, radsPerSecond, origin); RaiseLocalEvent(uid, msg); } diff --git a/Content.Shared/Radiation/Events/OnIrradiatedEvent.cs b/Content.Shared/Radiation/Events/OnIrradiatedEvent.cs index ec9988fffb..fdf7b21cd0 100644 --- a/Content.Shared/Radiation/Events/OnIrradiatedEvent.cs +++ b/Content.Shared/Radiation/Events/OnIrradiatedEvent.cs @@ -4,13 +4,13 @@ namespace Content.Shared.Radiation.Events; /// Raised on entity when it was irradiated /// by some radiation source. /// -public readonly record struct OnIrradiatedEvent(float FrameTime, float RadsPerSecond, EntityUid Origin) +public readonly record struct OnIrradiatedEvent(float FrameTime, float RadsPerSecond, EntityUid? Origin) { public readonly float FrameTime = FrameTime; public readonly float RadsPerSecond = RadsPerSecond; - public readonly EntityUid Origin = Origin; + public readonly EntityUid? Origin = Origin; public float TotalRads => RadsPerSecond * FrameTime; }