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

@@ -11,14 +11,14 @@ public sealed partial class ResearchSystem
SubscribeLocalEvent<ResearchPointSourceComponent, ResearchServerGetPointsPerSecondEvent>(OnGetPointsPerSecond);
}
private void OnGetPointsPerSecond(EntityUid uid, ResearchPointSourceComponent component, ref ResearchServerGetPointsPerSecondEvent args)
private void OnGetPointsPerSecond(Entity<ResearchPointSourceComponent> source, ref ResearchServerGetPointsPerSecondEvent args)
{
if (CanProduce(component))
args.Points += component.PointsPerSecond;
if (CanProduce(source))
args.Points += source.Comp.PointsPerSecond;
}
public bool CanProduce(ResearchPointSourceComponent component)
public bool CanProduce(Entity<ResearchPointSourceComponent> source)
{
return component.Active && this.IsPowered(component.Owner, EntityManager);
return source.Comp.Active && this.IsPowered(source, EntityManager);
}
}