From 61cad3c30443ef07a74de802715c370318bfc2f6 Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Thu, 19 Dec 2024 03:43:18 +0000 Subject: [PATCH] make glimmer events trigger psionic artifacts (#2440) * make glimmer events trigger psionic artifacts * :trollface: --------- Co-authored-by: deltanedas <@deltanedas:kde.org> --- .../Systems/ArtifactMetapsionicTriggerSystem.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Content.Server/DeltaV/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactMetapsionicTriggerSystem.cs b/Content.Server/DeltaV/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactMetapsionicTriggerSystem.cs index 8d9a216d658..37143aacd1e 100644 --- a/Content.Server/DeltaV/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactMetapsionicTriggerSystem.cs +++ b/Content.Server/DeltaV/Xenoarchaeology/XenoArtifacts/Triggers/Systems/ArtifactMetapsionicTriggerSystem.cs @@ -1,5 +1,6 @@ using Content.Server.DeltaV.Xenoarchaeology.XenoArtifacts.Triggers.Components; -using Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Systems; +using Content.Server.Nyanotrasen.StationEvents.Events; +using Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Systems; using Content.Shared.Abilities.Psionics; namespace Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Systems; @@ -13,10 +14,21 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnPowerDetected); + + SubscribeLocalEvent(OnGlimmerEventEnded); } private void OnPowerDetected(Entity ent, ref PsionicPowerDetectedEvent args) { _artifact.TryActivateArtifact(ent); } + + private void OnGlimmerEventEnded(GlimmerEventEndedEvent args) + { + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out _)) + { + _artifact.TryActivateArtifact(uid); + } + } }