From ba83ed2276b5b6091c3d8641a643297f41c2200c Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Tue, 16 Aug 2022 17:32:33 -0700 Subject: [PATCH] stupid rename --- QSB/AuthoritySync/IAuthWorldObject_Extensions.cs | 12 ++++++------ .../ILinkedWorldObject_Extensions.cs | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/QSB/AuthoritySync/IAuthWorldObject_Extensions.cs b/QSB/AuthoritySync/IAuthWorldObject_Extensions.cs index 6444c15c..e0339625 100644 --- a/QSB/AuthoritySync/IAuthWorldObject_Extensions.cs +++ b/QSB/AuthoritySync/IAuthWorldObject_Extensions.cs @@ -8,25 +8,25 @@ public static class IAuthWorldObject_Extensions /// /// try and gain authority over the object /// - public static void RequestOwnership(this IAuthWorldObject authWorldObject) + public static void RequestOwnership(this IAuthWorldObject @this) { - if (authWorldObject.Owner != 0) + if (@this.Owner != 0) { return; } - authWorldObject.SendMessage(new AuthWorldObjectMessage(QSBPlayerManager.LocalPlayerId)); + @this.SendMessage(new AuthWorldObjectMessage(QSBPlayerManager.LocalPlayerId)); } /// /// release authority over the object, /// potentially to giving it to someone else /// - public static void ReleaseOwnership(this IAuthWorldObject authWorldObject) + public static void ReleaseOwnership(this IAuthWorldObject @this) { - if (authWorldObject.Owner != QSBPlayerManager.LocalPlayerId) + if (@this.Owner != QSBPlayerManager.LocalPlayerId) { return; } - authWorldObject.SendMessage(new AuthWorldObjectMessage(0)); + @this.SendMessage(new AuthWorldObjectMessage(0)); } } diff --git a/QSB/Utility/LinkedWorldObject/ILinkedWorldObject_Extensions.cs b/QSB/Utility/LinkedWorldObject/ILinkedWorldObject_Extensions.cs index a0261348..c3ab2893 100644 --- a/QSB/Utility/LinkedWorldObject/ILinkedWorldObject_Extensions.cs +++ b/QSB/Utility/LinkedWorldObject/ILinkedWorldObject_Extensions.cs @@ -10,22 +10,22 @@ public static class ILinkedWorldObject_Extensions /// /// link a world object and a network behaviour /// - public static void LinkTo(this ILinkedWorldObject worldObject, ILinkedNetworkBehaviour networkBehaviour) + public static void LinkTo(this ILinkedWorldObject @this, ILinkedNetworkBehaviour networkBehaviour) { - worldObject.SetNetworkBehaviour((NetworkBehaviour)networkBehaviour); - networkBehaviour.SetWorldObject(worldObject); + @this.SetNetworkBehaviour((NetworkBehaviour)networkBehaviour); + networkBehaviour.SetWorldObject(@this); } /// /// link a world object and network object, then spawn it. /// (host only) /// - public static void SpawnLinked(this ILinkedWorldObject worldObject, GameObject prefab, bool spawnWithServerAuthority) + public static void SpawnLinked(this ILinkedWorldObject @this, GameObject prefab, bool spawnWithServerAuthority) { var go = Object.Instantiate(prefab); var networkBehaviour = go.GetComponent(); - worldObject.LinkTo(networkBehaviour); + @this.LinkTo(networkBehaviour); if (spawnWithServerAuthority) { @@ -41,6 +41,6 @@ public static class ILinkedWorldObject_Extensions /// wait for a world object to be linked. /// (non host only) /// - public static async UniTask WaitForLink(this ILinkedWorldObject worldObject, CancellationToken ct) => - await UniTask.WaitUntil(() => worldObject.NetworkBehaviour, cancellationToken: ct); + public static async UniTask WaitForLink(this ILinkedWorldObject @this, CancellationToken ct) => + await UniTask.WaitUntil(() => @this.NetworkBehaviour, cancellationToken: ct); }