fix: better secure Kitsune brains within their heads (#3962)
* fix: better secure Kitsune brains within their heads
This commit is contained in:
parent
3ee7b035ec
commit
87f19b80c9
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue