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;
namespace Content.Client.Materials;
@@ -49,7 +49,7 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem
{
if (!base.TryInsertMaterialEntity(user, toInsert, receiver, storage, material, composition))
return false;
_transform.DetachParentToNull(toInsert, Transform(toInsert));
_transform.DetachEntity(toInsert, Transform(toInsert));
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.
if (component.Count <= 0 && !component.Lingering)
{
Xform.DetachParentToNull(uid, Transform(uid));
Xform.DetachEntity(uid, Transform(uid));
return;
}

View File

@@ -261,7 +261,7 @@ public sealed class ActionContainerSystem : EntitySystem
if (action.Container == null)
return;
_transform.DetachParentToNull(actionId, Transform(actionId));
_transform.DetachEntity(actionId, Transform(actionId));
// 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

View File

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

View File

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

View File

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