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,15 +1,12 @@
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Server.Chemistry.Components;
using Content.Shared.Chemistry.Components.SolutionManager;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Inventory;
using JetBrains.Annotations;
using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Physics.Events;
using Robust.Shared.Prototypes;
namespace Content.Server.Chemistry.EntitySystems
{
[UsedImplicitly]
@@ -26,13 +23,17 @@ namespace Content.Server.Chemistry.EntitySystems
SubscribeLocalEvent<SolutionInjectOnCollideComponent, StartCollideEvent>(HandleInjection);
}
private void HandleInjection(EntityUid uid, SolutionInjectOnCollideComponent component, ref StartCollideEvent args)
private void HandleInjection(Entity<SolutionInjectOnCollideComponent> ent, ref StartCollideEvent args)
{
var component = ent.Comp;
var target = args.OtherEntity;
if (!args.OtherBody.Hard ||
!EntityManager.TryGetComponent<BloodstreamComponent>(target, out var bloodstream) ||
!_solutionsSystem.TryGetInjectableSolution(component.Owner, out var solution)) return;
!_solutionsSystem.TryGetInjectableSolution(ent, out var solution))
{
return;
}
if (component.BlockSlots != 0x0 && TryComp<InventoryComponent>(target, out var inventory))
{