Remove 700 usages of Component.Owner (#21100)

This commit is contained in:
DrSmugleaf
2023-10-19 12:34:31 -07:00
committed by GitHub
parent 5825ffb95c
commit f560f88eb5
261 changed files with 2291 additions and 2036 deletions

View File

@@ -1,11 +1,11 @@
using System.Linq;
using Content.Server.Storage.Components;
using Content.Shared.Database;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Storage;
using Content.Shared.Verbs;
using Robust.Shared.Containers;
using Robust.Shared.Random;
using System.Linq;
using Content.Shared.Storage;
namespace Content.Server.Storage.EntitySystems;
@@ -55,7 +55,7 @@ public sealed class PickRandomSystem : EntitySystem
var picked = _random.Pick(entities);
// if it fails to go into a hand of the user, will be on the storage
_container.AttachParentToContainerOrGrid(Transform(picked));
_container.AttachParentToContainerOrGrid((picked, Transform(picked)));
// TODO: try to put in hands, failing that put it on the storage
_hands.TryPickupAnyHand(user, picked);