[NAK_CVR_Mods] Change every instance of "NotAKidOnSteam" to "NotAKidoS"

This commit is contained in:
NotAKidoS 2024-06-27 21:24:41 -05:00
parent a6c030955e
commit 7f02d6811f
159 changed files with 711 additions and 294 deletions

View file

@ -31,10 +31,6 @@
<HintPath>$(MsBuildThisFileDirectory)\..\.ManagedLibs\BTKUILib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ActionMenu">
<HintPath>$(MsBuildThisFileDirectory)\..\.ManagedLibs\ActionMenu.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
</Project>

View file

@ -23,7 +23,7 @@ public class AvatarScaleManager : MonoBehaviour
#region Universal Scaling Limits
// ReSharper disable MemberCanBePrivate.Global
// To match AvatarScaleTool: https://github.com/NotAKidOnSteam/AvatarScaleTool/tree/main
// To match AvatarScaleTool: https://github.com/NotAKidoS/AvatarScaleTool/tree/main
public const float DefaultMinHeight = 0.25f;
public const float DefaultMaxHeight = 2.50f;
// ReSharper restore MemberCanBePrivate.Global
@ -275,7 +275,7 @@ public class AvatarScaleManager : MonoBehaviour
//doesn't have mod or has no custom height, get from player avatar directly
CVRPlayerEntity playerEntity = CVRPlayerManager.Instance.NetworkPlayers.Find((players) => players.Uuid == playerId);
if (playerEntity != null && playerEntity.PuppetMaster != null)
return playerEntity.PuppetMaster.GetAvatarHeight();
return playerEntity.PuppetMaster.netIkController.GetRemoteHeight();
// player is invalid???
return -1f;
@ -296,8 +296,8 @@ public class AvatarScaleManager : MonoBehaviour
{
var playerId = puppetMaster._playerDescriptor.ownerId;
if (_networkedScalers.TryGetValue(playerId, out NetworkScaler scaler))
scaler.OnAvatarInstantiated(puppetMaster.avatarObject, puppetMaster._initialAvatarHeight,
puppetMaster.initialAvatarScale);
scaler.OnAvatarInstantiated(puppetMaster.avatarObject, puppetMaster.netIkController._initialHeight,
puppetMaster.netIkController._initialScale);
}
internal void OnNetworkAvatarDestroyed(PuppetMaster puppetMaster)
@ -349,8 +349,8 @@ public class AvatarScaleManager : MonoBehaviour
NetworkScaler scaler = puppetMaster.gameObject.AddComponent<NetworkScaler>();
scaler.Initialize(playerId);
scaler.OnAvatarInstantiated(puppetMaster.avatarObject, puppetMaster._initialAvatarHeight,
puppetMaster.initialAvatarScale);
scaler.OnAvatarInstantiated(puppetMaster.avatarObject, puppetMaster.netIkController._initialHeight,
puppetMaster.netIkController._initialScale);
_networkedScalers[playerId] = scaler;

View file

@ -1,5 +1,6 @@
using System.Diagnostics;
using ABI_RC.Core;
using ABI_RC.Core.Util.AnimatorManager;
using NAK.AvatarScaleMod.AvatarScaling;
using NAK.AvatarScaleMod.ScaledComponents;
using UnityEngine;
@ -178,9 +179,13 @@ public class BaseScaler : MonoBehaviour
if (_avatarTransform == null)
return false;
_targetHeightChanged = false;
ScaleAvatarRoot();
UpdateAnimatorParameter();
ApplyComponentScaling();
InvokeTargetHeightChanged();
return true;
}
@ -195,11 +200,13 @@ public class BaseScaler : MonoBehaviour
_targetHeight = _initialHeight;
_targetScale = _initialScale;
_scaleFactor = 1f;
_targetHeightChanged = true;
_targetHeightChanged = false;
ScaleAvatarRoot();
UpdateAnimatorParameter();
ApplyComponentScaling();
InvokeTargetHeightReset();
}
private void ScaleAvatarRoot()
@ -222,17 +229,23 @@ public class BaseScaler : MonoBehaviour
if (!_isAvatarInstantiated)
return; // no avatar
if (!_targetHeightChanged
&& _useTargetHeight)
ScaleAvatarRoot();
if (!_shouldForceHeight)
return; // using built-in scaling
if (!_targetHeightChanged)
return;
// called on state change
if (_targetHeightChanged)
{
if (_useTargetHeight)
ApplyTargetHeight();
else
ResetTargetHeight();
_targetHeightChanged = false;
InvokeTargetHeightChanged();
}
if (_useTargetHeight)
ApplyTargetHeight();
else
ResetTargetHeight();
// called constantly when forcing change
if (_shouldForceHeight)
ScaleAvatarRoot();
}
internal virtual void OnDestroy()
@ -241,7 +254,7 @@ public class BaseScaler : MonoBehaviour
}
#endregion
#region Component Scaling
internal static readonly Type[] scalableComponentTypes =

View file

@ -35,8 +35,8 @@ public class LocalScaler : BaseScaler
if (_animatorManager == null)
return;
_animatorManager.SetAnimatorParameter(ScaleFactorParameterName, _scaleFactor);
_animatorManager.SetAnimatorParameter(ScaleFactorParameterNameLocal, _scaleFactor);
_animatorManager.SetParameter(ScaleFactorParameterName, _scaleFactor);
_animatorManager.SetParameter(ScaleFactorParameterNameLocal, _scaleFactor);
}
public override void LateUpdate()
@ -84,7 +84,6 @@ public class LocalScaler : BaseScaler
// animation scale changed and now will override universal scaling
ResetTargetHeight();
InvokeAnimatedHeightOverride();
return true;
}

View file

@ -45,7 +45,7 @@ public class NetworkScaler : BaseScaler
protected override void UpdateAnimatorParameter()
{
_animatorManager?.SetAnimatorParameter(ScaleFactorParameterNameLocal, _scaleFactor);
_animatorManager?.SetParameter(ScaleFactorParameterNameLocal, _scaleFactor);
}
internal override void OnDestroy()

View file

@ -14,7 +14,7 @@ using System.Reflection;
nameof(NAK.AvatarScaleMod),
AssemblyInfoParams.Version,
AssemblyInfoParams.Author,
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/AvatarScale"
downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/AvatarScale"
)]
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]

View file

@ -4,10 +4,10 @@ Proof of concept mod to add Avatar Scaling to any avatar. This is local-only, bu
Legit threw this together in three hours. ChilloutVR handles all the hard stuff already with its existing animation-clip-based Avatar Scaling.
https://github.com/NotAKidOnSteam/NAK_CVR_Mods/assets/37721153/7405cef5-fd68-4103-8c18-b3164029eab1
https://github.com/NotAKidoS/NAK_CVR_Mods/assets/37721153/7405cef5-fd68-4103-8c18-b3164029eab1
## Notes:
* Constraint scaling partially conflicts with avatars run through my [Avatar Scale Tool](https://github.com/NotAKidOnSteam/AvatarScaleTool).
* Constraint scaling partially conflicts with avatars run through my [Avatar Scale Tool](https://github.com/NotAKidoS/AvatarScaleTool).
* This is local-only, at least unless I bother with Mod Network.
* The entire thing is pretty messy and I am unsure of the performance impact, especially with scaling all lights, audio, & constraints.

View file

@ -16,8 +16,8 @@
"requirements": [
"None"
],
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/AvatarScale.dll",
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/AvatarScale/",
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r3/AvatarScale.dll",
"sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/AvatarScale/",
"changelog": "",
"embedcolor": "9b59b6"
}