stupid rename

This commit is contained in:
JohnCorby 2022-08-16 17:32:33 -07:00
parent 67313c8456
commit ba83ed2276
2 changed files with 13 additions and 13 deletions

View File

@ -8,25 +8,25 @@ public static class IAuthWorldObject_Extensions
/// <summary>
/// try and gain authority over the object
/// </summary>
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));
}
/// <summary>
/// release authority over the object,
/// potentially to giving it to someone else
/// </summary>
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));
}
}

View File

@ -10,22 +10,22 @@ public static class ILinkedWorldObject_Extensions
/// <summary>
/// link a world object and a network behaviour
/// </summary>
public static void LinkTo(this ILinkedWorldObject<NetworkBehaviour> worldObject, ILinkedNetworkBehaviour networkBehaviour)
public static void LinkTo(this ILinkedWorldObject<NetworkBehaviour> @this, ILinkedNetworkBehaviour networkBehaviour)
{
worldObject.SetNetworkBehaviour((NetworkBehaviour)networkBehaviour);
networkBehaviour.SetWorldObject(worldObject);
@this.SetNetworkBehaviour((NetworkBehaviour)networkBehaviour);
networkBehaviour.SetWorldObject(@this);
}
/// <summary>
/// link a world object and network object, then spawn it.
/// (host only)
/// </summary>
public static void SpawnLinked(this ILinkedWorldObject<NetworkBehaviour> worldObject, GameObject prefab, bool spawnWithServerAuthority)
public static void SpawnLinked(this ILinkedWorldObject<NetworkBehaviour> @this, GameObject prefab, bool spawnWithServerAuthority)
{
var go = Object.Instantiate(prefab);
var networkBehaviour = go.GetComponent<ILinkedNetworkBehaviour>();
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)
/// </summary>
public static async UniTask WaitForLink(this ILinkedWorldObject<NetworkBehaviour> worldObject, CancellationToken ct) =>
await UniTask.WaitUntil(() => worldObject.NetworkBehaviour, cancellationToken: ct);
public static async UniTask WaitForLink(this ILinkedWorldObject<NetworkBehaviour> @this, CancellationToken ct) =>
await UniTask.WaitUntil(() => @this.NetworkBehaviour, cancellationToken: ct);
}