Replace DetachParentToNull() with DetachEntity() (#29992)
DETACH PARENT TO ENTITY Co-authored-by: plykiya <plykiya@protonmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -227,7 +227,7 @@ public sealed class FollowerSystem : EntitySystem
|
||||
|
||||
if (_netMan.IsClient)
|
||||
{
|
||||
_transform.DetachParentToNull(uid, xform);
|
||||
_transform.DetachEntity(uid, xform);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user