Remove 700 usages of Component.Owner (#21100)
This commit is contained in:
@@ -26,15 +26,15 @@ public sealed class ContainmentFieldSystem : EntitySystem
|
||||
{
|
||||
var otherBody = args.OtherEntity;
|
||||
|
||||
if (TryComp<SpaceGarbageComponent>(otherBody, out var garbage))
|
||||
if (HasComp<SpaceGarbageComponent>(otherBody))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-field-vaporized", ("entity", otherBody)), component.Owner, PopupType.LargeCaution);
|
||||
QueueDel(garbage.Owner);
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-field-vaporized", ("entity", otherBody)), uid, PopupType.LargeCaution);
|
||||
QueueDel(otherBody);
|
||||
}
|
||||
|
||||
if (TryComp<PhysicsComponent>(otherBody, out var physics) && physics.Mass <= component.MaxMass && physics.Hard)
|
||||
{
|
||||
var fieldDir = Transform(component.Owner).WorldPosition;
|
||||
var fieldDir = Transform(uid).WorldPosition;
|
||||
var playerDir = Transform(otherBody).WorldPosition;
|
||||
|
||||
_throwing.TryThrow(otherBody, playerDir-fieldDir, strength: component.ThrowForce);
|
||||
|
||||
Reference in New Issue
Block a user