]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Update content for .Owner culling (#14185)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Wed, 22 Feb 2023 01:45:32 +0000 (12:45 +1100)
committerGitHub <noreply@github.com>
Wed, 22 Feb 2023 01:45:32 +0000 (12:45 +1100)
Content.Client/Materials/MaterialStorageSystem.cs
Content.Client/Stack/StackSystem.cs
Content.Server/Parallax/BiomeSystem.cs
Content.Server/Station/Systems/StationSystem.cs
Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/RandomTeleportArtifactSystem.cs
Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/ShuffleArtifactSystem.cs
Content.Shared/Blocking/BlockingSystem.cs
Content.Shared/Follower/FollowerSystem.cs
Content.Shared/Tabletop/SharedTabletopSystem.cs

index b953331eb0939b08fc6cf46989961121afb5b4ba..b4ca1f273654e2cb9854063edc9234bad0ebaac4 100644 (file)
@@ -44,7 +44,7 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem
     {
         if (!base.TryInsertMaterialEntity(user, toInsert, receiver, component))
             return false;
-        _transform.DetachParentToNull(Transform(toInsert));
+        _transform.DetachParentToNull(toInsert, Transform(toInsert));
         return true;
     }
 }
index 9da7d8d63ed621b0eb0047fecc8d5a64cecf10cd..34b00bc0810f105ce2a3f8c99ffd07c0e0a44e12 100644 (file)
@@ -28,7 +28,7 @@ namespace Content.Client.Stack
             // TODO PREDICT ENTITY DELETION: This should really just be a normal entity deletion call.
             if (component.Count <= 0)
             {
-                Xform.DetachParentToNull(Transform(uid));
+                Xform.DetachParentToNull(uid, Transform(uid));
                 return;
             }
 
index a724e201060ae2549e4a877ac194eb1d93dc892e..f5538b5455aa909ab3410e71b9c298a406ebb8ed 100644 (file)
@@ -206,7 +206,7 @@ public sealed class BiomeSystem : SharedBiomeSystem
                 // At least for now unless we do lookups or smth, only work with anchoring.
                 if (xformQuery.TryGetComponent(ent, out var xform) && !xform.Anchored)
                 {
-                    _transform.AnchorEntity(xform, grid, indices);
+                    _transform.AnchorEntity(ent, xform, grid, indices);
                 }
 
                 loadedEntities.Add(ent);
index 26762b0393f791514e47ee9d47209cb5928c31b0..2eb8e8d54ffa979069d8040c63ddb9996d09bc58 100644 (file)
@@ -349,7 +349,7 @@ public sealed class StationSystem : EntitySystem
 
         // TODO SERIALIZATION The station data needs to be saveable somehow, but when a map gets saved, this entity
         // won't be included because its in null-space. Also, what happens to shuttles on other maps?
-        _transform.DetachParentToNull(Transform(station));
+        _transform.DetachParentToNull(station, Transform(station));
 
         var data = AddComp<StationDataComponent>(station);
         var metaData = MetaData(station);
index cdfa2ca905b7d8d968b951be7955346d222caa66..84964958f3807ccfe133ed9466a0d5b443945455 100644 (file)
@@ -23,6 +23,6 @@ public sealed class RandomTeleportArtifactSystem : EntitySystem
         var xform = Transform(uid);
         _popup.PopupCoordinates(Loc.GetString("blink-artifact-popup"), xform.Coordinates, PopupType.Medium);
 
-        _xform.SetCoordinates(xform, xform.Coordinates.Offset(_random.NextVector2(component.Range)));
+        _xform.SetCoordinates(uid, xform, xform.Coordinates.Offset(_random.NextVector2(component.Range)));
     }
 }
index 052fceacadae8d388bbb052e25b53d0c9e556b90..675d3e9387dd2e6ed11333af6ca9c8778efc1f85 100644 (file)
@@ -38,7 +38,8 @@ public sealed class ShuffleArtifactSystem : EntitySystem
 
         foreach (var xform in toShuffle)
         {
-            _xform.SetCoordinates(xform, _random.PickAndTake(allCoords));
+            var xformUid = xform.Owner;
+            _xform.SetCoordinates(xformUid, xform, _random.PickAndTake(allCoords));
         }
     }
 }
index 1e095248834b88095a88348a2de2a490fa0e00df..5d4f9cc1898b19aca2af2910c7f8216ffcd5acb1 100644 (file)
@@ -173,7 +173,7 @@ public sealed partial class BlockingSystem : EntitySystem
             }
 
             //Don't allow someone to block if they're somehow not anchored.
-            _transformSystem.AnchorEntity(xform);
+            _transformSystem.AnchorEntity(user, xform);
             if (!xform.Anchored)
             {
                 CantBlockError(user);
@@ -238,7 +238,7 @@ public sealed partial class BlockingSystem : EntitySystem
                                                      && TryComp<PhysicsComponent>(user, out var physicsComponent))
         {
             if (xform.Anchored)
-                _transformSystem.Unanchor(xform);
+                _transformSystem.Unanchor(user, xform);
 
             _actionsSystem.SetToggled(component.BlockingToggleAction, false);
             _fixtureSystem.DestroyFixture(user, BlockingComponent.BlockFixtureID, body: physicsComponent);
index 3edf99abe18d9f33582cdd4ef13a02a13a917748..9411207d4e591ebb994d46d57bb5a04d59660619 100644 (file)
@@ -73,7 +73,7 @@ public sealed class FollowerSystem : EntitySystem
         followedComp.Following.Add(follower);
 
         var xform = Transform(follower);
-        _transform.SetParent(xform, entity);
+        _transform.SetParent(follower, xform, entity);
         xform.LocalPosition = Vector2.Zero;
         xform.LocalRotation = Angle.Zero;
 
index 59ec7897cea6e9d359486bfb42be6f3ce48d64dc..d314ff361cce3cba4d7a2a52281882c868a6e1bc 100644 (file)
@@ -40,7 +40,7 @@ namespace Content.Shared.Tabletop
 
             // Move the entity and dirty it (we use the map ID from the entity so noone can try to be funny and move the item to another map)
             var transform = EntityManager.GetComponent<TransformComponent>(msg.MovedEntityUid);
-            _transforms.SetParent(transform, _mapMan.GetMapEntityId(transform.MapID));
+            _transforms.SetParent(msg.MovedEntityUid, transform, _mapMan.GetMapEntityId(transform.MapID));
             _transforms.SetLocalPositionNoLerp(transform, msg.Coordinates.Position);
         }