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

@@ -13,6 +13,7 @@ using Content.Shared.Stacks;
using Robust.Shared.Console;
using Robust.Shared.Containers;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
@@ -57,7 +58,7 @@ public sealed class PricingSystem : EntitySystem
continue;
}
if (!_mapManager.TryGetGrid(gridId, out var mapGrid))
if (!TryComp(gridId, out MapGridComponent? mapGrid))
{
shell.WriteError($"Grid \"{gridId}\" doesn't exist.");
continue;
@@ -65,7 +66,7 @@ public sealed class PricingSystem : EntitySystem
List<(double, EntityUid)> mostValuable = new();
var value = AppraiseGrid(mapGrid.Owner, null, (uid, price) =>
var value = AppraiseGrid(gridId.Value, null, (uid, price) =>
{
mostValuable.Add((price, uid));
mostValuable.Sort((i1, i2) => i2.Item1.CompareTo(i1.Item1));