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