From 8eecd9cc2db16f584471571432c9f0b3a8c292d1 Mon Sep 17 00:00:00 2001 From: Tayrtahn Date: Mon, 22 Apr 2024 18:46:22 -0400 Subject: [PATCH] Prevent ghosts from triggering examine artifact triggers (#27249) --- .../Triggers/Systems/ArtifactExamineTriggerSystem.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactExamineTriggerSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactExamineTriggerSystem.cs index cbade1682e..b7afbcfc8b 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactExamineTriggerSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactExamineTriggerSystem.cs @@ -1,5 +1,6 @@ using Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components; using Content.Shared.Examine; +using Content.Shared.Ghost; namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Systems; @@ -15,6 +16,10 @@ public sealed class ArtifactExamineTriggerSystem : EntitySystem private void OnExamine(EntityUid uid, ArtifactExamineTriggerComponent component, ExaminedEvent args) { + // Prevent ghosts from activating this trigger unless they have CanGhostInteract + if (TryComp(args.Examiner, out var ghost) && !ghost.CanGhostInteract) + return; + _artifact.TryActivateArtifact(uid); } } -- 2.52.0