From 59cf36be29742b02e743076d5687612805e1abbd Mon Sep 17 00:00:00 2001 From: FoxxoTrystan Date: Sun, 20 Oct 2024 00:32:49 +0200 Subject: [PATCH] Fix --- Content.Server/Shadowkin/EtherealStunItemSystem.cs | 3 ++- Content.Shared/Shadowkin/EtherealComponent.cs | 3 +++ Resources/Prototypes/Floof/Entities/Structures/shadowkin.yml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Content.Server/Shadowkin/EtherealStunItemSystem.cs b/Content.Server/Shadowkin/EtherealStunItemSystem.cs index b48b4d4fecf..f7f735a0525 100644 --- a/Content.Server/Shadowkin/EtherealStunItemSystem.cs +++ b/Content.Server/Shadowkin/EtherealStunItemSystem.cs @@ -21,7 +21,8 @@ private void OnUseInHand(EntityUid uid, EtherealStunItemComponent component, Use { foreach (var ent in _lookup.GetEntitiesInRange(uid, component.Radius)) { - if (!TryComp(ent, out var ethereal)) + if (!TryComp(ent, out var ethereal) + || !ethereal.CanBeStunned) continue; RemComp(ent, ethereal); diff --git a/Content.Shared/Shadowkin/EtherealComponent.cs b/Content.Shared/Shadowkin/EtherealComponent.cs index 0fc50c0f12e..3dcb54c2fb8 100644 --- a/Content.Shared/Shadowkin/EtherealComponent.cs +++ b/Content.Shared/Shadowkin/EtherealComponent.cs @@ -23,6 +23,9 @@ public sealed partial class EtherealComponent : Component [DataField] public float DarkenRate = 0.084f; + [DataField] + public bool CanBeStunned = true; + public List DarkenedLights = new(); public float DarkenAccumulator; diff --git a/Resources/Prototypes/Floof/Entities/Structures/shadowkin.yml b/Resources/Prototypes/Floof/Entities/Structures/shadowkin.yml index fa81f0c8a83..29934e35117 100644 --- a/Resources/Prototypes/Floof/Entities/Structures/shadowkin.yml +++ b/Resources/Prototypes/Floof/Entities/Structures/shadowkin.yml @@ -75,6 +75,7 @@ randomTeleport: false - type: DarkPortal - type: Ethereal + canBeStunned: false - type: entity name: Shadowkin Portal Spawner