From 76e97117af3adc4710cd2971988e212b653de79f Mon Sep 17 00:00:00 2001 From: Dvir Date: Sat, 11 Jan 2025 16:49:46 +0200 Subject: [PATCH] Update LinkedLifecycleGridSystem.cs --- .../EventSystems/LinkedLifecycleGridSystem.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Content.Server/_NF/StationEvents/EventSystems/LinkedLifecycleGridSystem.cs b/Content.Server/_NF/StationEvents/EventSystems/LinkedLifecycleGridSystem.cs index e7f869d3efc..15ae44863fc 100644 --- a/Content.Server/_NF/StationEvents/EventSystems/LinkedLifecycleGridSystem.cs +++ b/Content.Server/_NF/StationEvents/EventSystems/LinkedLifecycleGridSystem.cs @@ -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; @@ -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(); + 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(); while (mindQuery.MoveNext(out var mobUid, out var mindContainer, out var xform))