Remove 700 usages of Component.Owner (#21100)
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user