From 8073a5600e59f7a850e8f0a972c100fbbd136a4a Mon Sep 17 00:00:00 2001 From: DEATHB4DEFEAT Date: Fri, 20 Oct 2023 16:10:05 -0700 Subject: [PATCH] fix Shadowkin visible in The Dark --- .../Systems/ShadowkinPowerSystem.DarkSwap.cs | 4 ++-- .../Systems/ShadowkinPowerSystem.DarkSwap.cs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.DarkSwap.cs b/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.DarkSwap.cs index dbfd24774d..707c6751f8 100644 --- a/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.DarkSwap.cs +++ b/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.DarkSwap.cs @@ -215,7 +215,7 @@ private void OnInvisShutdown(EntityUid uid, ShadowkinDarkSwappedComponent compon /// Makes the specified entity able to see Shadowkin invisibility. /// /// Entity to modify - /// Whether the entity can see invisibility + /// Whether the entity can see invisibility /// Should the entity be moved to another visibility layer? /// (Only gets considered if set is true) Adds stealth to the entity public void SetVisibility(EntityUid uid, bool set, bool invisibility, bool stealth) @@ -257,7 +257,7 @@ public void SetVisibility(EntityUid uid, bool set, bool invisibility, bool steal // Remove the stealth shader from the entity if (!_entity.TryGetComponent(uid, out _)) - _stealth.SetVisibility(uid, 1f, _entity.EnsureComponent(uid)); + _stealth.SetEnabled(uid, false); } } diff --git a/Content.Shared/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.DarkSwap.cs b/Content.Shared/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.DarkSwap.cs index af568c8467..df5aa5448c 100644 --- a/Content.Shared/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.DarkSwap.cs +++ b/Content.Shared/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.DarkSwap.cs @@ -1,4 +1,5 @@ using Content.Shared.Interaction.Events; +using Content.Shared.Item; using Content.Shared.SimpleStation14.Species.Shadowkin.Components; using Content.Shared.Popups; using Robust.Shared.Timing; @@ -21,14 +22,13 @@ public override void Initialize() private void OnInteractionAttempt(EntityUid uid, ShadowkinDarkSwappedComponent component, InteractionAttemptEvent args) { - if (args.Target == null || !_entity.TryGetComponent(args.Target, out var __) || - _entity.TryGetComponent(args.Target, out _)) + if (args.Target == null || + !_entity.HasComponent(args.Target) || + _entity.HasComponent(args.Target)) return; args.Cancel(); - if (_gameTiming.InPrediction) - return; - - _popup.PopupEntity(Loc.GetString("ethereal-pickup-fail"), args.Target.Value, uid); + if (_gameTiming.InPrediction && _gameTiming.IsFirstTimePredicted) + _popup.PopupEntity(Loc.GetString("ethereal-pickup-fail"), args.Target.Value, uid); } }