From 9b5dd4481de90dede02e450c28bf5f63e78f9ffa Mon Sep 17 00:00:00 2001 From: Aviu00 <93730715+Aviu00@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:36:17 +0900 Subject: [PATCH] - fix: Mindshield implant removal fix. (#154) --- .../Implants/SharedSubdermalImplantSystem.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Content.Shared/Implants/SharedSubdermalImplantSystem.cs b/Content.Shared/Implants/SharedSubdermalImplantSystem.cs index 7b1893b7a9..ebe810546c 100644 --- a/Content.Shared/Implants/SharedSubdermalImplantSystem.cs +++ b/Content.Shared/Implants/SharedSubdermalImplantSystem.cs @@ -3,6 +3,7 @@ using Content.Shared.Actions; using Content.Shared.Implants.Components; using Content.Shared.Interaction; using Content.Shared.Interaction.Events; +using Content.Shared.Mindshield.Components; using Content.Shared.Mobs; using Content.Shared.Tag; using JetBrains.Annotations; @@ -72,6 +73,16 @@ public abstract class SharedSubdermalImplantSystem : EntitySystem if (component.ImplantAction != null) _actionsSystem.RemoveProvidedActions(component.ImplantedEntity.Value, uid); + // WD EDIT START + if (_tag.HasTag(uid, "MindShield") && + _container.TryGetContainer(component.ImplantedEntity.Value, ImplanterComponent.ImplantSlotId, + out var implantContainer) && + implantContainer.ContainedEntities.All(x => !_tag.HasTag(x, "MindShield"))) + { + RemCompDeferred(component.ImplantedEntity.Value); + } + // WD EDIT END + if (!_container.TryGetContainer(uid, BaseStorageId, out var storageImplant)) return;