fix: better secure Kitsune brains within their heads (#3962)

* fix: better secure Kitsune brains within their heads
This commit is contained in:
Perry Fraser 2025-06-25 04:01:54 -04:00 committed by GitHub
parent 3ee7b035ec
commit 87f19b80c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,6 @@
using System.Linq;
using Content.Shared._DV.Polymorph;
using Content.Shared.Body.Organ;
using Content.Shared.Intellicard;
using Content.Shared.Mind.Components;
using Robust.Shared.Containers;
@ -39,6 +40,14 @@ public sealed class ContentContainerSystem : EntitySystem
{
foreach (var entity in container.ContainedEntities)
{
// We will end up recursing over each of our body parts, so
// we need to make sure that we don't end up dropping our
// own brain, since that can gain a MindContainer if it was
// operated on.
if (TryComp<OrganComponent>(entity, out var organ)
&& organ.Body.HasValue) // Yeah so that's KINDA in use.
continue;
if (HasComp<MindContainerComponent>(entity))
{
_found.Add(entity);