Makes many things use OwnerUid instead of Owner.Uid
This commit is contained in:
@@ -45,7 +45,7 @@ namespace Content.Shared.Pulling.Systems
|
||||
SharedPullerComponent component,
|
||||
PullStartedMessage args)
|
||||
{
|
||||
if (args.Puller.Owner.Uid != uid)
|
||||
if (args.Puller.OwnerUid != uid)
|
||||
return;
|
||||
|
||||
if (component.Owner.TryGetComponent(out SharedAlertsComponent? alerts))
|
||||
@@ -59,7 +59,7 @@ namespace Content.Shared.Pulling.Systems
|
||||
SharedPullerComponent component,
|
||||
PullStoppedMessage args)
|
||||
{
|
||||
if (args.Puller.Owner.Uid != uid)
|
||||
if (args.Puller.OwnerUid != uid)
|
||||
return;
|
||||
|
||||
if (component.Owner.TryGetComponent(out SharedAlertsComponent? alerts))
|
||||
|
||||
@@ -59,10 +59,10 @@ namespace Content.Shared.Pulling
|
||||
// Messaging
|
||||
var message = new PullStoppedMessage(pullerPhysics, pullablePhysics);
|
||||
|
||||
RaiseLocalEvent(puller.Owner.Uid, message, broadcast: false);
|
||||
RaiseLocalEvent(puller.OwnerUid, message, broadcast: false);
|
||||
|
||||
if (pullable.Owner.LifeStage <= EntityLifeStage.MapInitialized)
|
||||
RaiseLocalEvent(pullable.Owner.Uid, message);
|
||||
RaiseLocalEvent(pullable.OwnerUid, message);
|
||||
|
||||
// Networking
|
||||
puller.Dirty();
|
||||
@@ -106,7 +106,7 @@ namespace Content.Shared.Pulling
|
||||
var union = pullerPhysics.GetWorldAABB().Union(pullablePhysics.GetWorldAABB());
|
||||
var length = Math.Max(union.Size.X, union.Size.Y) * 0.75f;
|
||||
|
||||
pullable.PullJoint = _jointSystem.CreateDistanceJoint(pullablePhysics.Owner.Uid, pullerPhysics.Owner.Uid, id:$"pull-joint-{pullablePhysics.Owner.Uid}");
|
||||
pullable.PullJoint = _jointSystem.CreateDistanceJoint(pullablePhysics.OwnerUid, pullerPhysics.Owner.Uid, id:$"pull-joint-{pullablePhysics.Owner.Uid}");
|
||||
pullable.PullJoint.CollideConnected = false;
|
||||
// This maximum has to be there because if the object is constrained too closely, the clamping goes backwards and asserts.
|
||||
pullable.PullJoint.MaxLength = Math.Max(1.0f, length);
|
||||
@@ -117,8 +117,8 @@ namespace Content.Shared.Pulling
|
||||
// Messaging
|
||||
var message = new PullStartedMessage(pullerPhysics, pullablePhysics);
|
||||
|
||||
RaiseLocalEvent(puller.Owner.Uid, message, broadcast: false);
|
||||
RaiseLocalEvent(pullable.Owner.Uid, message);
|
||||
RaiseLocalEvent(puller.OwnerUid, message, broadcast: false);
|
||||
RaiseLocalEvent(pullable.OwnerUid, message);
|
||||
|
||||
// Networking
|
||||
puller.Dirty();
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace Content.Shared.Pulling
|
||||
}
|
||||
|
||||
var msg = new StopPullingEvent(user?.Uid);
|
||||
RaiseLocalEvent(pullable.Owner.Uid, msg);
|
||||
RaiseLocalEvent(pullable.OwnerUid, msg);
|
||||
|
||||
if (msg.Cancelled) return false;
|
||||
|
||||
@@ -154,14 +154,14 @@ namespace Content.Shared.Pulling
|
||||
|
||||
var pullAttempt = new PullAttemptMessage(pullerPhysics, pullablePhysics);
|
||||
|
||||
RaiseLocalEvent(puller.Owner.Uid, pullAttempt, broadcast: false);
|
||||
RaiseLocalEvent(puller.OwnerUid, pullAttempt, broadcast: false);
|
||||
|
||||
if (pullAttempt.Cancelled)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RaiseLocalEvent(pullable.Owner.Uid, pullAttempt);
|
||||
RaiseLocalEvent(pullable.OwnerUid, pullAttempt);
|
||||
|
||||
if (pullAttempt.Cancelled)
|
||||
{
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Content.Shared.Pulling
|
||||
// Raise a "you are being pulled" alert if the pulled entity has alerts.
|
||||
private static void PullableHandlePullStarted(EntityUid uid, SharedPullableComponent component, PullStartedMessage args)
|
||||
{
|
||||
if (args.Pulled.Owner.Uid != uid)
|
||||
if (args.Pulled.OwnerUid != uid)
|
||||
return;
|
||||
|
||||
if (component.Owner.TryGetComponent(out SharedAlertsComponent? alerts))
|
||||
@@ -111,7 +111,7 @@ namespace Content.Shared.Pulling
|
||||
|
||||
private static void PullableHandlePullStopped(EntityUid uid, SharedPullableComponent component, PullStoppedMessage args)
|
||||
{
|
||||
if (args.Pulled.Owner.Uid != uid)
|
||||
if (args.Pulled.OwnerUid != uid)
|
||||
return;
|
||||
|
||||
if (component.Owner.TryGetComponent(out SharedAlertsComponent? alerts))
|
||||
|
||||
Reference in New Issue
Block a user