Prevent ghosts from triggering examine artifact triggers (#27249)
This commit is contained in:
@@ -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<GhostComponent>(args.Examiner, out var ghost) && !ghost.CanGhostInteract)
|
||||
return;
|
||||
|
||||
_artifact.TryActivateArtifact(uid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user