Skip to content

Commit

Permalink
Update LinkedLifecycleGridSystem.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
dvir001 committed Jan 11, 2025
1 parent 7848475 commit 76e9711
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
using System.Numerics;
using Content.Server.StationEvents.Components;
using Content.Shared.Buckle.Components;
using Content.Shared.Humanoid;
using Content.Shared.Mech.Components;
using Content.Shared.Mind;
using Content.Shared.Mind.Components;
using Content.Shared.Mobs.Components;
using Content.Shared.Silicons.Borgs.Components;
using Content.Shared.Vehicle.Components;
using Robust.Shared.Map;
using Robust.Shared.Player;

namespace Content.Server.StationEvents.Events;

Expand Down Expand Up @@ -106,6 +107,20 @@ private void OnMasterRemoved(EntityUid uid, LinkedLifecycleGridParentComponent c
reparentEntities.Add(((targetUid, targetXform), targetXform.MapUid!.Value, _transform.GetWorldPosition(targetXform)));
}

// Get silicon
var borgQuery = AllEntityQuery<BorgChassisComponent, ActorComponent, TransformComponent>();
while (borgQuery.MoveNext(out var borgUid, out _, out _, out var xform))
{
handledEntities.Add(borgUid);

if (xform.GridUid == null || xform.MapUid == null || xform.GridUid != grid)
continue;

var (targetUid, targetXform) = GetParentToReparent(borgUid, xform);

reparentEntities.Add(((targetUid, targetXform), targetXform.MapUid!.Value, _transform.GetWorldPosition(targetXform)));
}

// Get occupied MindContainers
var mindQuery = AllEntityQuery<MindContainerComponent, TransformComponent>();
while (mindQuery.MoveNext(out var mobUid, out var mindContainer, out var xform))
Expand Down

0 comments on commit 76e9711

Please sign in to comment.