- fix: Mindshield implant removal fix. (#154)
This commit is contained in:
@@ -3,6 +3,7 @@ using Content.Shared.Actions;
|
|||||||
using Content.Shared.Implants.Components;
|
using Content.Shared.Implants.Components;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
using Content.Shared.Interaction.Events;
|
using Content.Shared.Interaction.Events;
|
||||||
|
using Content.Shared.Mindshield.Components;
|
||||||
using Content.Shared.Mobs;
|
using Content.Shared.Mobs;
|
||||||
using Content.Shared.Tag;
|
using Content.Shared.Tag;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
@@ -72,6 +73,16 @@ public abstract class SharedSubdermalImplantSystem : EntitySystem
|
|||||||
if (component.ImplantAction != null)
|
if (component.ImplantAction != null)
|
||||||
_actionsSystem.RemoveProvidedActions(component.ImplantedEntity.Value, uid);
|
_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<MindShieldComponent>(component.ImplantedEntity.Value);
|
||||||
|
}
|
||||||
|
// WD EDIT END
|
||||||
|
|
||||||
if (!_container.TryGetContainer(uid, BaseStorageId, out var storageImplant))
|
if (!_container.TryGetContainer(uid, BaseStorageId, out var storageImplant))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user