]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Replace DetachParentToNull() with DetachEntity() (#29992)
authorPlykiya <58439124+Plykiya@users.noreply.github.com>
Sat, 13 Jul 2024 10:59:33 +0000 (03:59 -0700)
committerGitHub <noreply@github.com>
Sat, 13 Jul 2024 10:59:33 +0000 (20:59 +1000)
DETACH PARENT TO ENTITY

Co-authored-by: plykiya <plykiya@protonmail.com>
Content.Client/Materials/MaterialStorageSystem.cs
Content.Client/Stack/StackSystem.cs
Content.Shared/Actions/ActionContainerSystem.cs
Content.Shared/Follower/FollowerSystem.cs
Content.Shared/Inventory/VirtualItem/SharedVirtualItemSystem.cs
Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.ChamberMagazine.cs

index edd07391f7bcc86929ef172a56e9233a3e61e047..592471d6736d087c245dfc720e1332fbf17c4843 100644 (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;
     }
 }
index c081581338fffe49950b6ff5d78c33bc9ff8d20e..7e681aeba3e357fa92d8f783f6ef6eec1f1b1718 100644 (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;
             }
 
index 1c5a3ba0d934d9d0eea9314f96d88e03f0dc7ea9..1a83cf38e51343e4a4a752573b3e8a4a0d326e39 100644 (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
index 8027ee449c4a350abc24d162f7a5e34be6dde381..8c35617e2c3e2d711ed5fb6471e1c4909bc959c7 100644 (file)
@@ -227,7 +227,7 @@ public sealed class FollowerSystem : EntitySystem
 
         if (_netMan.IsClient)
         {
-            _transform.DetachParentToNull(uid, xform);
+            _transform.DetachEntity(uid, xform);
             return;
         }
 
index 4a5894d895899e9383422dcd5310b54c8548e162..cd0863ec88dac81472a2f0443cd7b2f150c7637d 100644 (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);
     }
index adae26a223a1429fbb6658fab073f46bb3f3d147..d6f45ba77df01cd15034ef61080901f89d43c0c0 100644 (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));
             }
         }