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

@@ -12,6 +12,7 @@ using Content.Shared.Storage.Components;
using Content.Shared.Storage.EntitySystems;
using Content.Shared.Tools.Systems;
using Content.Shared.Verbs;
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
using Robust.Shared.Map;
@@ -23,6 +24,7 @@ public sealed class EntityStorageSystem : SharedEntityStorageSystem
[Dependency] private readonly ConstructionSystem _construction = default!;
[Dependency] private readonly AtmosphereSystem _atmos = default!;
[Dependency] private readonly IMapManager _map = default!;
[Dependency] private readonly MapSystem _mapSystem = default!;
public override void Initialize()
{
@@ -130,9 +132,9 @@ public sealed class EntityStorageSystem : SharedEntityStorageSystem
{
var targetCoordinates = new EntityCoordinates(uid, component.EnteringOffset).ToMap(EntityManager, TransformSystem);
if (_map.TryFindGridAt(targetCoordinates, out _, out var grid))
if (_map.TryFindGridAt(targetCoordinates, out var gridId, out var grid))
{
return grid.GetTileRef(targetCoordinates);
return _mapSystem.GetTileRef(gridId, grid, targetCoordinates);
}
return null;