Fix artifacts swapping places with ghosts (#35074)
* Prevent artifacts swapping position with ghosts * Filter for MobStateComponent instead * Update Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/PortalArtifactSystem.cs * bluh
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
|
||||
using Content.Shared.Mind.Components;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Teleportation.Systems;
|
||||
using Robust.Shared.Collections;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -25,8 +26,8 @@ public sealed class PortalArtifactSystem : EntitySystem
|
||||
{
|
||||
var map = Transform(artifact).MapID;
|
||||
var validMinds = new ValueList<EntityUid>();
|
||||
var mindQuery = EntityQueryEnumerator<MindContainerComponent, TransformComponent, MetaDataComponent>();
|
||||
while (mindQuery.MoveNext(out var uid, out var mc, out var xform, out var meta))
|
||||
var mindQuery = EntityQueryEnumerator<MindContainerComponent, MobStateComponent, TransformComponent, MetaDataComponent>();
|
||||
while (mindQuery.MoveNext(out var uid, out var mc, out _, out var xform, out var meta))
|
||||
{
|
||||
// check if the MindContainer has a Mind and if the entity is not in a container (this also auto excludes AI) and if they are on the same map
|
||||
if (mc.HasMind && !_container.IsEntityOrParentInContainer(uid, meta: meta, xform: xform) && xform.MapID == map)
|
||||
|
||||
Reference in New Issue
Block a user