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

@@ -59,7 +59,7 @@ public sealed class DoorSystem : SharedDoorSystem
return;
if (door.ChangeAirtight && TryComp(uid, out AirtightComponent? airtight))
_airtightSystem.SetAirblocked(uid, airtight, collidable);
_airtightSystem.SetAirblocked((uid, airtight), collidable);
// Pathfinding / AI stuff.
RaiseLocalEvent(new AccessReaderChangeEvent(uid, collidable));
@@ -201,14 +201,14 @@ public sealed class DoorSystem : SharedDoorSystem
}
}
protected override void CheckDoorBump(DoorComponent component, PhysicsComponent body)
protected override void CheckDoorBump(Entity<DoorComponent, PhysicsComponent> ent)
{
var uid = body.Owner;
if (component.BumpOpen)
var (uid, door, physics) = ent;
if (door.BumpOpen)
{
foreach (var other in PhysicsSystem.GetContactingEntities(uid, body, approximate: true))
foreach (var other in PhysicsSystem.GetContactingEntities(uid, physics, approximate: true))
{
if (Tags.HasTag(other, "DoorBumpOpener") && TryOpen(uid, component, other, false, quiet: true))
if (Tags.HasTag(other, "DoorBumpOpener") && TryOpen(uid, door, other, quiet: true))
break;
}
}