Replace DetachParentToNull() with DetachEntity() (#29992)

DETACH PARENT TO ENTITY

Co-authored-by: plykiya <plykiya@protonmail.com>
This commit is contained in:
Plykiya
2024-07-13 03:59:33 -07:00
committed by GitHub
parent ac768fe9f1
commit 6c1d1057d5
6 changed files with 7 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
using Content.Shared.Materials; using Content.Shared.Materials;
using Robust.Client.GameObjects; using Robust.Client.GameObjects;
namespace Content.Client.Materials; namespace Content.Client.Materials;
@@ -49,7 +49,7 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem
{ {
if (!base.TryInsertMaterialEntity(user, toInsert, receiver, storage, material, composition)) if (!base.TryInsertMaterialEntity(user, toInsert, receiver, storage, material, composition))
return false; return false;
_transform.DetachParentToNull(toInsert, Transform(toInsert)); _transform.DetachEntity(toInsert, Transform(toInsert));
return true; return true;
} }
} }

View File

@@ -44,7 +44,7 @@ namespace Content.Client.Stack
// TODO PREDICT ENTITY DELETION: This should really just be a normal entity deletion call. // TODO PREDICT ENTITY DELETION: This should really just be a normal entity deletion call.
if (component.Count <= 0 && !component.Lingering) if (component.Count <= 0 && !component.Lingering)
{ {
Xform.DetachParentToNull(uid, Transform(uid)); Xform.DetachEntity(uid, Transform(uid));
return; return;
} }

View File

@@ -261,7 +261,7 @@ public sealed class ActionContainerSystem : EntitySystem
if (action.Container == null) if (action.Container == null)
return; return;
_transform.DetachParentToNull(actionId, Transform(actionId)); _transform.DetachEntity(actionId, Transform(actionId));
// Container removal events should have removed the action from the action container. // Container removal events should have removed the action from the action container.
// However, just in case the container was already deleted we will still manually clear the container field // However, just in case the container was already deleted we will still manually clear the container field

View File

@@ -227,7 +227,7 @@ public sealed class FollowerSystem : EntitySystem
if (_netMan.IsClient) if (_netMan.IsClient)
{ {
_transform.DetachParentToNull(uid, xform); _transform.DetachEntity(uid, xform);
return; return;
} }

View File

@@ -244,7 +244,7 @@ public abstract class SharedVirtualItemSystem : EntitySystem
if (TerminatingOrDeleted(item)) if (TerminatingOrDeleted(item))
return; return;
_transformSystem.DetachParentToNull(item, Transform(item)); _transformSystem.DetachEntity(item, Transform(item));
if (_netManager.IsServer) if (_netManager.IsServer)
QueueDel(item); QueueDel(item);
} }

View File

@@ -108,7 +108,7 @@ public abstract partial class SharedGunSystem
else else
{ {
// Similar to below just due to prediction. // Similar to below just due to prediction.
TransformSystem.DetachParentToNull(chamberEnt.Value, Transform(chamberEnt.Value)); TransformSystem.DetachEntity(chamberEnt.Value, Transform(chamberEnt.Value));
} }
} }