diff --git a/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.Exclusions.cs b/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.Exclusions.cs deleted file mode 100644 index cedbcdd..0000000 --- a/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.Exclusions.cs +++ /dev/null @@ -1,229 +0,0 @@ -using ABI.CCK.Components; -using UnityEngine; - -namespace NAK.AvatarCloneTest; - -public partial class AvatarClone -{ - #region Exclusions - - private FPRExclusion[] _exclusions; - - private void AddExclusionToHeadIfNeeded() - { - if (!TryGetComponent(out Animator animator) - || !animator.isHuman - || !animator.avatar - || !animator.avatar.isValid) - return; - - Transform head = animator.GetBoneTransform(HumanBodyBones.Head); - if (!head) - return; - - GameObject headGo = head.gameObject; - if (headGo.TryGetComponent(out FPRExclusion exclusion)) - return; - - exclusion = headGo.AddComponent(); - exclusion.target = head; - exclusion.isShown = false; - } - - private void InitializeExclusions() - { - _exclusions = GetComponentsInChildren(true); - var exclusionRoots = new Dictionary(_exclusions.Length); - - // **1. Precompute Exclusions** - foreach (FPRExclusion exclusion in _exclusions) - { - Transform target = exclusion.target ??= exclusion.transform; - if (exclusionRoots.ContainsKey(target) || !target.gameObject.scene.IsValid()) - continue; - - AvatarCloneExclusion behaviour = new AvatarCloneExclusion(this, target); - exclusion.behaviour = behaviour; - exclusionRoots.Add(target, behaviour); - } - - // Process Exclusion Transforms - Renderer ourRenderer; - - void ProcessTransformHierarchy(Transform current, Transform root, AvatarCloneExclusion behaviour) - { - if (exclusionRoots.ContainsKey(current) && current != root) return; - - behaviour.affectedTransforms.Add(current); - if (current.TryGetComponent(out ourRenderer)) - behaviour.affectedRenderers.Add(ourRenderer); - - for (int i = 0; i < current.childCount; i++) - { - Transform child = current.GetChild(i); - if (!exclusionRoots.ContainsKey(child)) - ProcessTransformHierarchy(child, root, behaviour); - } - } - - foreach (var entry in exclusionRoots) - { - Transform rootTransform = entry.Key; - AvatarCloneExclusion behaviour = entry.Value; - ProcessTransformHierarchy(rootTransform, rootTransform, behaviour); - behaviour.affectedTransformSet = new HashSet(behaviour.affectedTransforms); - } - - // ------------------------------ - // **OPTIMIZED EXCLUSION BONE MAPPING** - // ------------------------------ - - Dictionary.ValueCollection exclusionBehaviours = exclusionRoots.Values; - int skinnedCount = _skinnedClones.Count; - - // **2. Precompute Bone-to-Exclusion Mapping** - int estimatedBoneCount = skinnedCount * 20; // Estimated bones per skinned mesh - var boneToExclusion = new Dictionary>(estimatedBoneCount); - - foreach (AvatarCloneExclusion behaviour in exclusionBehaviours) - { - foreach (Transform bone in behaviour.affectedTransformSet) - { - if (!boneToExclusion.TryGetValue(bone, out var list)) - { - list = new List(2); - boneToExclusion[bone] = list; - } - list.Add(behaviour); - } - } - - // **3. Process Skinned Mesh Renderers** - for (int s = 0; s < skinnedCount; s++) - { - SkinnedMeshRenderer source = _skinnedRenderers[s]; - var bones = source.bones; // Cache bones array - - SkinnedMeshRenderer smr = _skinnedClones[s]; - int boneCount = bones.Length; - - for (int i = 0; i < boneCount; i++) - { - Transform bone = bones[i]; - - // **Skip if the bone isn't mapped to exclusions** - if (!bone // Skip null bones - || !boneToExclusion.TryGetValue(bone, out var behaviours)) - continue; - - // **Avoid redundant dictionary lookups** - for (int j = 0; j < behaviours.Count; j++) - { - AvatarCloneExclusion behaviour = behaviours[j]; - - if (!behaviour.skinnedToBoneIndex.TryGetValue(smr, out var indices)) - { - indices = new List(4); - behaviour.skinnedToBoneIndex[smr] = indices; - } - - indices.Add(i); - } - } - } - - ApplyInitialExclusionState(); - } - - public void ApplyInitialExclusionState() - { - foreach (FPRExclusion exclusion in _exclusions) - { - exclusion._wasShown = exclusion.isShown; - if (!exclusion.isShown) exclusion.UpdateExclusions(); - } - } - - public void HandleExclusionUpdate(AvatarCloneExclusion exclusion, bool isShown) - { -#if ENABLE_PROFILER - s_UpdateExclusions.Begin(); -#endif - - // **1. Update Renderer Visibility** - foreach (Renderer renderer in exclusion.affectedRenderers) - { - if (renderer is SkinnedMeshRenderer skinned) - { - int index = _skinnedRenderers.IndexOf(skinned); - if (index >= 0) _skinnedClones[index].gameObject.SetActive(isShown); - } - else if (renderer is MeshRenderer mesh) - { - int index = _meshRenderers.IndexOf(mesh); - if (index >= 0) - { - if (Setting_CloneMeshRenderers) - { - _meshClones[index].gameObject.SetActive(isShown); - } - else - { - // Other renderer (never cloned) - update shadow casting state - _sourceShouldBeHiddenFromFPR[index] = !isShown; // When hidden, use for shadows - } - } - } - else if (renderer) - { - int index = _otherRenderers.IndexOf(renderer); - if (index >= 0) - { - int shadowIndex = index + (Setting_CloneMeshRenderers ? _meshRenderers.Count : 0); - _sourceShouldBeHiddenFromFPR[shadowIndex] = !isShown; // When hidden, use for shadows - } - } - } - - // **2. Update Bone References in Skinned Mesh Renderers** - UpdateSkinnedMeshBones(exclusion, exclusion._shrinkBone, isShown); - -#if ENABLE_PROFILER - s_UpdateExclusions.End(); -#endif - } - - private void UpdateSkinnedMeshBones(AvatarCloneExclusion exclusion, Transform shrinkBone, bool isShown) - { -#if ENABLE_PROFILER - s_HandleBoneUpdates.Begin(); -#endif - - foreach (var smrEntry in exclusion.skinnedToBoneIndex) - { - SkinnedMeshRenderer smr = smrEntry.Key; - var indices = smrEntry.Value; - bool needsUpdate = false; - - var parentBones = smr.transform.parent.GetComponent().bones; - var cloneBones = smr.bones; - Array.Resize(ref cloneBones, parentBones.Length); - - // Only modify our bones, other exclusions may have modified others - for (int i = 0; i < indices.Count; i++) - { - int index = indices[i]; - if (!isShown) cloneBones[index] = shrinkBone; - else cloneBones[index] = parentBones[index]; - needsUpdate = true; - } - if (needsUpdate) smr.bones = cloneBones; - } - -#if ENABLE_PROFILER - s_HandleBoneUpdates.End(); -#endif - } - - #endregion Exclusions -} \ No newline at end of file diff --git a/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.Init.cs b/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.Init.cs deleted file mode 100644 index f02fe9b..0000000 --- a/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.Init.cs +++ /dev/null @@ -1,304 +0,0 @@ -using ABI_RC.Core.Player.ShadowClone; -using UnityEngine; -using UnityEngine.Rendering; - -namespace NAK.AvatarCloneTest; - -public partial class AvatarClone -{ - #region Initialization - - private void InitializeCollections() - { -#if ENABLE_PROFILER - s_InitializeData.Begin(); -#endif - - // Initialize source collections - _skinnedRenderers = new List(); - _blendShapeWeights = new List>(); - - _meshRenderers = new List(); - _meshFilters = new List(); - - _otherRenderers = new List(); - - // Initialize clone collections - _skinnedClones = new List(); - _skinnedCloneMaterials = new List(); - _skinnedCloneCullingMaterials = new List(); - - if (Setting_CloneMeshRenderers) - { - _meshClones = new List(); - _meshCloneFilters = new List(); - _meshCloneMaterials = new List(); - _meshCloneCullingMaterials = new List(); - } - - // Initialize shared resources - _materialWorkingList = new List(); - _propertyBlock = new MaterialPropertyBlock(); - -#if ENABLE_PROFILER - s_InitializeData.End(); -#endif - } - - private void CollectRenderers() - { - #if ENABLE_PROFILER - s_InitializeData.Begin(); - #endif - - var renderers = GetComponentsInChildren(true); - var currentIndex = 0; - var nonCloned = 0; - - // Single pass: directly categorize renderers - foreach (Renderer renderer in renderers) - { - switch (renderer) - { - case SkinnedMeshRenderer skinned when skinned.sharedMesh != null: - AddSkinnedRenderer(skinned); - currentIndex++; - break; - - case MeshRenderer mesh: - MeshFilter filter = mesh.GetComponent(); - if (filter != null && filter.sharedMesh != null) - { - if (Setting_CloneMeshRenderers) - { - AddMeshRenderer(mesh, filter); - } - else - { - AddMeshRenderer(mesh, filter); - nonCloned++; - } - currentIndex++; - } - break; - - default: - AddOtherRenderer(renderer); - currentIndex++; - nonCloned++; - break; - } - } - - _rendererActiveStates = new bool[currentIndex]; - _originalShadowCastingMode = new ShadowCastingMode[currentIndex]; - _sourceShouldBeHiddenFromFPR = new bool[nonCloned]; - - #if ENABLE_PROFILER - s_InitializeData.End(); - #endif - } - - private void AddSkinnedRenderer(SkinnedMeshRenderer renderer) - { -#if ENABLE_PROFILER - s_AddRenderer.Begin(); -#endif - - _skinnedRenderers.Add(renderer); - - // Clone materials array for clone renderer - var materials = renderer.sharedMaterials; - var cloneMaterials = new Material[materials.Length]; - for (int i = 0; i < materials.Length; i++) cloneMaterials[i] = materials[i]; - _skinnedCloneMaterials.Add(cloneMaterials); - - // Cache culling materials - var cullingMaterialArray = new Material[materials.Length]; -#if !UNITY_EDITOR - for (int i = 0; i < materials.Length; i++) cullingMaterialArray[i] = ShadowCloneUtils.cullingMaterial; -#else - for (int i = 0; i < materials.Length; i++) cullingMaterialArray[i] = cullingMaterial; -#endif - _skinnedCloneCullingMaterials.Add(cullingMaterialArray); - - // Cache blend shape weights - var weights = new List(renderer.sharedMesh.blendShapeCount); - for (int i = 0; i < renderer.sharedMesh.blendShapeCount; i++) weights.Add(0f); - _blendShapeWeights.Add(weights); - -#if ENABLE_PROFILER - s_AddRenderer.End(); -#endif - } - - private void AddMeshRenderer(MeshRenderer renderer, MeshFilter filter) - { -#if ENABLE_PROFILER - s_AddRenderer.Begin(); -#endif - - _meshRenderers.Add(renderer); - _meshFilters.Add(filter); - - if (!Setting_CloneMeshRenderers) return; - - // Clone materials array for clone renderer - var materials = renderer.sharedMaterials; - var cloneMaterials = new Material[materials.Length]; - for (int i = 0; i < materials.Length; i++) cloneMaterials[i] = materials[i]; - _meshCloneMaterials.Add(cloneMaterials); - - // Cache culling materials - var cullingMaterialArray = new Material[materials.Length]; -#if !UNITY_EDITOR - for (int i = 0; i < materials.Length; i++) cullingMaterialArray[i] = ShadowCloneUtils.cullingMaterial; -#else - for (int i = 0; i < materials.Length; i++) cullingMaterialArray[i] = cullingMaterial; -#endif - _meshCloneCullingMaterials.Add(cullingMaterialArray); - -#if ENABLE_PROFILER - s_AddRenderer.End(); -#endif - } - - private void AddOtherRenderer(Renderer renderer) - { -#if ENABLE_PROFILER - s_AddRenderer.Begin(); -#endif - _otherRenderers.Add(renderer); -#if ENABLE_PROFILER - s_AddRenderer.End(); -#endif - } - - private void CreateClones() - { -#if ENABLE_PROFILER - s_InitializeData.Begin(); -#endif - - // Always create skinned mesh clones - int skinnedCount = _skinnedRenderers.Count; - for (int i = 0; i < skinnedCount; i++) - { - CreateSkinnedClone(i); - } - - // Optionally create mesh clones - if (Setting_CloneMeshRenderers) - { - int meshCount = _meshRenderers.Count; - for (int i = 0; i < meshCount; i++) - { - CreateMeshClone(i); - } - } - -#if ENABLE_PROFILER - s_InitializeData.End(); -#endif - } - - private void CreateSkinnedClone(int index) - { -#if ENABLE_PROFILER - s_CreateClone.Begin(); -#endif - - SkinnedMeshRenderer source = _skinnedRenderers[index]; - - GameObject clone = new(source.name + "_Clone") - { - layer = CLONE_LAYER - }; - - clone.transform.SetParent(source.transform, false); - - SkinnedMeshRenderer cloneRenderer = clone.AddComponent(); - - // Basic setup - cloneRenderer.sharedMaterials = _skinnedCloneMaterials[index]; - cloneRenderer.shadowCastingMode = ShadowCastingMode.Off; - cloneRenderer.probeAnchor = source.probeAnchor; - cloneRenderer.sharedMesh = source.sharedMesh; - cloneRenderer.rootBone = source.rootBone; - cloneRenderer.bones = source.bones; - -#if !UNITY_EDITOR - cloneRenderer.localBounds = new Bounds(source.localBounds.center, source.localBounds.size * 2f); -#endif - - // Quality settings - cloneRenderer.motionVectorGenerationMode = MotionVectorGenerationMode.ForceNoMotion; - cloneRenderer.allowOcclusionWhenDynamic = false; - cloneRenderer.updateWhenOffscreen = false; - cloneRenderer.skinnedMotionVectors = false; - cloneRenderer.forceMatrixRecalculationPerRender = false; - cloneRenderer.quality = SkinQuality.Bone4; - - source.motionVectorGenerationMode = MotionVectorGenerationMode.ForceNoMotion; - source.allowOcclusionWhenDynamic = false; - source.updateWhenOffscreen = false; - source.skinnedMotionVectors = false; - source.forceMatrixRecalculationPerRender = false; - source.quality = SkinQuality.Bone4; - - // Add to clone list - _skinnedClones.Add(cloneRenderer); - -#if ENABLE_PROFILER - s_CreateClone.End(); -#endif - } - - private void CreateMeshClone(int index) - { -#if ENABLE_PROFILER - s_CreateClone.Begin(); -#endif - - MeshRenderer source = _meshRenderers[index]; - MeshFilter sourceFilter = _meshFilters[index]; - - GameObject clone = new(source.name + "_Clone") - { - layer = CLONE_LAYER - }; - - clone.transform.SetParent(source.transform, false); - - MeshRenderer cloneRenderer = clone.AddComponent(); - MeshFilter cloneFilter = clone.AddComponent(); - - // Basic setup - cloneRenderer.sharedMaterials = _meshCloneMaterials[index]; - cloneRenderer.shadowCastingMode = ShadowCastingMode.Off; - cloneRenderer.probeAnchor = source.probeAnchor; - -#if !UNITY_EDITOR - cloneRenderer.localBounds = new Bounds(source.localBounds.center, source.localBounds.size * 2f); -#endif - - cloneFilter.sharedMesh = sourceFilter.sharedMesh; - - // Quality settings - cloneRenderer.motionVectorGenerationMode = MotionVectorGenerationMode.ForceNoMotion; - cloneRenderer.allowOcclusionWhenDynamic = false; - - source.motionVectorGenerationMode = MotionVectorGenerationMode.ForceNoMotion; - source.allowOcclusionWhenDynamic = false; - - // Add to clone lists - _meshClones.Add(cloneRenderer); - _meshCloneFilters.Add(cloneFilter); - -#if ENABLE_PROFILER - s_CreateClone.End(); -#endif - } - - #endregion Initialization -} \ No newline at end of file diff --git a/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.RenderState.cs b/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.RenderState.cs deleted file mode 100644 index 40c1df7..0000000 --- a/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.RenderState.cs +++ /dev/null @@ -1,212 +0,0 @@ -using UnityEngine; -using UnityEngine.Rendering; - -namespace NAK.AvatarCloneTest; - -public partial class AvatarClone -{ - #region Render State Management - - private void MyOnPreCull(Camera cam) - { -#if UNITY_EDITOR - // Scene & Preview cameras are not needed - if (cam.cameraType != CameraType.Game) - return; -#endif - -#if ENABLE_PROFILER - s_PreCullUpdate.Begin(); -#endif - - bool isOurUiCamera = IsUIInternalCamera(cam); - bool rendersOurPlayerLayer = CameraRendersPlayerLocalLayer(cam); - bool rendersOurCloneLayer = CameraRendersPlayerCloneLayer(cam); - - bool rendersBothPlayerLayers = rendersOurPlayerLayer && rendersOurCloneLayer; - - // Handle shadow casting when camera renders both layers - if (!_sourcesSetForShadowCasting - && rendersBothPlayerLayers) - { - ConfigureSourceShadowCasting(true); - _sourcesSetForShadowCasting = true; - } - else if (_sourcesSetForShadowCasting && !rendersBothPlayerLayers) - { - ConfigureSourceShadowCasting(false); - _sourcesSetForShadowCasting = false; - } - - // Handle UI culling for clone layer - if (!_clonesSetForUiCulling - && isOurUiCamera && rendersOurCloneLayer) - { - ConfigureCloneUICulling(true); - _clonesSetForUiCulling = true; - } - else if (_clonesSetForUiCulling) - { - ConfigureCloneUICulling(false); - _clonesSetForUiCulling = false; - } - -#if ENABLE_PROFILER - s_PreCullUpdate.End(); -#endif - } - - private void ConfigureSourceShadowCasting(bool setSourcesToShadowCast) - { -#if ENABLE_PROFILER - s_ConfigureShadowCasting.Begin(); -#endif - - int currentIndex = 0; - int shadowArrayIndex = 0; - - // Handle skinned mesh renderers (always have clones) - int skinnedCount = _skinnedRenderers.Count; - for (int i = 0; i < skinnedCount; i++, currentIndex++) - { - if (!_rendererActiveStates[currentIndex]) continue; - - SkinnedMeshRenderer source = _skinnedRenderers[i]; - - if (setSourcesToShadowCast) - { - ShadowCastingMode originalMode = _originalShadowCastingMode[currentIndex] = source.shadowCastingMode; - if (originalMode == ShadowCastingMode.Off) - source.forceRenderingOff = true; - else - source.shadowCastingMode = ShadowCastingMode.ShadowsOnly; - } - else - { - source.shadowCastingMode = _originalShadowCastingMode[currentIndex]; - source.forceRenderingOff = false; - } - } - - // Handle mesh renderers based on clone setting - if (Setting_CloneMeshRenderers) - { - int meshCount = _meshRenderers.Count; - for (int i = 0; i < meshCount; i++, currentIndex++) - { - if (!_rendererActiveStates[currentIndex]) continue; - - MeshRenderer source = _meshRenderers[i]; - - if (setSourcesToShadowCast) - { - ShadowCastingMode originalMode = _originalShadowCastingMode[currentIndex] = source.shadowCastingMode; - if (originalMode == ShadowCastingMode.Off) - source.forceRenderingOff = true; - else - source.shadowCastingMode = ShadowCastingMode.ShadowsOnly; - } - else - { - source.shadowCastingMode = _originalShadowCastingMode[currentIndex]; - source.forceRenderingOff = false; - } - } - } - else - { - // When not cloned, mesh renderers use the shadow casting array - int meshCount = _meshRenderers.Count; - for (int i = 0; i < meshCount; i++, shadowArrayIndex++, currentIndex++) - { - if (!_rendererActiveStates[currentIndex]) continue; - if (!_sourceShouldBeHiddenFromFPR[shadowArrayIndex]) continue; - - MeshRenderer source = _meshRenderers[i]; - - if (setSourcesToShadowCast) - { - ShadowCastingMode originalMode = _originalShadowCastingMode[currentIndex] = source.shadowCastingMode; - if (originalMode == ShadowCastingMode.Off) - source.forceRenderingOff = true; - else - source.shadowCastingMode = ShadowCastingMode.ShadowsOnly; - } - else - { - source.shadowCastingMode = _originalShadowCastingMode[currentIndex]; - source.forceRenderingOff = false; - } - } - } - - // Handle other renderers (never cloned) - int otherCount = _otherRenderers.Count; - for (int i = 0; i < otherCount; i++, shadowArrayIndex++, currentIndex++) - { - if (!_rendererActiveStates[currentIndex]) continue; - if (!_sourceShouldBeHiddenFromFPR[shadowArrayIndex]) continue; - - Renderer source = _otherRenderers[i]; - - if (setSourcesToShadowCast) - { - ShadowCastingMode originalMode = _originalShadowCastingMode[currentIndex] = source.shadowCastingMode; - if (originalMode == ShadowCastingMode.Off) - source.forceRenderingOff = true; - else - source.shadowCastingMode = ShadowCastingMode.ShadowsOnly; - } - else - { - source.shadowCastingMode = _originalShadowCastingMode[currentIndex]; - source.forceRenderingOff = false; - } - } - -#if ENABLE_PROFILER - s_ConfigureShadowCasting.End(); -#endif - } - - private void ConfigureCloneUICulling(bool enableCulling) - { -#if ENABLE_PROFILER - s_ConfigureUICulling.Begin(); -#endif - - // Set the materials to our culling materials - int currentIndex = 0; - - int skinnedCount = _skinnedRenderers.Count; - for (int i = 0; i < skinnedCount; i++, currentIndex++) - { - if (!_rendererActiveStates[currentIndex]) - continue; - - _skinnedClones[i].sharedMaterials = enableCulling ? - _skinnedCloneCullingMaterials[i] : - _skinnedCloneMaterials[i]; - } - - if (Setting_CloneMeshRenderers) - { - int meshCount = _meshRenderers.Count; - for (int i = 0; i < meshCount; i++, currentIndex++) - { - if (!_rendererActiveStates[currentIndex]) - continue; - - _meshClones[i].sharedMaterials = enableCulling ? - _meshCloneCullingMaterials[i] : - _meshCloneMaterials[i]; - } - } - -#if ENABLE_PROFILER - s_ConfigureUICulling.End(); -#endif - } - - #endregion Render State Management -} \ No newline at end of file diff --git a/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.StateSync.cs b/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.StateSync.cs deleted file mode 100644 index eb70282..0000000 --- a/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.StateSync.cs +++ /dev/null @@ -1,156 +0,0 @@ -using UnityEngine; - -namespace NAK.AvatarCloneTest; - -public partial class AvatarClone -{ - #region State Syncing - - private void SyncEnabledState() - { -#if ENABLE_PROFILER - s_CopyEnabledState.Begin(); -#endif - - int currentIndex = 0; - - // Update skinned mesh renderers - int skinnedCount = _skinnedRenderers.Count; - for (int i = 0; i < skinnedCount; i++, currentIndex++) - { - SkinnedMeshRenderer source = _skinnedRenderers[i]; - _skinnedClones[i].enabled = _rendererActiveStates[currentIndex] = IsRendererActive(source); - } - - // Update mesh renderers - int meshCount = _meshRenderers.Count; - for (int i = 0; i < meshCount; i++, currentIndex++) - { - MeshRenderer source = _meshRenderers[i]; - if (Setting_CloneMeshRenderers) _meshClones[i].enabled = _rendererActiveStates[currentIndex] = IsRendererActive(source); - else _rendererActiveStates[currentIndex] = IsRendererActive(source); - } - - // Update other renderers - int otherCount = _otherRenderers.Count; - for (int i = 0; i < otherCount; i++, currentIndex++) - { - Renderer source = _otherRenderers[i]; - _rendererActiveStates[currentIndex] = IsRendererActive(source); - } - -#if ENABLE_PROFILER - s_CopyEnabledState.End(); -#endif - } - - private void SyncMaterials() - { -#if ENABLE_PROFILER - s_CopyMaterials.Begin(); -#endif - int currentIndex = 0; - - // Sync skinned mesh materials - int skinnedCount = _skinnedRenderers.Count; - for (int i = 0; i < skinnedCount; i++, currentIndex++) - { - if (!_rendererActiveStates[currentIndex]) - continue; - - CopyMaterialsAndProperties( - _skinnedRenderers[i], - _skinnedClones[i], - _propertyBlock, - _materialWorkingList, - _skinnedCloneMaterials[i]); - } - - // Sync mesh materials if enabled - if (Setting_CloneMeshRenderers) - { - int meshCount = _meshRenderers.Count; - for (int i = 0; i < meshCount; i++, currentIndex++) - { - if (!_rendererActiveStates[currentIndex]) - continue; - - CopyMaterialsAndProperties( - _meshRenderers[i], - _meshClones[i], - _propertyBlock, - _materialWorkingList, - _meshCloneMaterials[i]); - } - } - -#if ENABLE_PROFILER - s_CopyMaterials.End(); -#endif - } - - private void SyncBlendShapes() - { -#if ENABLE_PROFILER - s_CopyBlendShapes.Begin(); -#endif - - int skinnedCount = _skinnedRenderers.Count; - for (int i = 0; i < skinnedCount; i++) - { - SkinnedMeshRenderer source = _skinnedRenderers[i]; - if (!_rendererActiveStates[i]) - continue; - - CopyBlendShapes( - source, - _skinnedClones[i], - _blendShapeWeights[i]); - } - -#if ENABLE_PROFILER - s_CopyBlendShapes.End(); -#endif - } - - private static void CopyMaterialsAndProperties( - Renderer source, - Renderer clone, - MaterialPropertyBlock propertyBlock, - List workingList, - Material[] cloneMaterials) - { - source.GetSharedMaterials(workingList); - - int matCount = workingList.Count; - bool hasChanged = false; - - for (int i = 0; i < matCount; i++) - { - if (ReferenceEquals(workingList[i], cloneMaterials[i])) continue; - cloneMaterials[i] = workingList[i]; - hasChanged = true; - } - if (hasChanged) clone.sharedMaterials = cloneMaterials; - - source.GetPropertyBlock(propertyBlock); - clone.SetPropertyBlock(propertyBlock); - } - - private static void CopyBlendShapes( - SkinnedMeshRenderer source, - SkinnedMeshRenderer clone, - List weights) - { - int weightCount = weights.Count; - for (int i = 0; i < weightCount; i++) - { - float weight = source.GetBlendShapeWeight(i); - // ReSharper disable once CompareOfFloatsByEqualityOperator - if (weight == weights[i]) continue; // Halves the work - clone.SetBlendShapeWeight(i, weights[i] = weight); - } - } - - #endregion State Syncing -} \ No newline at end of file diff --git a/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.Util.cs b/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.Util.cs deleted file mode 100644 index 63f0d45..0000000 --- a/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.Util.cs +++ /dev/null @@ -1,81 +0,0 @@ -using ABI_RC.Core.Player; -using MagicaCloth; -using MagicaCloth2; -using UnityEngine; - -namespace NAK.AvatarCloneTest; - -public partial class AvatarClone -{ - #region Utilities - - private static bool IsRendererActive(Renderer renderer) - => renderer && renderer.enabled && renderer.gameObject.activeInHierarchy; - - private static bool CameraRendersPlayerLocalLayer(Camera cam) - => (cam.cullingMask & (1 << LOCAL_LAYER)) != 0; - - private static bool CameraRendersPlayerCloneLayer(Camera cam) - => (cam.cullingMask & (1 << CLONE_LAYER)) != 0; - - private static bool IsUIInternalCamera(Camera cam) -#if !UNITY_EDITOR - => cam == PlayerSetup.Instance.activeUiCam; -#else - => cam.gameObject.layer == 15; -#endif - - #endregion Utilities - - #region Magica Cloth Support - - private void SetupMagicaClothSupport() - { - var magicaCloths1 = GetComponentsInChildren(true); - foreach (BaseCloth magicaCloth1 in magicaCloths1) - magicaCloth1.SetCullingMode(PhysicsTeam.TeamCullingMode.Off); - - var magicaCloths2 = base.GetComponentsInChildren(true); - foreach (MagicaCloth2.MagicaCloth magicaCloth2 in magicaCloths2) - magicaCloth2.serializeData.cullingSettings.cameraCullingMode = CullingSettings.CameraCullingMode.AnimatorLinkage; - } - - public void OnMagicaClothMeshSwapped(Renderer render, Mesh newMesh) - { - switch (render) - { - case MeshRenderer mesh: - { - int index = _meshRenderers.IndexOf(mesh); - if (index != -1) _meshCloneFilters[index].sharedMesh = newMesh; - break; - } - case SkinnedMeshRenderer skinned: - { - int index = _skinnedRenderers.IndexOf(skinned); - if (index != -1) - { - // Copy the mesh - _skinnedClones[index].sharedMesh = newMesh; - - // Copy appended bones if count is different - var cloneBones = _skinnedClones[index].bones; // alloc - var sourceBones = skinned.bones; // alloc - - int cloneBoneCount = cloneBones.Length; - int sourceBoneCount = sourceBones.Length; - if (cloneBoneCount != sourceBoneCount) - { - // Copy the new bones only - Array.Resize(ref cloneBones, sourceBoneCount); - for (int i = cloneBoneCount; i < sourceBoneCount; i++) cloneBones[i] = sourceBones[i]; - _skinnedClones[index].bones = cloneBones; - } - } - break; - } - } - } - - #endregion Magica Cloth Support -} \ No newline at end of file diff --git a/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.cs b/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.cs deleted file mode 100644 index ed15ec1..0000000 --- a/.Deprecated/AvatarCloneTest/AvatarClone/AvatarClone.cs +++ /dev/null @@ -1,147 +0,0 @@ -using NAK.AvatarCloneTest; -using UnityEngine; -using UnityEngine.Rendering; - -namespace NAK.AvatarCloneTest; - -public partial class AvatarClone : MonoBehaviour -{ - #region Constants - - private const int LOCAL_LAYER = 8; - private const int CLONE_LAYER = 9; - - #endregion Constants - - #region Profiler Markers - -#if ENABLE_PROFILER - private static readonly ProfilerMarker s_CopyEnabledState = new($"{nameof(AvatarClone)}.{nameof(SyncEnabledState)}"); - private static readonly ProfilerMarker s_CopyMaterials = new($"{nameof(AvatarClone)}.{nameof(CopyMaterialsAndProperties)}"); - private static readonly ProfilerMarker s_CopyBlendShapes = new($"{nameof(AvatarClone)}.{nameof(CopyBlendShapes)}"); - private static readonly ProfilerMarker s_InitializeData = new($"{nameof(AvatarClone)}.Initialize"); - private static readonly ProfilerMarker s_UpdateExclusions = new($"{nameof(AvatarClone)}.{nameof(HandleExclusionUpdate)}"); - private static readonly ProfilerMarker s_CollectExclusionData = new($"{nameof(AvatarClone)}.{nameof(CollectExclusionData)}"); - private static readonly ProfilerMarker s_HandleBoneUpdates = new($"{nameof(AvatarClone)}.{nameof(UpdateSkinnedMeshBones)}"); - private static readonly ProfilerMarker s_PreCullUpdate = new($"{nameof(AvatarClone)}.{nameof(MyOnPreCull)}"); - private static readonly ProfilerMarker s_ConfigureShadowCasting = new($"{nameof(AvatarClone)}.{nameof(ConfigureSourceShadowCasting)}"); - private static readonly ProfilerMarker s_ConfigureUICulling = new($"{nameof(AvatarClone)}.{nameof(ConfigureCloneUICulling)}"); - private static readonly ProfilerMarker s_AddRenderer = new($"{nameof(AvatarClone)}.AddRenderer"); - private static readonly ProfilerMarker s_CreateClone = new($"{nameof(AvatarClone)}.CreateClone"); -#endif - - #endregion Profiler Markers - - #region Settings - - public bool Setting_CloneMeshRenderers; - public bool Setting_CopyMaterials = true; - public bool Setting_CopyBlendShapes = true; - - #endregion Settings - - #region Source Collections - Cloned Renderers - - // Skinned mesh renderers (always cloned) - private List _skinnedRenderers; - private List> _blendShapeWeights; - - // Mesh renderers (optionally cloned) - private List _meshRenderers; - private List _meshFilters; - - #endregion Source Collections - Cloned Renderers - - #region Source Collections - Non-Cloned Renderers - - // All other renderers (never cloned) - private List _otherRenderers; - - // True if source renderer should hide. False if source renderer should show. - // Only used for non-cloned renderers (MeshRenderers and other Renderers). - private bool[] _sourceShouldBeHiddenFromFPR; - // Three states: On, ShadowsOnly, Off - private ShadowCastingMode[] _originalShadowCastingMode; - - #endregion Source Collections - Non-Cloned Renderers - - #region Clone Collections - - // Skinned mesh clones - private List _skinnedClones; - private List _skinnedCloneMaterials; - private List _skinnedCloneCullingMaterials; - - // Mesh clones (optional) - private List _meshClones; - private List _meshCloneFilters; - private List _meshCloneMaterials; - private List _meshCloneCullingMaterials; - - #endregion Clone Collections - - #region Shared Resources - - private List _materialWorkingList; // Used for GetSharedMaterials - private MaterialPropertyBlock _propertyBlock; - - #endregion Shared Resources - - #region State - - private bool _sourcesSetForShadowCasting; - private bool _clonesSetForUiCulling; - private bool[] _rendererActiveStates; - - #endregion State - - #region Unity Events - - private void Start() - { - Setting_CloneMeshRenderers = AvatarCloneTestMod.EntryCloneMeshRenderers.Value; - - InitializeCollections(); - CollectRenderers(); - CreateClones(); - AddExclusionToHeadIfNeeded(); - InitializeExclusions(); - SetupMagicaClothSupport(); - - // bool animatesClone = transform.Find("[ExplicitlyAnimatesVisualClones]") != null; - // Setting_CopyMaterials = !animatesClone; - // Setting_CopyBlendShapes = !animatesClone; - // Animator animator = GetComponent(); - // if (animator && animatesClone) animator.Rebind(); - - // Likely a Unity bug with where we can touch shadowCastingMode & forceRenderingOff -#if !UNITY_EDITOR - Camera.onPreCull += MyOnPreCull; -#else - Camera.onPreRender += MyOnPreCull; -#endif - } - - private void LateUpdate() - { - SyncEnabledState(); - - if (Setting_CopyMaterials && AvatarCloneTestMod.EntryCopyMaterials.Value) - SyncMaterials(); - - if (Setting_CopyBlendShapes && AvatarCloneTestMod.EntryCopyBlendShapes.Value) - SyncBlendShapes(); - } - - private void OnDestroy() - { - // Likely a Unity bug with where we can touch shadowCastingMode & forceRenderingOff -#if !UNITY_EDITOR - Camera.onPreCull -= MyOnPreCull; -#else - Camera.onPreRender -= MyOnPreCull; -#endif - } - - #endregion Unity Events -} \ No newline at end of file diff --git a/.Deprecated/AvatarCloneTest/Patches.cs b/.Deprecated/AvatarCloneTest/Patches.cs deleted file mode 100644 index ecd64c5..0000000 --- a/.Deprecated/AvatarCloneTest/Patches.cs +++ /dev/null @@ -1,22 +0,0 @@ -using ABI_RC.Core; -using ABI_RC.Core.Player; -using ABI_RC.Core.Player.TransformHider; -using ABI_RC.Core.Savior; -using ABI_RC.Systems.Camera; -using HarmonyLib; -using UnityEngine; - -namespace NAK.AvatarCloneTest; - -public static class Patches -{ - [HarmonyPrefix] - [HarmonyPatch(typeof(TransformHiderUtils), nameof(TransformHiderUtils.SetupAvatar))] - private static bool OnSetupAvatar(GameObject avatar) - { - if (!AvatarCloneTestMod.EntryUseAvatarCloneTest.Value) return true; - avatar.AddComponent(); - return false; - } -} - \ No newline at end of file diff --git a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_Utils.cs b/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_Utils.cs deleted file mode 100644 index 9c9eb20..0000000 --- a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_Utils.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System.Reflection; -using BTKUILib; -using BTKUILib.UIObjects; -using BTKUILib.UIObjects.Components; -using MelonLoader; -using UnityEngine; - -namespace NAK.AvatarScaleMod.Integrations; - -public static partial class BtkUiAddon -{ - #region Melon Preference Helpers - - private static ToggleButton AddMelonToggle(ref Category category, MelonPreferences_Entry entry) - { - ToggleButton toggle = category.AddToggle(entry.DisplayName, entry.Description, entry.Value); - toggle.OnValueUpdated += b => entry.Value = b; - return toggle; - } - - private static SliderFloat AddMelonSlider(ref Category category, MelonPreferences_Entry entry, float min, - float max, int decimalPlaces = 2, bool allowReset = true) - { - SliderFloat slider = category.AddSlider(entry.DisplayName, entry.Description, - Mathf.Clamp(entry.Value, min, max), min, max, decimalPlaces, entry.DefaultValue, allowReset); - slider.OnValueUpdated += f => entry.Value = f; - return slider; - } - - private static Button AddMelonStringInput(ref Category category, MelonPreferences_Entry entry, string buttonIcon = "", ButtonStyle buttonStyle = ButtonStyle.TextOnly) - { - Button button = category.AddButton(entry.DisplayName, buttonIcon, entry.Description, buttonStyle); - button.OnPress += () => QuickMenuAPI.OpenKeyboard(entry.Value, s => entry.Value = s); - return button; - } - - private static Button AddMelonNumberInput(ref Category category, MelonPreferences_Entry entry, string buttonIcon = "", ButtonStyle buttonStyle = ButtonStyle.TextOnly) - { - Button button = category.AddButton(entry.DisplayName, buttonIcon, entry.Description, buttonStyle); - button.OnPress += () => QuickMenuAPI.OpenNumberInput(entry.DisplayName, entry.Value, f => entry.Value = f); - return button; - } - - // private static SliderFloat AddMelonSlider(ref Page page, MelonPreferences_Entry entry, float min, float max, int decimalPlaces = 2, bool allowReset = true) - // { - // SliderFloat slider = page.AddSlider(entry.DisplayName, entry.Description, Mathf.Clamp(entry.Value, min, max), min, max, decimalPlaces, entry.DefaultValue, allowReset); - // slider.OnValueUpdated += f => entry.Value = f; - // return slider; - // } - - /// - /// Helper method to create a category that saves its collapsed state to a MelonPreferences entry. - /// - /// - /// - /// - /// - private static Category AddMelonCategory(ref Page page, MelonPreferences_Entry entry, bool showHeader = true) - { - Category category = page.AddCategory(entry.DisplayName, showHeader, true, entry.Value); - category.OnCollapse += b => entry.Value = b; - return category; - } - - #endregion - - #region Icon Utils - - private static Stream GetIconStream(string iconName) - { - Assembly assembly = Assembly.GetExecutingAssembly(); - string assemblyName = assembly.GetName().Name; - return assembly.GetManifestResourceStream($"{assemblyName}.resources.{iconName}"); - } - - #endregion -} \ No newline at end of file diff --git a/.Deprecated/CVRGizmos/Popcron.Gizmos/Constants.cs b/.Deprecated/CVRGizmos/Popcron.Gizmos/Constants.cs deleted file mode 100644 index 56f8ef4..0000000 --- a/.Deprecated/CVRGizmos/Popcron.Gizmos/Constants.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Popcron; - -public class Constants -{ - public const string UniqueIdentifier = "Popcron.Gizmos"; - public const string EnabledKey = UniqueIdentifier + ".Enabled"; -} \ No newline at end of file diff --git a/.Deprecated/CVRGizmos/Popcron.Gizmos/Drawers/LineDrawer.cs b/.Deprecated/CVRGizmos/Popcron.Gizmos/Drawers/LineDrawer.cs deleted file mode 100644 index 0f17498..0000000 --- a/.Deprecated/CVRGizmos/Popcron.Gizmos/Drawers/LineDrawer.cs +++ /dev/null @@ -1,18 +0,0 @@ -using UnityEngine; - -namespace Popcron; - -public class LineDrawer : Drawer -{ - public LineDrawer() - { - - } - - public override int Draw(ref Vector3[] buffer, params object[] args) - { - buffer[0] = (Vector3)args[0]; - buffer[1] = (Vector3)args[1]; - return 2; - } -} \ No newline at end of file diff --git a/.Deprecated/CVRGizmos/Popcron.Gizmos/Element.cs b/.Deprecated/CVRGizmos/Popcron.Gizmos/Element.cs deleted file mode 100644 index 1ea97d5..0000000 --- a/.Deprecated/CVRGizmos/Popcron.Gizmos/Element.cs +++ /dev/null @@ -1,11 +0,0 @@ -using UnityEngine; - -namespace Popcron; - -internal class Element -{ - public Vector3[] points = { }; - public Color color = Color.white; - public bool dashed = false; - public Matrix4x4 matrix = Matrix4x4.identity; -} \ No newline at end of file diff --git a/.Deprecated/ControlToUnlockMouse/ControlToUnlockMouse.csproj b/.Deprecated/ControlToUnlockMouse/ControlToUnlockMouse.csproj deleted file mode 100644 index 0f08b56..0000000 --- a/.Deprecated/ControlToUnlockMouse/ControlToUnlockMouse.csproj +++ /dev/null @@ -1,6 +0,0 @@ - - - - SpawnableReceiveOwnChanges - - diff --git a/.Deprecated/ControlToUnlockMouse/Main.cs b/.Deprecated/ControlToUnlockMouse/Main.cs deleted file mode 100644 index 4ca9845..0000000 --- a/.Deprecated/ControlToUnlockMouse/Main.cs +++ /dev/null @@ -1,308 +0,0 @@ -using ABI_RC.Core; -using ABI_RC.Core.InteractionSystem; -using ABI_RC.Core.InteractionSystem.Base; -using ABI_RC.Core.Player; -using System.Reflection; -using cohtml.Net; -using HarmonyLib; -using UnityEngine; -using MelonLoader; -using Object = UnityEngine.Object; - -namespace NAK.ControlToUnlockMouse; - -public class ControlToUnlockMouseMod : MelonMod -{ - private static readonly MelonPreferences_Category Category = - MelonPreferences.CreateCategory(nameof(ControlToUnlockMouseMod)); - - internal static readonly MelonPreferences_Entry EntryOriginPivotPoint = - Category.CreateEntry("no_rotate_pivot_point", NoRotatePivotPoint.Pickupable, - "NoRotation Pickupable Pivot Point", "The pivot point to use when no rotation object is grabbed."); - - public enum NoRotatePivotPoint - { - Pickupable, - AvatarHead, - AvatarChest, - AvatarClosestShoulder, - } - - public override void OnInitializeMelon() - { - HarmonyInstance.Patch( - typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.Awake), - BindingFlags.NonPublic | BindingFlags.Instance), - postfix: new HarmonyMethod(typeof(ControlToUnlockMouseMod).GetMethod(nameof(OnPlayerSetupAwake), - BindingFlags.NonPublic | BindingFlags.Static)) - ); - - HarmonyInstance.Patch( - typeof(CVR_MenuManager).GetMethod(nameof(CVR_MenuManager.Start), - BindingFlags.NonPublic | BindingFlags.Instance), - postfix: new HarmonyMethod(typeof(ControlToUnlockMouseMod).GetMethod(nameof(OnMenuManagerStart), - BindingFlags.NonPublic | BindingFlags.Static)) - ); - - HarmonyInstance.Patch( - typeof(ControllerRay).GetMethod(nameof(ControllerRay.HandleUnityUI), - BindingFlags.NonPublic | BindingFlags.Instance), - prefix: new HarmonyMethod(typeof(ControlToUnlockMouseMod).GetMethod(nameof(OnControllerRayHandleUnityUIDirectAndIndirect), - BindingFlags.NonPublic | BindingFlags.Static)) - ); - - HarmonyInstance.Patch( - typeof(ControllerRay).GetMethod(nameof(ControllerRay.HandleIndirectUnityUI), - BindingFlags.NonPublic | BindingFlags.Instance), - prefix: new HarmonyMethod(typeof(ControlToUnlockMouseMod).GetMethod(nameof(OnControllerRayHandleUnityUIDirectAndIndirect), - BindingFlags.NonPublic | BindingFlags.Static)) - ); - - HarmonyInstance.Patch( - typeof(ControllerRay).GetMethod(nameof(ControllerRay.LateUpdate), - BindingFlags.NonPublic | BindingFlags.Instance), - prefix: new HarmonyMethod(typeof(ControlToUnlockMouseMod).GetMethod(nameof(OnPreControllerRayLateUpdate), - BindingFlags.NonPublic | BindingFlags.Static)), - postfix: new HarmonyMethod(typeof(ControlToUnlockMouseMod).GetMethod(nameof(OnPostControllerRayLateUpdate), - BindingFlags.NonPublic | BindingFlags.Static)) - ); - } - - private static void OnPlayerSetupAwake(PlayerSetup __instance) - { - // Get original fields - LayerMask layerMask = __instance.desktopRay.generalMask; - - // Destroy the existing desktop ray - Object.Destroy(__instance.desktopRay); - - // Get the desktop camera - Camera desktopCam = __instance.desktopCam; - - // Create a new child object under the desktop camera for the ray - GameObject rayObject = new("DesktopRay") - { - transform = - { - parent = desktopCam.transform, - localPosition = Vector3.zero, - localRotation = Quaternion.identity - } - }; - - // Add ControllerRay component - ControllerRay newRay = rayObject.AddComponent(); - newRay.isDesktopRay = true; - newRay.isInteractionRay = true; - newRay.RayDirection = Vector3.forward; - newRay.generalMask = layerMask; - newRay.hand = CVRHand.Right; // Important to even work - newRay.attachmentDistance = 0f; - newRay.currentAttachmentDistance = 0f; - - // Assign new ray to desktopRay field - __instance.desktopRay = newRay; - - // Add our custom controller script - DesktopRayController rayController = rayObject.AddComponent(); - rayController.controllerRay = newRay; - rayController.desktopCamera = desktopCam; - } - - private static void OnMenuManagerStart(CVR_MenuManager __instance) - { - __instance.desktopControllerRay = PlayerSetup.Instance.desktopRay; - } - - private static bool OnControllerRayHandleUnityUIDirectAndIndirect(ControllerRay __instance) - { - return !__instance.isDesktopRay || Cursor.lockState == CursorLockMode.Locked; - } - - private static void OnPreControllerRayLateUpdate(ControllerRay __instance, ref bool __state) - { - if (!__instance.isDesktopRay) - return; - - ViewManager menu = ViewManager.Instance; - __state = menu._gameMenuOpen; - - if (!__state) menu._gameMenuOpen = Cursor.lockState != CursorLockMode.Locked; - } - - private static void OnPostControllerRayLateUpdate(ControllerRay __instance, ref bool __state) - { - if (!__instance.isDesktopRay) return; - ViewManager.Instance._gameMenuOpen = __state; - } -} - -public class DesktopRayController : MonoBehaviour -{ - internal ControllerRay controllerRay; - internal Camera desktopCamera; - - private void Update() - { - // Toggle desktop mouse mode based on Control key state - if (Input.GetKeyDown(KeyCode.LeftControl)) - { - if (!ViewManager.Instance.IsAnyMenuOpen) RootLogic.CursorLock(false); - } - - if (Input.GetKeyUp(KeyCode.LeftControl)) - { - if (!ViewManager.Instance.IsAnyMenuOpen) RootLogic.CursorLock(true); - } - - Transform rayRoot = controllerRay.transform; - Transform rayDirection = controllerRay.rayDirectionTransform; - Transform attachment = controllerRay.attachmentPoint; - Camera cam = desktopCamera; - - if (Cursor.lockState == CursorLockMode.Locked) - { - // Reset local position when unlocked - rayRoot.localPosition = Vector3.zero; - rayRoot.localRotation = Quaternion.identity; - - // Reset local position and rotation when locked - rayDirection.localPosition = new Vector3(0f, 0f, 0.001f); - rayDirection.localRotation = Quaternion.identity; - } - else - { - bool isAnyMenuOpen = ViewManager.Instance.IsAnyMenuOpen; - Pickupable grabbedObject = controllerRay.grabbedObject; - - // Only do when not holding an origin object - Vector3 screenPos = new(Input.mousePosition.x, Input.mousePosition.y); - - if (isAnyMenuOpen) - { - // Center the ray - rayRoot.localPosition = Vector3.zero; - } - else if (grabbedObject && !grabbedObject.IsObjectRotationAllowed) - { - // Specialized movement of ray around pickupable pivot - Vector3 pivotPoint = grabbedObject.transform.position; - Vector3 pivotPointCenter = grabbedObject.RootTransform.position; - - PlayerSetup playerSetup = PlayerSetup.Instance; - if (playerSetup != null && playerSetup._animator != null && playerSetup._animator.isHuman) - { - Animator animator = playerSetup._animator; - switch (ControlToUnlockMouseMod.EntryOriginPivotPoint.Value) - { - case ControlToUnlockMouseMod.NoRotatePivotPoint.AvatarHead: - { - Transform headBone = animator.GetBoneTransform(HumanBodyBones.Head); - if (headBone != null) pivotPoint = headBone.position; - break; - } - case ControlToUnlockMouseMod.NoRotatePivotPoint.AvatarChest: - { - if (playerSetup._avatar != null) - { - Transform chestBone = animator.GetBoneTransform(HumanBodyBones.Chest); - if (chestBone != null) pivotPoint = chestBone.position; - } - break; - } - case ControlToUnlockMouseMod.NoRotatePivotPoint.AvatarClosestShoulder: - { - if (playerSetup._avatar != null) - { - Transform leftShoulder = animator.GetBoneTransform(HumanBodyBones.LeftShoulder); - Transform rightShoulder = animator.GetBoneTransform(HumanBodyBones.RightShoulder); - if (leftShoulder != null || rightShoulder != null) - { - if (leftShoulder != null && rightShoulder != null) - { - pivotPoint = Vector3.Distance(leftShoulder.position, pivotPoint) < Vector3.Distance(rightShoulder.position, pivotPoint) - ? leftShoulder.position - : rightShoulder.position; - } - else if (leftShoulder != null) - { - pivotPoint = leftShoulder.position; - } - else - { - pivotPoint = rightShoulder.position; - } - } - } - break; - } - case ControlToUnlockMouseMod.NoRotatePivotPoint.Pickupable: - default: - break; - } - } - - // Get local position of pivotPoint relative to rayRoot - // This is shit but i cant wrap my head around the proper way to compute this lol - Vector3 localPivotPoint = rayRoot.InverseTransformPoint(pivotPoint); - Vector3 localPivotPointCenter = rayRoot.InverseTransformPoint(pivotPointCenter); - localPivotPoint.x = localPivotPointCenter.x; // Maintain local X - localPivotPoint.y = localPivotPointCenter.y; // Maintain local Y - - // Compute target world position based on the mouse and attachment distance. - screenPos.z = 10f; - Vector3 targetWorldPos = cam.ScreenToWorldPoint(screenPos); - - // Desired direction from the pivot point (grabbed object) to the target world position. - Vector3 directionToTarget = targetWorldPos - rayRoot.TransformPoint(localPivotPoint);; - - if (directionToTarget.sqrMagnitude < 1e-6f) - directionToTarget = rayRoot.forward; // Fallback if mouse is centered - - // Calculate the target rotation for rayRoot. - Quaternion targetRotation = Quaternion.LookRotation(directionToTarget, cam.transform.up); - - // Get the current local offset of the grabbed object relative to rayRoot. - Vector3 localPickupOffset = rayRoot.InverseTransformPoint(pivotPoint); - - // Compute the new rayRoot position to keep the grabbed object (child) at pivotPoint. - Vector3 newRayRootPos = pivotPoint - (targetRotation * localPickupOffset); - - // Apply the new rotation and position. - rayRoot.rotation = targetRotation; - rayRoot.position = newRayRootPos; - } - else - { - float distance; - if (grabbedObject) - { - // This position is calculated basically same way as below in BasePickupHandler, - // but not determined by ray hit - distance = attachment.localPosition.z; - } - else - { - // Compute distance forward from ray - Vector3 localOffset = rayRoot.InverseTransformPoint(controllerRay._hit.point); - distance = localOffset.z; - } - - screenPos.z = distance; - - // Compute world position from where mouse is on screen - Vector3 worldPos = cam.ScreenToWorldPoint(screenPos); - - // Normal movement of ray - Vector3 newLocalPos = rayRoot.parent.InverseTransformPoint(worldPos); - newLocalPos.z = rayRoot.localPosition.z; // Maintain local Z - rayRoot.localPosition = newLocalPos; - } - - // Compute mouse ray in world space - Ray mouseRay = cam.ScreenPointToRay(Input.mousePosition); - rayDirection.position = mouseRay.origin; - rayDirection.rotation = Quaternion.LookRotation(mouseRay.direction, cam.transform.up); - } - } -} \ No newline at end of file diff --git a/.Deprecated/ControlToUnlockMouse/Properties/AssemblyInfo.cs b/.Deprecated/ControlToUnlockMouse/Properties/AssemblyInfo.cs deleted file mode 100644 index 9e54143..0000000 --- a/.Deprecated/ControlToUnlockMouse/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using MelonLoader; -using NAK.ControlToUnlockMouse.Properties; -using System.Reflection; - -[assembly: AssemblyVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyTitle(nameof(NAK.ControlToUnlockMouse))] -[assembly: AssemblyCompany(AssemblyInfoParams.Author)] -[assembly: AssemblyProduct(nameof(NAK.ControlToUnlockMouse))] - -[assembly: MelonInfo( - typeof(NAK.ControlToUnlockMouse.ControlToUnlockMouseMod), - nameof(NAK.ControlToUnlockMouse), - AssemblyInfoParams.Version, - AssemblyInfoParams.Author, - downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/ControlToUnlockMouse" -)] - -[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] -[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] -[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] -[assembly: MelonColor(255, 246, 25, 99)] // red-pink -[assembly: MelonAuthorColor(255, 158, 21, 32)] // red -[assembly: HarmonyDontPatchAll] - -namespace NAK.ControlToUnlockMouse.Properties; -internal static class AssemblyInfoParams -{ - public const string Version = "1.0.0"; - public const string Author = "NotAKidoS"; -} \ No newline at end of file diff --git a/.Deprecated/FuckMagicaCloth2/FuckMagicaCloth2.csproj b/.Deprecated/FuckMagicaCloth2/FuckMagicaCloth2.csproj deleted file mode 100644 index bec5b03..0000000 --- a/.Deprecated/FuckMagicaCloth2/FuckMagicaCloth2.csproj +++ /dev/null @@ -1,6 +0,0 @@ - - - - LoadedObjectHack - - diff --git a/.Deprecated/FuckMagicaCloth2/Main.cs b/.Deprecated/FuckMagicaCloth2/Main.cs deleted file mode 100644 index 2b1421d..0000000 --- a/.Deprecated/FuckMagicaCloth2/Main.cs +++ /dev/null @@ -1,49 +0,0 @@ -using ABI_RC.Core; -using ABI_RC.Core.InteractionSystem; -using ABI_RC.Core.Player; -using HarmonyLib; -using MagicaCloth2; -using MelonLoader; -using Unity.Burst; -using Unity.Collections; -using Unity.Jobs; -using Unity.Mathematics; -using UnityEngine; -using UnityEngine.Jobs; - -namespace NAK.FuckOffMagicaCloth2; - -public class FuckOffMagicaCloth2Mod : MelonMod -{ - private static MelonLogger.Instance Logger; - - public override void OnInitializeMelon() - { - Logger = LoggerInstance; - ApplyPatches(typeof(MagicaCloth_Patches)); - } - - private void ApplyPatches(Type type) - { - try - { - HarmonyInstance.PatchAll(type); - } - catch (Exception e) - { - LoggerInstance.Msg($"Failed while patching {type.Name}!"); - LoggerInstance.Error(e); - } - } - - internal static class MagicaCloth_Patches - { - [HarmonyPrefix] - [HarmonyPatch(typeof(MagicaCloth2.MagicaCloth), nameof(MagicaCloth2.MagicaCloth.Awake))] - private static void MagicaCloth_Awake_Prefix(MagicaCloth2.MagicaCloth __instance) - { - __instance.SerializeData.selfCollisionConstraint.selfMode = SelfCollisionConstraint.SelfCollisionMode.None; - __instance.SerializeData.selfCollisionConstraint.syncMode = SelfCollisionConstraint.SelfCollisionMode.None; - } - } -} \ No newline at end of file diff --git a/.Deprecated/FuckMagicaCloth2/Properties/AssemblyInfo.cs b/.Deprecated/FuckMagicaCloth2/Properties/AssemblyInfo.cs deleted file mode 100644 index 91ab089..0000000 --- a/.Deprecated/FuckMagicaCloth2/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,30 +0,0 @@ -using MelonLoader; -using NAK.FuckOffMagicaCloth2.Properties; -using System.Reflection; - -[assembly: AssemblyVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyTitle(nameof(NAK.FuckOffMagicaCloth2))] -[assembly: AssemblyCompany(AssemblyInfoParams.Author)] -[assembly: AssemblyProduct(nameof(NAK.FuckOffMagicaCloth2))] - -[assembly: MelonInfo( - typeof(NAK.FuckOffMagicaCloth2.FuckOffMagicaCloth2Mod), - nameof(NAK.FuckOffMagicaCloth2), - AssemblyInfoParams.Version, - AssemblyInfoParams.Author, - downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/FuckOffMagicaCloth2" -)] - -[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] -[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] -[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] -[assembly: HarmonyDontPatchAll] - -namespace NAK.FuckOffMagicaCloth2.Properties; -internal static class AssemblyInfoParams -{ - public const string Version = "1.0.1"; - public const string Author = "NotAKidoS"; -} \ No newline at end of file diff --git a/.Deprecated/FuckMagicaCloth2/format.json b/.Deprecated/FuckMagicaCloth2/format.json deleted file mode 100644 index ddf506b..0000000 --- a/.Deprecated/FuckMagicaCloth2/format.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "_id": -1, - "name": "AASDefaultProfileFix", - "modversion": "1.0.0", - "gameversion": "2024r175", - "loaderversion": "0.6.1", - "modtype": "Mod", - "author": "NotAKidoS", - "description": "Fixes the Default AAS profile not being applied when loading into an avatar without a profile selected.\n\nBy default, the game will not apply anything and the avatar will default to the state found within the Controller parameters.", - "searchtags": [ - "aas", - "profile", - "default", - "fix", - "meow" - ], - "requirements": [ - "None" - ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r33/AASDefaultProfileFix.dll", - "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/AASDefaultProfileFix/", - "changelog": "- Initial release", - "embedcolor": "#f61963" -} \ No newline at end of file diff --git a/.Deprecated/FuckOffUICamera/CohtmlRenderForwarder.cs b/.Deprecated/FuckOffUICamera/CohtmlRenderForwarder.cs deleted file mode 100644 index 5f5dd2a..0000000 --- a/.Deprecated/FuckOffUICamera/CohtmlRenderForwarder.cs +++ /dev/null @@ -1,35 +0,0 @@ -using ABI_RC.Core.UI; -using UnityEngine; - -namespace NAK.FuckOffUICamera; - -[RequireComponent(typeof(Camera))] -public class CohtmlRenderForwarder : MonoBehaviour -{ - #region Private Variables - - private CohtmlControlledView[] controlledViews; - - #endregion Private Variables - - #region Unity Events - - private void OnPreRender() - { - if (controlledViews == null) return; - foreach (CohtmlControlledView view in controlledViews) - if (view) view.OnPreRender(); - } - - #endregion Unity Events - - #region Public Methods - - public static void Setup(Camera camera, params CohtmlControlledView[] views) - { - CohtmlRenderForwarder forwarder = camera.gameObject.AddComponent(); - forwarder.controlledViews = views; - } - - #endregion Public Methods -} \ No newline at end of file diff --git a/.Deprecated/FuckOffUICamera/CommandBufferManager.cs b/.Deprecated/FuckOffUICamera/CommandBufferManager.cs deleted file mode 100644 index aa76f1f..0000000 --- a/.Deprecated/FuckOffUICamera/CommandBufferManager.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System.Collections; -using UnityEngine; -using UnityEngine.Rendering; - -namespace NAK.FuckOffUICamera; - -public class CommandBufferManager : MonoBehaviour -{ - #region Private Variables - - private CommandBuffer commandBuffer; - private Camera targetCamera; - private Renderer[] targetRenderers; - private bool[] rendererEnabledStates; - private const string CommandBufferName = "CustomRenderPass"; - private bool _didSetup; - - #endregion Private Variables - - #region Unity Events - - private IEnumerator Start() - { - yield return new WaitForSeconds(2f); // I have no idea why this needs to be delayed - _didSetup = true; - OnEnable(); - } - - private void OnEnable() - { - if (!_didSetup) return; - if (targetCamera == null || targetRenderers == null) - return; - - SetupEnabledStateCollection(); - SetupCommandBuffer(); - } - - private void OnDisable() - { - CleanupCommandBuffer(); - } - - private void LateUpdate() - { - if (targetRenderers == null - || rendererEnabledStates == null) - return; - - bool needsRebuild = false; - - // Check if any renderer enabled states have changed - int targetRenderersLength = targetRenderers.Length; - for (int i = 0; i < targetRenderersLength; i++) - { - if (targetRenderers[i] == null) continue; - - bool currentState = targetRenderers[i].enabled && targetRenderers[i].gameObject.activeInHierarchy; - if (currentState == rendererEnabledStates[i]) - continue; - - rendererEnabledStates[i] = currentState; - needsRebuild = true; - } - - if (needsRebuild) RebuildCommandBuffer(); - } - - #endregion Unity Events - - #region Public Methods - - public static void Setup(Camera camera, params Renderer[] renderers) - { - CommandBufferManager manager = camera.gameObject.AddComponent(); - manager.targetCamera = camera; - manager.targetRenderers = renderers; - } - - #endregion Public Methods - - #region Private Methods - - private void SetupEnabledStateCollection() - { - if (rendererEnabledStates != null) - Array.Resize(ref rendererEnabledStates, targetRenderers.Length); - else - rendererEnabledStates = new bool[targetRenderers.Length]; - } - - private void SetupCommandBuffer() - { - commandBuffer = new CommandBuffer(); - commandBuffer.name = CommandBufferName; - - // Set render target and clear depth - commandBuffer.SetRenderTarget(new RenderTargetIdentifier(BuiltinRenderTextureType.CameraTarget, - 0, CubemapFace.Unknown, RenderTargetIdentifier.AllDepthSlices)); - - commandBuffer.ClearRenderTarget(true, false, Color.clear); - - for (int i = 0; i < targetRenderers.Length; i++) - { - Renderer renderer = targetRenderers[i]; - if (renderer == null || !rendererEnabledStates[i]) - continue; - - commandBuffer.DrawRenderer(renderer, renderer.sharedMaterial); - renderer.forceRenderingOff = true; - } - - targetCamera.AddCommandBuffer(CameraEvent.AfterImageEffects, commandBuffer); - - Debug.Log($"Command buffer setup for {targetCamera.name} with {targetRenderers.Length} renderers."); - } - - private void RebuildCommandBuffer() - { - CleanupCommandBuffer(); - SetupCommandBuffer(); - } - - private void CleanupCommandBuffer() - { - if (targetCamera == null || commandBuffer == null) - return; - - // Re-enable normal rendering for all renderers - if (targetRenderers != null) - { - foreach (Renderer renderer in targetRenderers) - { - if (renderer != null) - renderer.forceRenderingOff = false; - } - } - - targetCamera.RemoveCommandBuffer(CameraEvent.AfterImageEffects, commandBuffer); - commandBuffer = null; - } - - #endregion Private Methods -} \ No newline at end of file diff --git a/.Deprecated/FuckOffUICamera/FuckOffUICamera.csproj b/.Deprecated/FuckOffUICamera/FuckOffUICamera.csproj deleted file mode 100644 index e94f9dc..0000000 --- a/.Deprecated/FuckOffUICamera/FuckOffUICamera.csproj +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/.Deprecated/FuckOffUICamera/Main.cs b/.Deprecated/FuckOffUICamera/Main.cs deleted file mode 100644 index e4c9092..0000000 --- a/.Deprecated/FuckOffUICamera/Main.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System.Reflection; -using ABI_RC.Core; -using ABI_RC.Core.InteractionSystem; -using ABI_RC.Core.Player; -using ABI_RC.Core.UI; -using HarmonyLib; -using MelonLoader; -using UnityEngine; -using Object = UnityEngine.Object; - -namespace NAK.FuckOffUICamera; - -public class FuckOffUICameraMod : MelonMod -{ - private static MelonLogger.Instance Logger; - - public override void OnInitializeMelon() - { - Logger = LoggerInstance; - } - - public override void OnSceneWasLoaded(int buildIndex, string sceneName) - { - if (buildIndex != 2) return; - if (_isInitialized) return; - SetupShittyMod(); - _isInitialized = true; - } - - private bool _isInitialized; - - private static void SetupShittyMod() - { - // Find all renderers under Cohtml object - GameObject cohtml = GameObject.Find("Cohtml"); - if (cohtml == null) - { - Logger.Error("Cohtml object not found!"); - return; - } - - // Find all CohtmlControlledView objects - var allMenuCohtml = Object.FindObjectsOfType(includeInactive: true); - var allUiInternalRenderers = Object.FindObjectsOfType(includeInactive: true) - .Where(x => x.gameObject.layer == CVRLayers.UIInternal) - .ToArray(); - - //var allMenuRenderers = cohtml.GetComponentsInChildren(true); - - // Add hud renderer to the list of renderers - Renderer hudRenderer = CohtmlHud.Instance.GetComponent(); - // Array.Resize(ref allMenuRenderers, allMenuRenderers.Length + 1); - // allMenuRenderers[^1] = hudRenderer; - - // Fix shader on the hud renderer - Material material = hudRenderer.sharedMaterial; - material.shader = Shader.Find("Alpha Blend Interactive/MenuFX"); - - // Setup command buffer manager for desktop camera - CommandBufferManager.Setup(PlayerSetup.Instance.desktopCam, allUiInternalRenderers); - CohtmlRenderForwarder.Setup(PlayerSetup.Instance.desktopCam, allMenuCohtml); - - // Setup command buffer manager for vr camera - CommandBufferManager.Setup(PlayerSetup.Instance.vrCam, allUiInternalRenderers); - CohtmlRenderForwarder.Setup(PlayerSetup.Instance.vrCam, allMenuCohtml); - - // Disable the ui cameras - PlayerSetup.Instance.desktopUiCam.gameObject.SetActive(false); - PlayerSetup.Instance.vrUiCam.gameObject.SetActive(false); - - Logger.Msg("Disabled UI cameras and setup command buffer manager for Cohtml renderers."); - } -} \ No newline at end of file diff --git a/.Deprecated/FuckOffUICamera/Properties/AssemblyInfo.cs b/.Deprecated/FuckOffUICamera/Properties/AssemblyInfo.cs deleted file mode 100644 index b7a9e9f..0000000 --- a/.Deprecated/FuckOffUICamera/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using MelonLoader; -using NAK.FuckOffUICamera.Properties; -using System.Reflection; - -[assembly: AssemblyVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyTitle(nameof(NAK.FuckOffUICamera))] -[assembly: AssemblyCompany(AssemblyInfoParams.Author)] -[assembly: AssemblyProduct(nameof(NAK.FuckOffUICamera))] - -[assembly: MelonInfo( - typeof(NAK.FuckOffUICamera.FuckOffUICameraMod), - nameof(NAK.FuckOffUICamera), - AssemblyInfoParams.Version, - AssemblyInfoParams.Author, - downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/FuckOffUICamera" -)] - -[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] -[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] -[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] -[assembly: MelonColor(255, 246, 25, 99)] // red-pink -[assembly: MelonAuthorColor(255, 158, 21, 32)] // red -[assembly: HarmonyDontPatchAll] - -namespace NAK.FuckOffUICamera.Properties; -internal static class AssemblyInfoParams -{ - public const string Version = "1.0.0"; - public const string Author = "NotAKidoS"; -} \ No newline at end of file diff --git a/.Deprecated/FuckOffUICamera/README.md b/.Deprecated/FuckOffUICamera/README.md deleted file mode 100644 index 1c4c5bc..0000000 --- a/.Deprecated/FuckOffUICamera/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# SearchWithSpacesFix - -Fixes search terms that use spaces. - ---- - -Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI. -https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games - -> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive. - -> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use. - -> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive. diff --git a/.Deprecated/FuckOffUICamera/format.json b/.Deprecated/FuckOffUICamera/format.json deleted file mode 100644 index f8950ca..0000000 --- a/.Deprecated/FuckOffUICamera/format.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "_id": -1, - "name": "SearchWithSpacesFix", - "modversion": "1.0.0", - "gameversion": "2024r177", - "loaderversion": "0.6.1", - "modtype": "Mod", - "author": "NotAKidoS", - "description": "Fixes search terms that include spaces.", - "searchtags": [ - "search", - "spaces", - "fix", - "meow" - ], - "requirements": [ - "None" - ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r42/SearchWithSpacesFix.dll", - "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/SearchWithSpacesFix/", - "changelog": "- Initial release", - "embedcolor": "#f61963" -} \ No newline at end of file diff --git a/.Deprecated/IKSimulatedRootAngleFix/README.md b/.Deprecated/IKSimulatedRootAngleFix/README.md deleted file mode 100644 index 8a46af2..0000000 --- a/.Deprecated/IKSimulatedRootAngleFix/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# IKSimulatedRootAngleFix - -Fixes a small issue with Desktop & HalfBody root angle being incorrectly calculated while on rotating Movement Parents. If you've ever noticed your body/feet insisting on facing opposite of the direction you are rotating, this fixes that. - ---- - -Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI. -https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games - -> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive. - -> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use. - -> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive. diff --git a/.Deprecated/LegacyContentMitigation/Components/FaceMirror.cs b/.Deprecated/LegacyContentMitigation/Components/FaceMirror.cs deleted file mode 100644 index 65f3e3b..0000000 --- a/.Deprecated/LegacyContentMitigation/Components/FaceMirror.cs +++ /dev/null @@ -1,100 +0,0 @@ -using ABI_RC.Core; -using ABI_RC.Core.Player; -using ABI_RC.Core.Savior; -using NAK.LegacyContentMitigation; -using UnityEngine; -using UnityEngine.Rendering; -using UnityEngine.XR; - -namespace LegacyContentMitigation.Components; - -public class FaceMirror : MonoBehaviour -{ - private Camera _parentCamera; - private Camera _camera; - public Rect shiftRect; - private CommandBuffer _viewportBuffer; - - private void Start() { - _parentCamera = GetComponent(); - _camera = new GameObject("Face Mirror").AddComponent(); - _camera.transform.parent = transform; - _camera.CopyFrom(_parentCamera); - _camera.ResetReplacementShader(); - _camera.depth = 99; - _camera.clearFlags = CameraClearFlags.Depth; - _camera.transform.position += transform.forward * 0.5f; - _camera.transform.rotation *= Quaternion.Euler(0, 180, 0); - - // View only CVRLayers.PlayerLocal - _camera.cullingMask = 1 << CVRLayers.PlayerLocal; - - // Create and cache the command buffer - _viewportBuffer = new CommandBuffer(); - _viewportBuffer.SetViewport(shiftRect); - - _camera.AddCommandBuffer(CameraEvent.BeforeDepthTexture, _viewportBuffer); - _camera.AddCommandBuffer(CameraEvent.BeforeForwardOpaque, _viewportBuffer); - _camera.AddCommandBuffer(CameraEvent.BeforeForwardAlpha, _viewportBuffer); - _camera.AddCommandBuffer(CameraEvent.BeforeImageEffects, _viewportBuffer); - } - - private void Update() - { - if (ModSettings.EntryUseFaceMirror.Value == false) - { - _camera.enabled = false; - return; - } - _camera.enabled = true; - - // Update camera distance - _camera.transform.localPosition = Vector3.forward * ModSettings.EntryFaceMirrorDistance.Value; - - // Get the display resolution based on VR status - int displayWidth, displayHeight; - if (MetaPort.Instance.isUsingVr) - { - displayWidth = XRSettings.eyeTextureWidth; - displayHeight = XRSettings.eyeTextureHeight; - } - else - { - displayWidth = Screen.width; - displayHeight = Screen.height; - } - - // Calculate pixel sizes first - float pixelSizeX = ModSettings.EntryFaceMirrorSizeX.Value * displayWidth; - float pixelSizeY = ModSettings.EntryFaceMirrorSizeY.Value * displayHeight; - - // Calculate offsets from center - float pixelOffsetX = (ModSettings.EntryFaceMirrorOffsetX.Value * displayWidth) - (pixelSizeX * 0.5f) + (displayWidth * 0.5f); - float pixelOffsetY = (ModSettings.EntryFaceMirrorOffsetY.Value * displayHeight) - (pixelSizeY * 0.5f) + (displayHeight * 0.5f); - - _camera.transform.localScale = Vector3.one * ModSettings.EntryFaceMirrorCameraScale.Value; - - Vector3 playerup = PlayerSetup.Instance.transform.up; - Vector3 cameraForward = _parentCamera.transform.forward; - - // Check if playerup and cameraForward are nearly aligned - if (Mathf.Abs(Vector3.Dot(playerup, cameraForward)) <= Mathf.Epsilon) { - playerup = -_parentCamera.transform.forward; - cameraForward = _parentCamera.transform.up; - } - - _camera.transform.rotation = Quaternion.LookRotation(-cameraForward, playerup); - - // Create viewport rect with pixel values - shiftRect = new Rect( - pixelOffsetX, - pixelOffsetY, - pixelSizeX, - pixelSizeY - ); - - // Update the cached buffer's viewport - _viewportBuffer.Clear(); - _viewportBuffer.SetViewport(shiftRect); - } -} \ No newline at end of file diff --git a/.Deprecated/LegacyContentMitigation/ModSettings.cs b/.Deprecated/LegacyContentMitigation/ModSettings.cs deleted file mode 100644 index a20c93d..0000000 --- a/.Deprecated/LegacyContentMitigation/ModSettings.cs +++ /dev/null @@ -1,52 +0,0 @@ -using MelonLoader; - -namespace NAK.LegacyContentMitigation; - -internal static class ModSettings -{ - #region Constants - - internal const string ModName = nameof(LegacyContentMitigation); - internal const string LCM_SettingsCategory = "Legacy Content Mitigation"; - - #endregion Constants - - #region Melon Preferences - - private static readonly MelonPreferences_Category Category = - MelonPreferences.CreateCategory(ModName); - - internal static readonly MelonPreferences_Entry EntryAutoForLegacyWorlds = - Category.CreateEntry("auto_for_legacy_worlds", true, - "Auto For Legacy Worlds", description: "Should Legacy View be auto enabled for detected Legacy worlds?"); - - internal static readonly MelonPreferences_Entry EntryFaceMirrorDistance = - Category.CreateEntry("face_mirror_distance", 0.5f, - "Face Mirror Distance", description: "Distance from the camera to place the face mirror."); - - internal static readonly MelonPreferences_Entry EntryFaceMirrorOffsetX = - Category.CreateEntry("face_mirror_offset_x", 0f, - "Face Mirror Offset X", description: "Offset the face mirror on the X axis."); - - internal static readonly MelonPreferences_Entry EntryFaceMirrorOffsetY = - Category.CreateEntry("face_mirror_offset_y", 0f, - "Face Mirror Offset Y", description: "Offset the face mirror on the Y axis."); - - internal static readonly MelonPreferences_Entry EntryFaceMirrorSizeX = - Category.CreateEntry("face_mirror_size_x", 0.5f, - "Face Mirror Size X", description: "Size of the face mirror on the X axis."); - - internal static readonly MelonPreferences_Entry EntryFaceMirrorSizeY = - Category.CreateEntry("face_mirror_size_y", 0.5f, - "Face Mirror Size Y", description: "Size of the face mirror on the Y axis."); - - internal static readonly MelonPreferences_Entry EntryFaceMirrorCameraScale = - Category.CreateEntry("face_mirror_camera_scale", 1f, - "Face Mirror Camera Scale", description: "Scale of the face mirror camera."); - - internal static readonly MelonPreferences_Entry EntryUseFaceMirror = - Category.CreateEntry("use_face_mirror", true, - "Use Face Mirror", description: "Should the face mirror be used?"); - - #endregion Melon Preferences -} \ No newline at end of file diff --git a/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/Main.cs b/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/Main.cs deleted file mode 100644 index 7687ea6..0000000 --- a/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/Main.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System.Reflection; -using ABI_RC.Core.Player; -using HarmonyLib; -using MelonLoader; -using UnityEngine; - -namespace NAK.RemoteAvatarDisablingCameraOnFirstFrameFix; - -public class RemoteAvatarDisablingCameraOnFirstFrameFixMod : MelonMod -{ - public override void OnInitializeMelon() - { - HarmonyInstance.Patch( - typeof(PuppetMaster).GetMethod(nameof(PuppetMaster.AvatarInstantiated), - BindingFlags.Public | BindingFlags.Instance), - postfix: new HarmonyMethod(typeof(RemoteAvatarDisablingCameraOnFirstFrameFixMod).GetMethod(nameof(OnPuppetMasterAvatarInstantiated), - BindingFlags.NonPublic | BindingFlags.Static)) - ); - } - - private static void OnPuppetMasterAvatarInstantiated(PuppetMaster __instance) - { - if (__instance._animator == null) return; - - __instance._animator.WriteDefaultValues(); - __instance._animator.keepAnimatorStateOnDisable = false; - __instance._animator.writeDefaultValuesOnDisable = false; - } - - // private static void OnPuppetMasterAvatarInstantiated(PuppetMaster __instance) - // { - // if (__instance._animator == null) return; - // - // // Set culling mode to always animate - // __instance._animator.cullingMode = AnimatorCullingMode.AlwaysAnimate; - // - // // Update the animator to force it to do the first frame - // __instance._animator.Update(0f); - // - // // Set culling mode back to cull update transforms - // __instance._animator.cullingMode = AnimatorCullingMode.CullUpdateTransforms; - // } -} \ No newline at end of file diff --git a/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/Properties/AssemblyInfo.cs b/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/Properties/AssemblyInfo.cs deleted file mode 100644 index 9f70d66..0000000 --- a/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,30 +0,0 @@ -using MelonLoader; -using NAK.RemoteAvatarDisablingCameraOnFirstFrameFix.Properties; -using System.Reflection; - -[assembly: AssemblyVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyTitle(nameof(NAK.RemoteAvatarDisablingCameraOnFirstFrameFix))] -[assembly: AssemblyCompany(AssemblyInfoParams.Author)] -[assembly: AssemblyProduct(nameof(NAK.RemoteAvatarDisablingCameraOnFirstFrameFix))] - -[assembly: MelonInfo( - typeof(NAK.RemoteAvatarDisablingCameraOnFirstFrameFix.RemoteAvatarDisablingCameraOnFirstFrameFixMod), - nameof(NAK.RemoteAvatarDisablingCameraOnFirstFrameFix), - AssemblyInfoParams.Version, - AssemblyInfoParams.Author, - downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/RemoteAvatarDisablingCameraOnFirstFrameFix" -)] - -[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] -[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] -[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] -[assembly: HarmonyDontPatchAll] - -namespace NAK.RemoteAvatarDisablingCameraOnFirstFrameFix.Properties; -internal static class AssemblyInfoParams -{ - public const string Version = "1.0.0"; - public const string Author = "NotAKidoS"; -} \ No newline at end of file diff --git a/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/README.md b/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/README.md deleted file mode 100644 index 8a46af2..0000000 --- a/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# IKSimulatedRootAngleFix - -Fixes a small issue with Desktop & HalfBody root angle being incorrectly calculated while on rotating Movement Parents. If you've ever noticed your body/feet insisting on facing opposite of the direction you are rotating, this fixes that. - ---- - -Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI. -https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games - -> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive. - -> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use. - -> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive. diff --git a/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/RemoteAvatarDisablingCameraOnFirstFrameFix.csproj b/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/RemoteAvatarDisablingCameraOnFirstFrameFix.csproj deleted file mode 100644 index bec5b03..0000000 --- a/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/RemoteAvatarDisablingCameraOnFirstFrameFix.csproj +++ /dev/null @@ -1,6 +0,0 @@ - - - - LoadedObjectHack - - diff --git a/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/format.json b/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/format.json deleted file mode 100644 index ddf506b..0000000 --- a/.Deprecated/RemoteAvatarDisablingCameraOnFirstFrameFix/format.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "_id": -1, - "name": "AASDefaultProfileFix", - "modversion": "1.0.0", - "gameversion": "2024r175", - "loaderversion": "0.6.1", - "modtype": "Mod", - "author": "NotAKidoS", - "description": "Fixes the Default AAS profile not being applied when loading into an avatar without a profile selected.\n\nBy default, the game will not apply anything and the avatar will default to the state found within the Controller parameters.", - "searchtags": [ - "aas", - "profile", - "default", - "fix", - "meow" - ], - "requirements": [ - "None" - ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r33/AASDefaultProfileFix.dll", - "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/AASDefaultProfileFix/", - "changelog": "- Initial release", - "embedcolor": "#f61963" -} \ No newline at end of file diff --git a/.Deprecated/SearchWithSpacesFix/README.md b/.Deprecated/SearchWithSpacesFix/README.md deleted file mode 100644 index 1c4c5bc..0000000 --- a/.Deprecated/SearchWithSpacesFix/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# SearchWithSpacesFix - -Fixes search terms that use spaces. - ---- - -Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI. -https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games - -> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive. - -> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use. - -> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive. diff --git a/.Deprecated/SearchWithSpacesFix/format.json b/.Deprecated/SearchWithSpacesFix/format.json deleted file mode 100644 index f8950ca..0000000 --- a/.Deprecated/SearchWithSpacesFix/format.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "_id": -1, - "name": "SearchWithSpacesFix", - "modversion": "1.0.0", - "gameversion": "2024r177", - "loaderversion": "0.6.1", - "modtype": "Mod", - "author": "NotAKidoS", - "description": "Fixes search terms that include spaces.", - "searchtags": [ - "search", - "spaces", - "fix", - "meow" - ], - "requirements": [ - "None" - ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r42/SearchWithSpacesFix.dll", - "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/SearchWithSpacesFix/", - "changelog": "- Initial release", - "embedcolor": "#f61963" -} \ No newline at end of file diff --git a/.Deprecated/SuperAwesomeMod/Interaction/CVRPlayerHand.cs b/.Deprecated/SuperAwesomeMod/Interaction/CVRPlayerHand.cs deleted file mode 100644 index 949b638..0000000 --- a/.Deprecated/SuperAwesomeMod/Interaction/CVRPlayerHand.cs +++ /dev/null @@ -1,42 +0,0 @@ -using ABI_RC.Core.InteractionSystem; -using ABI_RC.Core.InteractionSystem.Base; -using ABI_RC.Systems.InputManagement; -using UnityEngine; -using UnityEngine.Serialization; - -namespace ABI_RC.Core.Player.Interaction -{ - public class CVRPlayerHand : MonoBehaviour - { - #region Fields - - [SerializeField] - private CVRHand _hand; - - // Pickup rig - [SerializeField] private Transform rayDirection; - [SerializeField] private Transform _attachmentPoint; - [SerializeField] private Transform _pivotPoint; - [SerializeField] private VelocityTracker _velocityTracker; - - // Pickup state - private bool _isHoldingObject; - private Pickupable _heldPickupable; - private Pickupable _proximityPickupable; - - #endregion Fields - - #region Unity Events - - - #endregion Unity Events - - #region Private Methods - - #endregion Private Methods - - #region Public Methods - - #endregion Public Methods - } -} \ No newline at end of file diff --git a/.Deprecated/SuperAwesomeMod/Interaction/CVRPlayerInteractionManager.cs b/.Deprecated/SuperAwesomeMod/Interaction/CVRPlayerInteractionManager.cs deleted file mode 100644 index 2c0d56e..0000000 --- a/.Deprecated/SuperAwesomeMod/Interaction/CVRPlayerInteractionManager.cs +++ /dev/null @@ -1,214 +0,0 @@ -using ABI_RC.Core.Player.Interaction.RaycastImpl; -using ABI_RC.Core.Savior; -using ABI_RC.Systems.InputManagement; -using UnityEngine; - -namespace ABI_RC.Core.Player.Interaction -{ - public class CVRPlayerInteractionManager : MonoBehaviour - { - #region Singleton - - public static CVRPlayerInteractionManager Instance { get; private set; } - - #endregion Singleton - - #region Serialized Fields - - [Header("Hand Components")] - [SerializeField] private CVRPlayerHand handVrLeft; - [SerializeField] private CVRPlayerHand handVrRight; - [SerializeField] private CVRPlayerHand handDesktopRight; // Desktop does not have a left hand - - [Header("Raycast Transforms")] - [SerializeField] private Transform raycastTransformVrRight; - [SerializeField] private Transform raycastTransformVrLeft; - [SerializeField] private Transform raycastTransformDesktopRight; - - [Header("Settings")] - [SerializeField] private bool interactionEnabled = true; - [SerializeField] private LayerMask interactionLayerMask = -1; // Default to all layers, will be filtered - - #endregion Serialized Fields - - #region Properties - - private CVRPlayerHand _rightHand; - private CVRPlayerHand _leftHand; - - private CVRPlayerRaycaster _rightRaycaster; - private CVRPlayerRaycaster _leftRaycaster; - - private CVRRaycastResult _rightRaycastResult; - private CVRRaycastResult _leftRaycastResult; - - // Input handler - private CVRPlayerInputHandler _inputHandler; - - // Interaction flags - public bool InteractionEnabled - { - get => interactionEnabled; - set => interactionEnabled = value; - } - - #endregion Properties - - #region Unity Events - - private void Awake() - { - if (Instance != null && Instance != this) - { - Destroy(gameObject); - return; - } - Instance = this; - - // Create the input handler - _inputHandler = gameObject.AddComponent(); - } - - private void Start() - { - // Setup interaction for current device mode - SetupInteractionForDeviceMode(); - - // Listen for VR mode changes - MetaPort.Instance.onVRModeSwitch.AddListener(SetupInteractionForDeviceMode); - } - - private void Update() - { - if (!interactionEnabled) - return; - - // Process right hand - if (_rightRaycaster != null) - { - // Determine raycast flags based on current mode - CVRPlayerRaycaster.RaycastFlags flags = DetermineRaycastFlags(_rightHand); - - // Get raycast results - _rightRaycastResult = _rightRaycaster.GetRaycastResults(flags); - - // Process input based on raycast results - _inputHandler.ProcessInput(CVRHand.Right, _rightRaycastResult); - } - - // Process left hand (if available) - if (_leftRaycaster != null) - { - // Determine raycast flags based on current mode - CVRPlayerRaycaster.RaycastFlags flags = DetermineRaycastFlags(_leftHand); - - // Get raycast results - _leftRaycastResult = _leftRaycaster.GetRaycastResults(flags); - - // Process input based on raycast results - _inputHandler.ProcessInput(CVRHand.Left, _leftRaycastResult); - } - } - - private void OnDestroy() - { - // Clean up event listener - if (MetaPort.Instance != null) - MetaPort.Instance.onVRModeSwitch.RemoveListener(SetupInteractionForDeviceMode); - } - - #endregion Unity Events - - #region Public Methods - - /// - /// Register a custom tool mode - /// - public void RegisterCustomToolMode(System.Action callback) - { - _inputHandler.RegisterCustomTool(callback); - } - - /// - /// Unregister the current custom tool mode - /// - public void UnregisterCustomToolMode() - { - _inputHandler.UnregisterCustomTool(); - } - - /// - /// Set the interaction mode - /// - public void SetInteractionMode(CVRPlayerInputHandler.InteractionMode mode) - { - _inputHandler.SetInteractionMode(mode); - } - - /// - /// Get the raycast result for a specific hand - /// - public CVRRaycastResult GetRaycastResult(CVRHand hand) - { - return hand == CVRHand.Left ? _leftRaycastResult : _rightRaycastResult; - } - - #endregion Public Methods - - #region Private Methods - - private void SetupInteractionForDeviceMode() - { - bool isVr = MetaPort.Instance.isUsingVr; - - if (isVr) - { - // VR mode - _rightHand = handVrRight; - _leftHand = handVrLeft; - - // VR uses the controller transform for raycasting - _rightRaycaster = new CVRPlayerRaycasterTransform(raycastTransformVrRight); - _leftRaycaster = new CVRPlayerRaycasterTransform(raycastTransformVrLeft); - } - else - { - // Desktop mode - _rightHand = handDesktopRight; - _leftHand = null; - - // Desktop uses the mouse position for raycasting when unlocked - Camera desktopCamera = PlayerSetup.Instance.desktopCam; - _rightRaycaster = new CVRPlayerRaycasterMouse(raycastTransformDesktopRight, desktopCamera); - _leftRaycaster = null; - } - - // Set the layer mask for raycasters - if (_rightRaycaster != null) - _rightRaycaster.SetLayerMask(interactionLayerMask); - - if (_leftRaycaster != null) - _leftRaycaster.SetLayerMask(interactionLayerMask); - } - - private static CVRPlayerRaycaster.RaycastFlags DetermineRaycastFlags(CVRPlayerHand hand) - { - // Default to all flags - CVRPlayerRaycaster.RaycastFlags flags = CVRPlayerRaycaster.RaycastFlags.All; - - // Check if hand is holding a pickup - if (hand != null && hand.IsHoldingObject) - { - // When holding an object, only check for COHTML interaction - flags = CVRPlayerRaycaster.RaycastFlags.CohtmlInteract; - } - - // Could add more conditional flag adjustments here based on the current mode - // For example, in a teleport tool mode, you might only want world hits - - return flags; - } - - #endregion Private Methods - } -} \ No newline at end of file diff --git a/.Deprecated/SuperAwesomeMod/Interaction/Components/CVRCanvasWrapper.cs b/.Deprecated/SuperAwesomeMod/Interaction/Components/CVRCanvasWrapper.cs deleted file mode 100644 index 2ec46bd..0000000 --- a/.Deprecated/SuperAwesomeMod/Interaction/Components/CVRCanvasWrapper.cs +++ /dev/null @@ -1,121 +0,0 @@ -using ABI_RC.Core.Base; -using ABI_RC.Core.Player; -using UnityEngine; -using UnityEngine.EventSystems; -using UnityEngine.UI; - -namespace NAK.SuperAwesomeMod.Components -{ - public class CVRCanvasWrapper : MonoBehaviour - { - public bool IsInteractable = true; - public float MaxInteractDistance = 10f; - - private Canvas _canvas; - private GraphicRaycaster _graphicsRaycaster; - private static readonly List _raycastResults = new(); - private static readonly PointerEventData _pointerEventData = new(EventSystem.current); - - private static Selectable _workingSelectable; - private Camera _camera; - private RectTransform _rectTransform; - - #region Unity Events - - private void Awake() - { - if (!TryGetComponent(out _canvas) - || _canvas.renderMode != RenderMode.WorldSpace) - { - IsInteractable = false; - return; - } - - _rectTransform = _canvas.GetComponent(); - } - - private void Start() - { - _graphicsRaycaster = _canvas.gameObject.AddComponent(); - _camera = PlayerSetup.Instance.activeCam; - _canvas.worldCamera = _camera; - } - - #endregion Unity Events - - #region Public Methods - - public bool GetGraphicsHit(Ray worldRay, out RaycastResult result) - { - result = default; - - if (!IsInteractable || _camera == null) return false; - - // Get the plane of the canvas - Plane canvasPlane = new(transform.forward, transform.position); - - // Find where the ray intersects the canvas plane - if (!canvasPlane.Raycast(worldRay, out float distance)) - return false; - - // Get the world point of intersection - Vector3 worldHitPoint = worldRay.origin + worldRay.direction * distance; - - // Check if hit point is within max interaction distance - if (Vector3.Distance(worldRay.origin, worldHitPoint) > MaxInteractDistance) - return false; - - // Check if hit point is within canvas bounds - Vector3 localHitPoint = transform.InverseTransformPoint(worldHitPoint); - Rect canvasRect = _rectTransform.rect; - if (!canvasRect.Contains(new Vector2(localHitPoint.x, localHitPoint.y))) - return false; - - // Convert world hit point to screen space - Vector2 screenPoint = _camera.WorldToScreenPoint(worldHitPoint); - - // Update pointer event data - _pointerEventData.position = screenPoint; - _pointerEventData.delta = Vector2.zero; - - // Clear previous results and perform raycast - _raycastResults.Clear(); - _graphicsRaycaster.Raycast(_pointerEventData, _raycastResults); - - // Early out if no hits - if (_raycastResults.Count == 0) - { - //Debug.Log($"No hits on canvas {_canvas.name}"); - return false; - } - - // Find first valid interactive UI element - foreach (RaycastResult hit in _raycastResults) - { - if (!hit.isValid) - { - //Debug.Log($"Invalid hit on canvas {_canvas.name}"); - continue; - } - - // Check if the hit object has a Selectable component and is interactable - GameObject hitObject = hit.gameObject; - if (!hitObject.TryGetComponent(out _workingSelectable) - || !_workingSelectable.interactable) - { - //Debug.Log($"Non-interactable hit on canvas {_canvas.name} - {hitObject.name}"); - continue; - } - - //Debug.Log($"Hit on canvas {_canvas.name} with {hitObject.name}"); - - result = hit; - return true; - } - - return false; - } - - #endregion Public Methods - } -} \ No newline at end of file diff --git a/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/CVRPlayerRaycaster.cs b/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/CVRPlayerRaycaster.cs deleted file mode 100644 index aa4205a..0000000 --- a/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/CVRPlayerRaycaster.cs +++ /dev/null @@ -1,385 +0,0 @@ -using ABI_RC.Core.InteractionSystem.Base; -using ABI_RC.Core.UI; -using ABI.CCK.Components; -using NAK.SuperAwesomeMod.Components; -using UnityEngine; -using UnityEngine.EventSystems; -using UnityEngine.UI; - -namespace ABI_RC.Core.Player.Interaction.RaycastImpl -{ - public abstract class CVRPlayerRaycaster - { - #region Enums - - [Flags] - public enum RaycastFlags - { - None = 0, - TelepathicCandidate = 1 << 0, - ProximityInteract = 1 << 1, - RayInteract = 1 << 2, - CohtmlInteract = 1 << 3, - All = ~0 - } - - #endregion Enums - - #region Constants - - private const float MAX_RAYCAST_DISTANCE = 100f; // Max distance you can raycast - private const float RAYCAST_SPHERE_RADIUS = 0.1f; // Radius of the proximity sphere - private const float TELEPATHIC_SPHERE_RADIUS = 0.3f; // Radius of the telepathic sphere - private const float MAX_TELEPATHIC_DISTANCE = 20f; // Max distance for telepathic grab - private const int MAX_RAYCAST_HITS = 100; // Hit buffer size, high due to triggers, which we use lots in CCK - - // Global setting is Collide, but better to be explicit about what we need - private const QueryTriggerInteraction _triggerInteraction = QueryTriggerInteraction.Collide; - - // Layers that are reserved for other purposes or illegal to interact with - private const int RESERVED_OR_ILLEGAL_LAYERS = (1 << CVRLayers.IgnoreRaycast) - | (1 << CVRLayers.MirrorReflection) - | (1 << CVRLayers.PlayerLocal); - - #endregion Constants - - #region Static Fields - - private static readonly RaycastHit[] _hits = new RaycastHit[MAX_RAYCAST_HITS]; - private static readonly Comparer _hitsComparer = Comparer.Create((hit1, hit2) => - { - bool isUI1 = hit1.collider.gameObject.layer == CVRLayers.UIInternal; - bool isUI2 = hit2.collider.gameObject.layer == CVRLayers.UIInternal; - - // Prioritize UIInternal hits - if (isUI1 && !isUI2) return -1; // UIInternal comes first - if (!isUI1 && isUI2) return 1; // Non-UIInternal comes after - - // If both are UIInternal or both are not, sort by distance - return hit1.distance.CompareTo(hit2.distance); - }); - - private static readonly LayerMask _telepathicLayerMask = 1 << CVRLayers.MirrorReflection; - - // Working variables to avoid repeated allocations - private static Collider _workingCollider; - private static GameObject _workingGameObject; - private static Pickupable _workingPickupable; - private static Interactable _workingInteractable; - private static Selectable _workingSelectable; - private static ICanvasElement _workingCanvasElement; - - #endregion Static Fields - - #region Private Fields - - private LayerMask _layerMask; // Default to no layers so we know if we fucked up - - #endregion Private Fields - - #region Constructor - - protected CVRPlayerRaycaster(Transform rayOrigin) => _rayOrigin = rayOrigin; - protected readonly Transform _rayOrigin; - - #endregion Constructor - - #region Public Methods - - public void SetLayerMask(LayerMask layerMask) - { - layerMask &= ~RESERVED_OR_ILLEGAL_LAYERS; - _layerMask = layerMask; - } - - public CVRRaycastResult GetRaycastResults(RaycastFlags flags = RaycastFlags.All) - { - // Early out if we don't want to do anything - if (flags == RaycastFlags.None) return default; - - Ray ray = GetRayFromImpl(); - CVRRaycastResult result = new(); - - // Always check COHTML first - if ((flags & RaycastFlags.CohtmlInteract) != 0 - && TryProcessCohtmlHit(ray, ref result)) - return result; - - // Check if there are pickups or interactables in immediate proximity - if ((flags & RaycastFlags.ProximityInteract) != 0) - { - ProcessProximityHits(ray, ref result); // TODO: Offset origin to center of palm based on hand type - if (result.isProximityHit) - return result; - } - - // Check for regular raycast hits - if ((flags & RaycastFlags.RayInteract) != 0) - ProcessRaycastHits(ray, ref result); - - // If we hit something, check for telepathic grab candidates at the hit point - if ((flags & RaycastFlags.TelepathicCandidate) != 0 && result.hit.collider) - ProcessTelepathicGrabCandidate(result.hit.point, ref result); - - return result; - } - - #endregion Public Methods - - #region Private Methods - - private static bool TryProcessCohtmlHit(Ray ray, ref CVRRaycastResult result) - { - CohtmlControlledView hitView = CohtmlViewInputHandler.Instance.RayToView(ray, - out float _, out Vector2 hitCoords); - if (hitView == null) return false; - - result.hitCohtml = true; - result.hitCohtmlView = hitView; - result.hitCohtmlCoords = hitCoords; - - // Manually check for pickups & interactables on the hit view (future-proofing for menu grabbing) - if (hitView.TryGetComponent(out _workingInteractable)) result.hitInteractable = _workingInteractable; - if (hitView.TryGetComponent(out _workingPickupable)) result.hitPickupable = _workingPickupable; - - return true; - } - - private void ProcessProximityHits(Ray ray, ref CVRRaycastResult result) - { - int proximityHits = Physics.SphereCastNonAlloc( - ray.origin, - RAYCAST_SPHERE_RADIUS, - Vector3.up, - _hits, - 0.001f, - _layerMask, - _triggerInteraction - ); - - if (proximityHits <= 0) return; - - Array.Sort(_hits, 0, proximityHits, _hitsComparer); - - for (int i = 0; i < proximityHits; i++) - { - RaycastHit hit = _hits[i]; - _workingCollider = hit.collider; - _workingGameObject = _workingCollider.gameObject; - - // Skip things behind the ray origin - if (Vector3.Dot(ray.direction, hit.point - ray.origin) < 0) - continue; - - // Check for interactables & pickupables in proximity - if (!TryProcessInteractables(hit, ref result)) - continue; - - result.isProximityHit = true; - break; - } - } - - private void ProcessRaycastHits(Ray ray, ref CVRRaycastResult result) - { - // Get all hits including triggers, sorted by UI Internal layer & distance - int hitCount = Physics.RaycastNonAlloc(ray, - _hits, - MAX_RAYCAST_DISTANCE, - _layerMask, - _triggerInteraction); - - if (hitCount <= 0) return; - - Array.Sort(_hits, 0, hitCount, _hitsComparer); - - for (int i = 0; i < hitCount; i++) - { - RaycastHit hit = _hits[i]; - _workingCollider = hit.collider; - _workingGameObject = _workingCollider.gameObject; - - // Special case where we only get the closest water hit position. - // As the array is sorted by distance, we only need to check if we didn't hit water yet. - if (!result.hitWater) TryProcessFluidVolume(hit, ref result); - - // Check for hits in order of priority - - if (TryProcessSelectable(hit, ref result)) - break; // Hit a Unity UI Selectable (Button, Slider, etc.) - - if (TryProcessCanvasElement(hit, ref result)) - break; // Hit a Unity UI Canvas Element (ScrollRect, idk what else yet) - - if (TryProcessInteractables(hit, ref result)) - break; // Hit an in-range Interactable or Pickup - - if (TryProcessWorldHit(hit, ref result)) - break; // Hit a non-trigger collider (world, end of ray) - } - } - - private void ProcessTelepathicGrabCandidate(Vector3 hitPoint, ref CVRRaycastResult result) - { - // If we already hit a pickupable, we don't need to check for telepathic grab candidates - if (result.hitPickupable) - { - result.hasTelepathicGrabCandidate = true; - result.telepathicPickupable = result.hitPickupable; - result.telepathicGrabPoint = hitPoint; - return; - } - - // If the hit distance is too far, don't bother checking for telepathic grab candidates - if (Vector3.Distance(hitPoint, _rayOrigin.position) > MAX_TELEPATHIC_DISTANCE) - return; - - // Check for mirror reflection triggers in a sphere around the hit point - int telepathicHits = Physics.SphereCastNonAlloc( - hitPoint, - TELEPATHIC_SPHERE_RADIUS, - Vector3.up, - _hits, - 0.001f, - _telepathicLayerMask, - QueryTriggerInteraction.Collide - ); - - if (telepathicHits <= 0) return; - - // Look for pickupable objects near our hit point - var nearestDistance = float.MaxValue; - for (int i = 0; i < telepathicHits; i++) - { - RaycastHit hit = _hits[i]; - _workingCollider = hit.collider; - // _workingGameObject = _workingCollider.gameObject; - - Transform parentTransform = _workingCollider.transform.parent; - if (!parentTransform - || !parentTransform.TryGetComponent(out _workingPickupable) - || !_workingPickupable.CanPickup) - continue; - - var distance = Vector3.Distance(hitPoint, hit.point); - if (!(distance < nearestDistance)) - continue; - - result.hasTelepathicGrabCandidate = true; - result.telepathicPickupable = _workingPickupable; - result.telepathicGrabPoint = hitPoint; - nearestDistance = distance; - } - } - - private static bool TryProcessSelectable(RaycastHit hit, ref CVRRaycastResult result) - { - if (!_workingGameObject.TryGetComponent(out _workingSelectable)) - return false; - - result.hitUnityUi = true; - result.hitSelectable = _workingSelectable; - result.hit = hit; - return true; - } - - private static bool TryProcessCanvasElement(RaycastHit hit, ref CVRRaycastResult result) - { - if (!_workingGameObject.TryGetComponent(out _workingCanvasElement)) - return false; - - result.hitUnityUi = true; - result.hitCanvasElement = _workingCanvasElement; - result.hit = hit; - return true; - } - - private static void TryProcessFluidVolume(RaycastHit hit, ref CVRRaycastResult result) - { - if (_workingGameObject.layer != CVRLayers.Water) return; - - result.hitWater = true; - result.waterHit = hit; - } - - private static bool TryProcessInteractables(RaycastHit hit, ref CVRRaycastResult result) - { - bool hitValidComponent = false; - - if (_workingGameObject.TryGetComponent(out _workingInteractable) - && _workingInteractable.CanInteract - && IsCVRInteractableWithinRange(_workingInteractable, hit)) - { - result.hitInteractable = _workingInteractable; - hitValidComponent = true; - } - if (_workingGameObject.TryGetComponent(out _workingPickupable) - && _workingPickupable.CanPickup - && IsCVRPickupableWithinRange(_workingPickupable, hit)) - { - result.hitPickupable = _workingPickupable; - hitValidComponent = true; - } - - if (!hitValidComponent) - return false; - - result.hit = hit; - return true; - } - - private static bool TryProcessWorldHit(RaycastHit hit, ref CVRRaycastResult result) - { - if (_workingCollider.isTrigger) - return false; - - result.hitWorld = true; - result.hit = hit; - return true; - } - - #endregion Private Methods - - #region Protected Methods - - protected abstract Ray GetRayFromImpl(); - - #endregion Protected Methods - - #region Utility Because Original Methods Are Broken - - private static bool IsCVRInteractableWithinRange(Interactable interactable, RaycastHit hit) - { - if (interactable is not CVRInteractable cvrInteractable) - return true; - - foreach (CVRInteractableAction action in cvrInteractable.actions) - { - if (action.actionType - is not (CVRInteractableAction.ActionRegister.OnInteractDown - or CVRInteractableAction.ActionRegister.OnInteractUp - or CVRInteractableAction.ActionRegister.OnInputDown - or CVRInteractableAction.ActionRegister.OnInputUp)) - continue; - - float maxDistance = action.floatVal; - if (Mathf.Approximately(maxDistance, 0f) - || hit.distance <= maxDistance) - return true; // Interactable is within range - } - return false; - } - - private static bool IsCVRPickupableWithinRange(Pickupable pickupable, RaycastHit hit) - { - return hit.distance <= pickupable.MaxGrabDistance; - } - - private static bool IsCVRCanvasWrapperWithinRange(CVRCanvasWrapper canvasWrapper, RaycastHit hit) - { - return hit.distance <= canvasWrapper.MaxInteractDistance; - } - - #endregion Utility Because Original Methods Are Broken - } -} \ No newline at end of file diff --git a/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/CVRPlayerRaycasterMouse.cs b/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/CVRPlayerRaycasterMouse.cs deleted file mode 100644 index 5f5e638..0000000 --- a/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/CVRPlayerRaycasterMouse.cs +++ /dev/null @@ -1,13 +0,0 @@ -using UnityEngine; - -namespace ABI_RC.Core.Player.Interaction.RaycastImpl -{ - public class CVRPlayerRaycasterMouse : CVRPlayerRaycaster - { - private readonly Camera _camera; - public CVRPlayerRaycasterMouse(Transform rayOrigin, Camera camera) : base(rayOrigin) { _camera = camera; } - protected override Ray GetRayFromImpl() => Cursor.lockState == CursorLockMode.Locked - ? new Ray(_camera.transform.position, _camera.transform.forward) - : _camera.ScreenPointToRay(Input.mousePosition); - } -} \ No newline at end of file diff --git a/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/CVRPlayerRaycasterTransform.cs b/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/CVRPlayerRaycasterTransform.cs deleted file mode 100644 index cc62dab..0000000 --- a/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/CVRPlayerRaycasterTransform.cs +++ /dev/null @@ -1,10 +0,0 @@ -using UnityEngine; - -namespace ABI_RC.Core.Player.Interaction.RaycastImpl -{ - public class CVRPlayerRaycasterTransform : CVRPlayerRaycaster - { - public CVRPlayerRaycasterTransform(Transform rayOrigin) : base(rayOrigin) { } - protected override Ray GetRayFromImpl() => new(_rayOrigin.position, _rayOrigin.forward); - } -} \ No newline at end of file diff --git a/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/CVRRaycastResult.cs b/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/CVRRaycastResult.cs deleted file mode 100644 index 6165354..0000000 --- a/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/CVRRaycastResult.cs +++ /dev/null @@ -1,38 +0,0 @@ -using ABI_RC.Core.InteractionSystem.Base; -using ABI_RC.Core.UI; -using NAK.SuperAwesomeMod.Components; -using UnityEngine; -using UnityEngine.EventSystems; -using UnityEngine.UI; - -namespace ABI_RC.Core.Player.Interaction.RaycastImpl -{ - public struct CVRRaycastResult - { - // Hit flags - public bool hitWorld; // Any non-specific collision - public bool hitWater; // Hit a fluid volume - public bool hitCohtml; // Specifically hit a COHTML view (Main/Quick Menu) - public bool isProximityHit; // Hit was from proximity sphere check - public bool hitUnityUi; // Hit a canvas - - // Main raycast hit info - public RaycastHit hit; - public RaycastHit? waterHit; // Only valid if hitWater is true - - // Specific hit components - public Pickupable hitPickupable; - public Interactable hitInteractable; - public Selectable hitSelectable; - public ICanvasElement hitCanvasElement; - - // COHTML specific results - public CohtmlControlledView hitCohtmlView; - public Vector2 hitCohtmlCoords; - - // Telepathic pickup - public bool hasTelepathicGrabCandidate; - public Pickupable telepathicPickupable; - public Vector3 telepathicGrabPoint; - } -} \ No newline at end of file diff --git a/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/RaycastDebug.cs b/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/RaycastDebug.cs deleted file mode 100644 index 5000f89..0000000 --- a/.Deprecated/SuperAwesomeMod/Interaction/RaycastImpl/RaycastDebug.cs +++ /dev/null @@ -1,312 +0,0 @@ -using UnityEngine; -using UnityEngine.EventSystems; -using UnityEngine.UI; - -namespace ABI_RC.Core.Player.Interaction.RaycastImpl -{ -public class CVRRaycastDebugManager : MonoBehaviour -{ - #region Singleton - - private static CVRRaycastDebugManager _instance; - public static CVRRaycastDebugManager Instance => _instance; - - public static void Initialize(Camera camera) - { - if (_instance != null) return; - - var go = new GameObject("RaycastDebugManager"); - _instance = go.AddComponent(); - DontDestroyOnLoad(go); - - _instance.Setup(camera); - } - - #endregion - - #region Private Fields - - private CVRPlayerRaycasterMouse _raycaster; - private CVRRaycastResult _lastResult; - private System.Diagnostics.Stopwatch _stopwatch; - - // Performance tracking - private const int ROLLING_AVERAGE_SAMPLES = 60; // 1 second at 60fps - private readonly float[] _timeHistory = new float[ROLLING_AVERAGE_SAMPLES]; - private int _currentSampleIndex; - private float _lastRaycastTime; - private float _minRaycastTime = float.MaxValue; - private float _maxRaycastTime; - private float _rollingAverageTime; - private bool _historyFilled; - - private const int DEBUG_PANEL_WIDTH = 300; - private const int DEBUG_PANEL_MARGIN = 10; - private const float MOUSE_CURSOR_SIZE = 24f; - private const float CURSOR_OFFSET = MOUSE_CURSOR_SIZE / 2f; - - private GUIStyle _labelStyle; - private GUIStyle _headerStyle; - private GUIStyle _boxStyle; - - private static readonly Color32 TIMING_COLOR = new(255, 255, 150, 255); // Yellow - private static readonly Color32 COHTML_COLOR = new(150, 255, 150, 255); // Green - private static readonly Color32 UI_COLOR = new(150, 150, 255, 255); // Blue - private static readonly Color32 UNITY_UI_COLOR = new(255, 200, 150, 255); // Orange - private static readonly Color32 INTERACT_COLOR = new(255, 150, 150, 255); // Red - private static readonly Color32 WATER_COLOR = new(150, 255, 255, 255); // Cyan - private static readonly Color32 TELEPATHIC_COLOR = new(255, 150, 255, 255);// Purple - private static readonly Color32 SELECTABLE_COLOR = new(200, 150, 255, 255);// Light Purple - - #endregion - - #region Setup - - private void Setup(Camera camera) - { - _raycaster = new CVRPlayerRaycasterMouse(transform, camera); - _raycaster.SetLayerMask(Physics.DefaultRaycastLayers); - _stopwatch = new System.Diagnostics.Stopwatch(); - } - - #endregion - - #region MonoBehaviour - - private void Update() - { - _stopwatch.Restart(); - _lastResult = _raycaster.GetRaycastResults(); - _stopwatch.Stop(); - - UpdatePerformanceMetrics(); - } - - private void UpdatePerformanceMetrics() - { - // Calculate current frame time - _lastRaycastTime = _stopwatch.ElapsedTicks / (float)System.TimeSpan.TicksPerMillisecond; - - // Update min/max - _minRaycastTime = Mathf.Min(_minRaycastTime, _lastRaycastTime); - _maxRaycastTime = Mathf.Max(_maxRaycastTime, _lastRaycastTime); - - // Update rolling average - _timeHistory[_currentSampleIndex] = _lastRaycastTime; - - // Calculate rolling average based on filled samples - float sum = 0f; - int sampleCount = _historyFilled ? ROLLING_AVERAGE_SAMPLES : _currentSampleIndex + 1; - - for (int i = 0; i < sampleCount; i++) - sum += _timeHistory[i]; - - _rollingAverageTime = sum / sampleCount; - - // Update index for next frame - _currentSampleIndex = (_currentSampleIndex + 1) % ROLLING_AVERAGE_SAMPLES; - if (_currentSampleIndex == 0) - _historyFilled = true; - } - - private void OnGUI() - { - InitializeStyles(); - DrawDebugPanel(); - } - - #endregion - - #region Drawing Methods - - private void InitializeStyles() - { - if (_labelStyle != null) return; - - _labelStyle = new GUIStyle - { - normal = { textColor = Color.white }, - fontSize = 12, - padding = new RectOffset(5, 5, 2, 2), - margin = new RectOffset(5, 5, 0, 0) - }; - - _headerStyle = new GUIStyle - { - normal = { textColor = Color.white }, - fontSize = 14, - fontStyle = FontStyle.Bold, - padding = new RectOffset(5, 5, 5, 5), - margin = new RectOffset(5, 5, 5, 5) - }; - - _boxStyle = new GUIStyle(GUI.skin.box) - { - padding = new RectOffset(10, 10, 5, 5), - margin = new RectOffset(5, 5, 5, 5) - }; - } - - private void DrawDebugPanel() - { - var rect = new Rect( - Screen.width - DEBUG_PANEL_WIDTH - DEBUG_PANEL_MARGIN, - DEBUG_PANEL_MARGIN, - DEBUG_PANEL_WIDTH, - Screen.height - (DEBUG_PANEL_MARGIN * 2) - ); - - GUI.Box(rect, ""); - GUILayout.BeginArea(rect); - - GUI.backgroundColor = Color.black; - GUILayout.Label("Raycast Debug Info", _headerStyle); - - DrawPerformanceSection(); - DrawCohtmlSection(); - DrawUnityUISection(); - DrawSelectableSection(); - DrawInteractionSection(); - DrawWaterSection(); - DrawTelepathicSection(); - DrawWorldHitSection(); - - GUILayout.EndArea(); - } - - private void DrawPerformanceSection() - { - GUI.backgroundColor = TIMING_COLOR; - GUILayout.BeginVertical(_boxStyle); - GUILayout.Label("Performance", _headerStyle); - DrawLabel("Last Raycast", $"{_lastRaycastTime:F3} ms"); - DrawLabel("Average (1s)", $"{_rollingAverageTime:F3} ms"); - DrawLabel("Min", $"{_minRaycastTime:F3} ms"); - DrawLabel("Max", $"{_maxRaycastTime:F3} ms"); - GUILayout.EndVertical(); - } - - private void DrawCohtmlSection() - { - if (!_lastResult.hitCohtml) return; - - GUI.backgroundColor = COHTML_COLOR; - GUILayout.BeginVertical(_boxStyle); - GUILayout.Label("COHTML Hit", _headerStyle); - DrawLabel("View", _lastResult.hitCohtmlView.name); - DrawLabel("Coords", _lastResult.hitCohtmlCoords.ToString()); - GUILayout.EndVertical(); - } - - private void DrawUnityUISection() - { - if (!_lastResult.hitUnityUi || _lastResult.hitCanvasElement == null) return; - - GUI.backgroundColor = UNITY_UI_COLOR; - GUILayout.BeginVertical(_boxStyle); - GUILayout.Label("Unity UI Hit", _headerStyle); - - var canvasElement = _lastResult.hitCanvasElement; - var gameObject = canvasElement as MonoBehaviour; - - DrawLabel("Canvas Element", gameObject != null ? gameObject.name : "Unknown"); - DrawLabel("Element Type", canvasElement.GetType().Name); - - if (gameObject != null) - { - DrawLabel("GameObject", gameObject.gameObject.name); - - if (gameObject.transform.parent != null) - DrawLabel("Parent", gameObject.transform.parent.name); - } - - GUILayout.EndVertical(); - } - - private void DrawSelectableSection() - { - if (_lastResult.hitSelectable == null) return; - - GUI.backgroundColor = SELECTABLE_COLOR; - GUILayout.BeginVertical(_boxStyle); - GUILayout.Label("UI Selectable", _headerStyle); - DrawLabel("Selectable", _lastResult.hitSelectable.name); - DrawLabel("Selectable Type", _lastResult.hitSelectable.GetType().Name); - DrawLabel("Is Interactable", _lastResult.hitSelectable.interactable.ToString()); - DrawLabel("Navigation Mode", _lastResult.hitSelectable.navigation.mode.ToString()); - - if (_lastResult.hitSelectable is Toggle toggle) - DrawLabel("Toggle State", toggle.isOn.ToString()); - else if (_lastResult.hitSelectable is Slider slider) - DrawLabel("Slider Value", slider.value.ToString("F2")); - else if (_lastResult.hitSelectable is Scrollbar scrollbar) - DrawLabel("Scrollbar Value", scrollbar.value.ToString("F2")); - - GUILayout.EndVertical(); - } - - private void DrawInteractionSection() - { - if (!_lastResult.hitPickupable && !_lastResult.hitInteractable) return; - - GUI.backgroundColor = INTERACT_COLOR; - GUILayout.BeginVertical(_boxStyle); - GUILayout.Label("Interaction", _headerStyle); - if (_lastResult.hitPickupable) - DrawLabel("Pickupable", _lastResult.hitPickupable.name); - if (_lastResult.hitInteractable) - DrawLabel("Interactable", _lastResult.hitInteractable.name); - DrawLabel("Is Proximity", _lastResult.isProximityHit.ToString()); - GUILayout.EndVertical(); - } - - private void DrawWaterSection() - { - if (!_lastResult.hitWater || !_lastResult.waterHit.HasValue) return; - - GUI.backgroundColor = WATER_COLOR; - GUILayout.BeginVertical(_boxStyle); - GUILayout.Label("Water Surface", _headerStyle); - DrawLabel("Hit Point", _lastResult.waterHit.Value.point.ToString("F2")); - DrawLabel("Surface Normal", _lastResult.waterHit.Value.normal.ToString("F2")); - GUILayout.EndVertical(); - } - - private void DrawTelepathicSection() - { - if (!_lastResult.hasTelepathicGrabCandidate) return; - - GUI.backgroundColor = TELEPATHIC_COLOR; - GUILayout.BeginVertical(_boxStyle); - GUILayout.Label("Telepathic Grab", _headerStyle); - DrawLabel("Target", _lastResult.telepathicPickupable.name); - DrawLabel("Grab Point", _lastResult.telepathicGrabPoint.ToString("F2")); - GUILayout.EndVertical(); - } - - private void DrawWorldHitSection() - { - if (_lastResult.hitCohtml || - _lastResult.hitPickupable || - _lastResult.hitInteractable || - _lastResult.hitUnityUi || - !_lastResult.hitWorld || - _lastResult.hit.collider == null) return; - - GUI.backgroundColor = Color.grey; - GUILayout.BeginVertical(_boxStyle); - GUILayout.Label("World Hit", _headerStyle); - DrawLabel("Object", _lastResult.hit.collider.name); - DrawLabel("Distance", _lastResult.hit.distance.ToString("F2")); - DrawLabel("Point", _lastResult.hit.point.ToString("F2")); - GUILayout.EndVertical(); - } - - private void DrawLabel(string label, string value) - { - GUILayout.Label($"{label}: {value}", _labelStyle); - } - - #endregion -} -} \ No newline at end of file diff --git a/.Deprecated/SuperAwesomeMod/Main.cs b/.Deprecated/SuperAwesomeMod/Main.cs deleted file mode 100644 index 5c410f2..0000000 --- a/.Deprecated/SuperAwesomeMod/Main.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System.Reflection; -using ABI_RC.Core.Base.Jobs; -using ABI_RC.Core.InteractionSystem; -using ABI_RC.Core.Player; -using ABI_RC.Core.Player.Interaction.RaycastImpl; -using ABI_RC.Core.Util.AssetFiltering; -using ABI.CCK.Components; -using HarmonyLib; -using MelonLoader; -using NAK.SuperAwesomeMod.Components; -using UnityEngine; -using UnityEngine.SceneManagement; - -namespace NAK.SuperAwesomeMod; - -public class SuperAwesomeModMod : MelonMod -{ - #region Melon Events - - public override void OnInitializeMelon() - { - HarmonyInstance.Patch( - typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.Start), - BindingFlags.NonPublic | BindingFlags.Instance), - postfix: new HarmonyMethod(typeof(SuperAwesomeModMod).GetMethod(nameof(OnPlayerSetupStart), - BindingFlags.NonPublic | BindingFlags.Static)) - ); - - HarmonyInstance.Patch( - typeof(SceneLoaded).GetMethod(nameof(SceneLoaded.FilterWorldComponent), - BindingFlags.NonPublic | BindingFlags.Static), - postfix: new HarmonyMethod(typeof(SuperAwesomeModMod).GetMethod(nameof(OnShitLoaded), - BindingFlags.NonPublic | BindingFlags.Static)) - ); - - // patch SharedFilter.ProcessCanvas - HarmonyInstance.Patch( - typeof(SharedFilter).GetMethod(nameof(SharedFilter.ProcessCanvas), - BindingFlags.Public | BindingFlags.Static), - postfix: new HarmonyMethod(typeof(SuperAwesomeModMod).GetMethod(nameof(OnProcessCanvas), - BindingFlags.NonPublic | BindingFlags.Static)) - ); - - LoggerInstance.Msg("SuperAwesomeModMod! OnInitializeMelon! :D"); - } - - public override void OnApplicationQuit() - { - LoggerInstance.Msg("SuperAwesomeModMod! OnApplicationQuit! D:"); - } - - #endregion Melon Events - - private static void OnPlayerSetupStart() - { - CVRRaycastDebugManager.Initialize(PlayerSetup.Instance.desktopCam); - } - - private static void OnShitLoaded(Component c, List asyncTasks = null, Scene? scene = null) - { - if (c == null) - return; - - if (c.gameObject == null) - return; - - if (c.gameObject.scene.buildIndex > 0) - return; - - if ((scene != null) - && (c.gameObject.scene != scene)) - return; - - if (c is Canvas canvas) canvas.gameObject.AddComponent(); - } - - private static void OnProcessCanvas(string collectionId, Canvas canvas) - { - canvas.gameObject.AddComponent(); - } -} \ No newline at end of file diff --git a/.Deprecated/SuperAwesomeMod/README.md b/.Deprecated/SuperAwesomeMod/README.md deleted file mode 100644 index 399e70a..0000000 --- a/.Deprecated/SuperAwesomeMod/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# ASTExtension - -Extension mod for [Avatar Scale Tool](https://github.com/NotAKidoS/AvatarScaleTool): -- VR Gesture to scale -- Persistent height -- Copy height from others - -Best used with Avatar Scale Tool, but will attempt to work with found scaling setups. -Requires already having Avatar Scaling on the avatar. This is **not** Universal Scaling. - -## Supported Setups - -ASTExtension will attempt to work with the following setups: - -**Parameter Names:** -- AvatarScale -- Scale -- Scaler -- Scale/Scale -- Height -- LoliModifier -- AvatarSize -- Size -- SizeScale -- Scaling - -These parameter names are not case sensitive and have been gathered from polling the community for common parameter names. - -Assuming the parameter is a float, ASTExtension will attempt to use it as the height parameter. Will automatically calibrate to the height range of the found parameter, assuming the scaling animation is in a blend tree / state using motion time & is linear. The scaling animation state **must be active** at time of avatar load. - -The max value ASTExtension will drive the parameter to is 100. As the mod is having to guess the max height, it may not be accurate if the max height is not capped at a multiple of 10. - -Examples: -- `AvatarScale` - 0 to 1 (slider) - - This is the default setup for Avatar Scale Tool and will work perfectly. -- `Scale` - 0 to 100 (input single) - - This will also work perfectly as the max height is a multiple of 10. -- `Height` - 0 to 2 (input single) - - This will not work properly. The max value to drive the parameter to is not a multiple of 10, and as such ASTExtension will believe the parameter range is 0 to 1. -- `BurntToast` - 0 to 10 (input single) - - This will not work properly. The parameter name is not recognized by ASTExtension. - -If your setup is theoretically supported but not working, it is likely the scaling animation is not linear or has loop enabled if using Motion Time, making the first and last frame identical height. In this case, you will need to fix your animation clip curves / blend tree to be linear &|| not loop, or use Avatar Scale Tool to generate a new scaling animation. - ---- - -Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI. -https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games - -> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive. - -> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use. - -> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive. diff --git a/.Deprecated/SuperAwesomeMod/format.json b/.Deprecated/SuperAwesomeMod/format.json deleted file mode 100644 index 5ad14ea..0000000 --- a/.Deprecated/SuperAwesomeMod/format.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "_id": 223, - "name": "ASTExtension", - "modversion": "1.0.2", - "gameversion": "2025r178", - "loaderversion": "0.6.1", - "modtype": "Mod", - "author": "NotAKidoS", - "description": "Extension mod for [Avatar Scale Tool](https://github.com/NotAKidoS/AvatarScaleTool):\n- VR Gesture to scale\n- Persistent height\n- Copy height from others\n\nBest used with Avatar Scale Tool, but will attempt to work with found scaling setups.\nRequires already having Avatar Scaling on the avatar. This is **not** Universal Scaling.", - "searchtags": [ - "tool", - "scaling", - "height", - "extension", - "avatar" - ], - "requirements": [ - "BTKUILib" - ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r45/ASTExtension.dll", - "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/ASTExtension/", - "changelog": "- Fixes for 2025r178", - "embedcolor": "#f61963" -} \ No newline at end of file diff --git a/.Deprecated/WhereAmIPointing/Main.cs b/.Deprecated/WhereAmIPointing/Main.cs deleted file mode 100644 index 24529b4..0000000 --- a/.Deprecated/WhereAmIPointing/Main.cs +++ /dev/null @@ -1,106 +0,0 @@ -using ABI_RC.Core.InteractionSystem; -using HarmonyLib; -using MelonLoader; -using UnityEngine; - -namespace NAK.WhereAmIPointing; - -public class WhereAmIPointingMod : MelonMod -{ - #region Melon Preferences - - // cannot disable because then id need extra logic to reset the alpha :) - // private const string SettingsCategory = nameof(WhereAmIPointingMod); - // - // private static readonly MelonPreferences_Category Category = - // MelonPreferences.CreateCategory(SettingsCategory); - // - // private static readonly MelonPreferences_Entry Entry_Enabled = - // Category.CreateEntry("enabled", true, display_name: "Enabled",description: "Toggle WhereAmIPointingMod entirely."); - - #endregion Melon Preferences - - public override void OnInitializeMelon() - { - ApplyPatches(typeof(ControllerRay_Patches)); - } - - private void ApplyPatches(Type type) - { - try - { - HarmonyInstance.PatchAll(type); - } - catch (Exception e) - { - LoggerInstance.Msg($"Failed while patching {type.Name}!"); - LoggerInstance.Error(e); - } - } - - #region Patches - - private static class ControllerRay_Patches - { - private const float ORIGINAL_ALPHA = 0.502f; - private const float INTERACTION_ALPHA = 0.1f; - private const float RAY_LENGTH = 1000f; // game normally raycasts to PositiveInfinity... -_- - - [HarmonyPostfix] - [HarmonyPatch(typeof(ControllerRay), nameof(ControllerRay.LateUpdate))] - private static void Postfix_ControllerRay_LateUpdate(ref ControllerRay __instance) - { - if (__instance.isDesktopRay - || !__instance.enabled - || !__instance.IsTracking() - || !__instance.lineRenderer) - return; - - UpdateLineRendererAlpha(__instance); - - if (__instance.lineRenderer.enabled - || !ShouldOverrideLineRenderer(__instance)) - return; - - UpdateLineRendererPosition(__instance); - } - - private static void UpdateLineRendererAlpha(ControllerRay instance) - { - Material material = instance.lineRenderer.material; - Color color = material.color; - - bool anyMenuOpen = ViewManager.Instance.IsAnyMenuOpen; - float targetAlpha = (!anyMenuOpen || instance.uiActive) ? ORIGINAL_ALPHA : INTERACTION_ALPHA; - if (!(Math.Abs(color.a - targetAlpha) > float.Epsilon)) - return; - - color.a = targetAlpha; - material.color = color; - } - - private static bool ShouldOverrideLineRenderer(ControllerRay instance) - { - if (!ViewManager.Instance.IsAnyMenuOpen) - return false; - - if (CVR_MenuManager.Instance.IsQuickMenuOpen - && instance.hand == CVR_MenuManager.Instance.SelectedQuickMenuHand) - return false; - - return true; - } - - private static void UpdateLineRendererPosition(ControllerRay instance) - { - Vector3 rayOrigin = instance.rayDirectionTransform.position; - Vector3 rayEnd = rayOrigin + instance.rayDirectionTransform.forward * RAY_LENGTH; - - instance.lineRenderer.SetPosition(0, instance.lineRenderer.transform.InverseTransformPoint(rayOrigin)); - instance.lineRenderer.SetPosition(1, instance.lineRenderer.transform.InverseTransformPoint(rayEnd)); - instance.lineRenderer.enabled = true; - } - } - - #endregion Patches -} \ No newline at end of file diff --git a/.Deprecated/WhereAmIPointing/Properties/AssemblyInfo.cs b/.Deprecated/WhereAmIPointing/Properties/AssemblyInfo.cs deleted file mode 100644 index 48c359f..0000000 --- a/.Deprecated/WhereAmIPointing/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using NAK.WhereAmIPointing.Properties; -using MelonLoader; -using System.Reflection; - -[assembly: AssemblyVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyTitle(nameof(NAK.WhereAmIPointing))] -[assembly: AssemblyCompany(AssemblyInfoParams.Author)] -[assembly: AssemblyProduct(nameof(NAK.WhereAmIPointing))] - -[assembly: MelonInfo( - typeof(NAK.WhereAmIPointing.WhereAmIPointingMod), - nameof(NAK.WhereAmIPointing), - AssemblyInfoParams.Version, - AssemblyInfoParams.Author, - downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/WhereAmIPointing" -)] - -[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] -[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] -[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] -[assembly: MelonColor(255, 246, 25, 99)] // red-pink -[assembly: MelonAuthorColor(255, 158, 21, 32)] // red -[assembly: HarmonyDontPatchAll] - -namespace NAK.WhereAmIPointing.Properties; -internal static class AssemblyInfoParams -{ - public const string Version = "1.0.1"; - public const string Author = "NotAKidoS"; -} \ No newline at end of file diff --git a/.Deprecated/WhereAmIPointing/WhereAmIPointing.csproj b/.Deprecated/WhereAmIPointing/WhereAmIPointing.csproj deleted file mode 100644 index 728edb7..0000000 --- a/.Deprecated/WhereAmIPointing/WhereAmIPointing.csproj +++ /dev/null @@ -1,6 +0,0 @@ - - - - net48 - - diff --git a/.Deprecated/AASBufferFix/AASBufferFix.csproj b/.DepricatedMods/AASBufferFix/AASBufferFix.csproj similarity index 100% rename from .Deprecated/AASBufferFix/AASBufferFix.csproj rename to .DepricatedMods/AASBufferFix/AASBufferFix.csproj diff --git a/.Deprecated/AASBufferFix/AASBufferHelper.cs b/.DepricatedMods/AASBufferFix/AASBufferHelper.cs similarity index 100% rename from .Deprecated/AASBufferFix/AASBufferHelper.cs rename to .DepricatedMods/AASBufferFix/AASBufferHelper.cs diff --git a/.Deprecated/AASBufferFix/HarmonyPatches.cs b/.DepricatedMods/AASBufferFix/HarmonyPatches.cs similarity index 100% rename from .Deprecated/AASBufferFix/HarmonyPatches.cs rename to .DepricatedMods/AASBufferFix/HarmonyPatches.cs diff --git a/.Deprecated/AASBufferFix/Main.cs b/.DepricatedMods/AASBufferFix/Main.cs similarity index 100% rename from .Deprecated/AASBufferFix/Main.cs rename to .DepricatedMods/AASBufferFix/Main.cs diff --git a/.Deprecated/AASBufferFix/Properties/AssemblyInfo.cs b/.DepricatedMods/AASBufferFix/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/AASBufferFix/Properties/AssemblyInfo.cs rename to .DepricatedMods/AASBufferFix/Properties/AssemblyInfo.cs diff --git a/.Deprecated/AASBufferFix/README.md b/.DepricatedMods/AASBufferFix/README.md similarity index 100% rename from .Deprecated/AASBufferFix/README.md rename to .DepricatedMods/AASBufferFix/README.md diff --git a/.Deprecated/AASBufferFix/Utils.cs b/.DepricatedMods/AASBufferFix/Utils.cs similarity index 100% rename from .Deprecated/AASBufferFix/Utils.cs rename to .DepricatedMods/AASBufferFix/Utils.cs diff --git a/.Deprecated/AASBufferFix/format.json b/.DepricatedMods/AASBufferFix/format.json similarity index 100% rename from .Deprecated/AASBufferFix/format.json rename to .DepricatedMods/AASBufferFix/format.json diff --git a/.Deprecated/AlternateIKSystem/AlternateIKSystem.csproj b/.DepricatedMods/AlternateIKSystem/AlternateIKSystem.csproj similarity index 100% rename from .Deprecated/AlternateIKSystem/AlternateIKSystem.csproj rename to .DepricatedMods/AlternateIKSystem/AlternateIKSystem.csproj diff --git a/.Deprecated/AlternateIKSystem/HarmonyPatches.cs b/.DepricatedMods/AlternateIKSystem/HarmonyPatches.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/HarmonyPatches.cs rename to .DepricatedMods/AlternateIKSystem/HarmonyPatches.cs diff --git a/.Deprecated/AlternateIKSystem/IK/BodyControl.cs b/.DepricatedMods/AlternateIKSystem/IK/BodyControl.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/BodyControl.cs rename to .DepricatedMods/AlternateIKSystem/IK/BodyControl.cs diff --git a/.Deprecated/AlternateIKSystem/IK/IKCalibrator.cs b/.DepricatedMods/AlternateIKSystem/IK/IKCalibrator.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/IKCalibrator.cs rename to .DepricatedMods/AlternateIKSystem/IK/IKCalibrator.cs diff --git a/.Deprecated/AlternateIKSystem/IK/IKHandlers/IKHandler.cs b/.DepricatedMods/AlternateIKSystem/IK/IKHandlers/IKHandler.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/IKHandlers/IKHandler.cs rename to .DepricatedMods/AlternateIKSystem/IK/IKHandlers/IKHandler.cs diff --git a/.Deprecated/AlternateIKSystem/IK/IKHandlers/IKHandlerDesktop.cs b/.DepricatedMods/AlternateIKSystem/IK/IKHandlers/IKHandlerDesktop.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/IKHandlers/IKHandlerDesktop.cs rename to .DepricatedMods/AlternateIKSystem/IK/IKHandlers/IKHandlerDesktop.cs diff --git a/.Deprecated/AlternateIKSystem/IK/IKHandlers/IKHandlerHalfBody.cs b/.DepricatedMods/AlternateIKSystem/IK/IKHandlers/IKHandlerHalfBody.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/IKHandlers/IKHandlerHalfBody.cs rename to .DepricatedMods/AlternateIKSystem/IK/IKHandlers/IKHandlerHalfBody.cs diff --git a/.Deprecated/AlternateIKSystem/IK/IKManager.cs b/.DepricatedMods/AlternateIKSystem/IK/IKManager.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/IKManager.cs rename to .DepricatedMods/AlternateIKSystem/IK/IKManager.cs diff --git a/.Deprecated/AlternateIKSystem/IK/MusclePoses.cs b/.DepricatedMods/AlternateIKSystem/IK/MusclePoses.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/MusclePoses.cs rename to .DepricatedMods/AlternateIKSystem/IK/MusclePoses.cs diff --git a/.Deprecated/AlternateIKSystem/IK/Tracking/SteamVRTrackerManager.cs b/.DepricatedMods/AlternateIKSystem/IK/Tracking/SteamVRTrackerManager.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/Tracking/SteamVRTrackerManager.cs rename to .DepricatedMods/AlternateIKSystem/IK/Tracking/SteamVRTrackerManager.cs diff --git a/.Deprecated/AlternateIKSystem/IK/VRIKHelpers/VRIKLocomotionData.cs b/.DepricatedMods/AlternateIKSystem/IK/VRIKHelpers/VRIKLocomotionData.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/VRIKHelpers/VRIKLocomotionData.cs rename to .DepricatedMods/AlternateIKSystem/IK/VRIKHelpers/VRIKLocomotionData.cs diff --git a/.Deprecated/AlternateIKSystem/IK/VRIKHelpers/VRIKUtils.cs b/.DepricatedMods/AlternateIKSystem/IK/VRIKHelpers/VRIKUtils.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/VRIKHelpers/VRIKUtils.cs rename to .DepricatedMods/AlternateIKSystem/IK/VRIKHelpers/VRIKUtils.cs diff --git a/.Deprecated/AlternateIKSystem/IK/WeightManipulators/BodyParts/BodyPart.cs b/.DepricatedMods/AlternateIKSystem/IK/WeightManipulators/BodyParts/BodyPart.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/WeightManipulators/BodyParts/BodyPart.cs rename to .DepricatedMods/AlternateIKSystem/IK/WeightManipulators/BodyParts/BodyPart.cs diff --git a/.Deprecated/AlternateIKSystem/IK/WeightManipulators/DeviceControlManipulator.cs b/.DepricatedMods/AlternateIKSystem/IK/WeightManipulators/DeviceControlManipulator.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/WeightManipulators/DeviceControlManipulator.cs rename to .DepricatedMods/AlternateIKSystem/IK/WeightManipulators/DeviceControlManipulator.cs diff --git a/.Deprecated/AlternateIKSystem/IK/WeightManipulators/Interface/IWeightManipulator.cs b/.DepricatedMods/AlternateIKSystem/IK/WeightManipulators/Interface/IWeightManipulator.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/WeightManipulators/Interface/IWeightManipulator.cs rename to .DepricatedMods/AlternateIKSystem/IK/WeightManipulators/Interface/IWeightManipulator.cs diff --git a/.Deprecated/AlternateIKSystem/IK/WeightManipulators/TrackingControlManipulator.cs b/.DepricatedMods/AlternateIKSystem/IK/WeightManipulators/TrackingControlManipulator.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/WeightManipulators/TrackingControlManipulator.cs rename to .DepricatedMods/AlternateIKSystem/IK/WeightManipulators/TrackingControlManipulator.cs diff --git a/.Deprecated/AlternateIKSystem/IK/WeightManipulators/WeightManipulatorManager.cs b/.DepricatedMods/AlternateIKSystem/IK/WeightManipulators/WeightManipulatorManager.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/IK/WeightManipulators/WeightManipulatorManager.cs rename to .DepricatedMods/AlternateIKSystem/IK/WeightManipulators/WeightManipulatorManager.cs diff --git a/.Deprecated/AlternateIKSystem/Integrations/BTKUIAddon.cs b/.DepricatedMods/AlternateIKSystem/Integrations/BTKUIAddon.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/Integrations/BTKUIAddon.cs rename to .DepricatedMods/AlternateIKSystem/Integrations/BTKUIAddon.cs diff --git a/.Deprecated/AlternateIKSystem/LICENSE.txt b/.DepricatedMods/AlternateIKSystem/LICENSE.txt similarity index 100% rename from .Deprecated/AlternateIKSystem/LICENSE.txt rename to .DepricatedMods/AlternateIKSystem/LICENSE.txt diff --git a/.Deprecated/AlternateIKSystem/Main.cs b/.DepricatedMods/AlternateIKSystem/Main.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/Main.cs rename to .DepricatedMods/AlternateIKSystem/Main.cs diff --git a/.Deprecated/AlternateIKSystem/ModSettings.cs b/.DepricatedMods/AlternateIKSystem/ModSettings.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/ModSettings.cs rename to .DepricatedMods/AlternateIKSystem/ModSettings.cs diff --git a/.Deprecated/AlternateIKSystem/Properties/AssemblyInfo.cs b/.DepricatedMods/AlternateIKSystem/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/AlternateIKSystem/Properties/AssemblyInfo.cs rename to .DepricatedMods/AlternateIKSystem/Properties/AssemblyInfo.cs diff --git a/.Deprecated/AlternateIKSystem/README.md b/.DepricatedMods/AlternateIKSystem/README.md similarity index 100% rename from .Deprecated/AlternateIKSystem/README.md rename to .DepricatedMods/AlternateIKSystem/README.md diff --git a/.Deprecated/AlternateIKSystem/format.json b/.DepricatedMods/AlternateIKSystem/format.json similarity index 100% rename from .Deprecated/AlternateIKSystem/format.json rename to .DepricatedMods/AlternateIKSystem/format.json diff --git a/.Deprecated/BadAnimatorFix/BadAnimatorFix.csproj b/.DepricatedMods/BadAnimatorFix/BadAnimatorFix.csproj similarity index 100% rename from .Deprecated/BadAnimatorFix/BadAnimatorFix.csproj rename to .DepricatedMods/BadAnimatorFix/BadAnimatorFix.csproj diff --git a/.Deprecated/BadAnimatorFix/BadAnimatorFixManager.cs b/.DepricatedMods/BadAnimatorFix/BadAnimatorFixManager.cs similarity index 100% rename from .Deprecated/BadAnimatorFix/BadAnimatorFixManager.cs rename to .DepricatedMods/BadAnimatorFix/BadAnimatorFixManager.cs diff --git a/.Deprecated/BadAnimatorFix/BadAnimatorFixer.cs b/.DepricatedMods/BadAnimatorFix/BadAnimatorFixer.cs similarity index 100% rename from .Deprecated/BadAnimatorFix/BadAnimatorFixer.cs rename to .DepricatedMods/BadAnimatorFix/BadAnimatorFixer.cs diff --git a/.Deprecated/BadAnimatorFix/HarmonyPatches.cs b/.DepricatedMods/BadAnimatorFix/HarmonyPatches.cs similarity index 100% rename from .Deprecated/BadAnimatorFix/HarmonyPatches.cs rename to .DepricatedMods/BadAnimatorFix/HarmonyPatches.cs diff --git a/.Deprecated/BadAnimatorFix/Main.cs b/.DepricatedMods/BadAnimatorFix/Main.cs similarity index 100% rename from .Deprecated/BadAnimatorFix/Main.cs rename to .DepricatedMods/BadAnimatorFix/Main.cs diff --git a/.Deprecated/BadAnimatorFix/Properties/AssemblyInfo.cs b/.DepricatedMods/BadAnimatorFix/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/BadAnimatorFix/Properties/AssemblyInfo.cs rename to .DepricatedMods/BadAnimatorFix/Properties/AssemblyInfo.cs diff --git a/.Deprecated/BadAnimatorFix/format.json b/.DepricatedMods/BadAnimatorFix/format.json similarity index 100% rename from .Deprecated/BadAnimatorFix/format.json rename to .DepricatedMods/BadAnimatorFix/format.json diff --git a/.Deprecated/Blackout/AssetHandler.cs b/.DepricatedMods/Blackout/AssetHandler.cs similarity index 100% rename from .Deprecated/Blackout/AssetHandler.cs rename to .DepricatedMods/Blackout/AssetHandler.cs diff --git a/.Deprecated/Blackout/Blackout.csproj b/.DepricatedMods/Blackout/Blackout.csproj similarity index 100% rename from .Deprecated/Blackout/Blackout.csproj rename to .DepricatedMods/Blackout/Blackout.csproj diff --git a/.Deprecated/Blackout/BlackoutController.cs b/.DepricatedMods/Blackout/BlackoutController.cs similarity index 100% rename from .Deprecated/Blackout/BlackoutController.cs rename to .DepricatedMods/Blackout/BlackoutController.cs diff --git a/.Deprecated/Blackout/HarmonyPatches.cs b/.DepricatedMods/Blackout/HarmonyPatches.cs similarity index 100% rename from .Deprecated/Blackout/HarmonyPatches.cs rename to .DepricatedMods/Blackout/HarmonyPatches.cs diff --git a/.Deprecated/Blackout/Integrations/BTKUIAddon.cs b/.DepricatedMods/Blackout/Integrations/BTKUIAddon.cs similarity index 100% rename from .Deprecated/Blackout/Integrations/BTKUIAddon.cs rename to .DepricatedMods/Blackout/Integrations/BTKUIAddon.cs diff --git a/.Deprecated/Blackout/Integrations/UIExpansionKitAddon.cs b/.DepricatedMods/Blackout/Integrations/UIExpansionKitAddon.cs similarity index 100% rename from .Deprecated/Blackout/Integrations/UIExpansionKitAddon.cs rename to .DepricatedMods/Blackout/Integrations/UIExpansionKitAddon.cs diff --git a/.Deprecated/Blackout/Main.cs b/.DepricatedMods/Blackout/Main.cs similarity index 100% rename from .Deprecated/Blackout/Main.cs rename to .DepricatedMods/Blackout/Main.cs diff --git a/.Deprecated/Blackout/Properties/AssemblyInfo.cs b/.DepricatedMods/Blackout/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/Blackout/Properties/AssemblyInfo.cs rename to .DepricatedMods/Blackout/Properties/AssemblyInfo.cs diff --git a/.Deprecated/Blackout/Resource1.Designer.cs b/.DepricatedMods/Blackout/Resource1.Designer.cs similarity index 100% rename from .Deprecated/Blackout/Resource1.Designer.cs rename to .DepricatedMods/Blackout/Resource1.Designer.cs diff --git a/.Deprecated/Blackout/Resource1.resx b/.DepricatedMods/Blackout/Resource1.resx similarity index 100% rename from .Deprecated/Blackout/Resource1.resx rename to .DepricatedMods/Blackout/Resource1.resx diff --git a/.Deprecated/Blackout/format.json b/.DepricatedMods/Blackout/format.json similarity index 100% rename from .Deprecated/Blackout/format.json rename to .DepricatedMods/Blackout/format.json diff --git a/.Deprecated/Blackout/resources/blackout_controller.asset b/.DepricatedMods/Blackout/resources/blackout_controller.asset similarity index 100% rename from .Deprecated/Blackout/resources/blackout_controller.asset rename to .DepricatedMods/Blackout/resources/blackout_controller.asset diff --git a/.Deprecated/CameraFixes/CameraFixes.csproj b/.DepricatedMods/CameraFixes/CameraFixes.csproj similarity index 100% rename from .Deprecated/CameraFixes/CameraFixes.csproj rename to .DepricatedMods/CameraFixes/CameraFixes.csproj diff --git a/.Deprecated/CameraFixes/HarmonyPatches.cs b/.DepricatedMods/CameraFixes/HarmonyPatches.cs similarity index 100% rename from .Deprecated/CameraFixes/HarmonyPatches.cs rename to .DepricatedMods/CameraFixes/HarmonyPatches.cs diff --git a/.Deprecated/CameraFixes/Main.cs b/.DepricatedMods/CameraFixes/Main.cs similarity index 100% rename from .Deprecated/CameraFixes/Main.cs rename to .DepricatedMods/CameraFixes/Main.cs diff --git a/.Deprecated/CameraFixes/Properties/AssemblyInfo.cs b/.DepricatedMods/CameraFixes/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/CameraFixes/Properties/AssemblyInfo.cs rename to .DepricatedMods/CameraFixes/Properties/AssemblyInfo.cs diff --git a/.Deprecated/CameraFixes/format.json b/.DepricatedMods/CameraFixes/format.json similarity index 100% rename from .Deprecated/CameraFixes/format.json rename to .DepricatedMods/CameraFixes/format.json diff --git a/.Deprecated/ClearHudNotifications/ClearHudNotifications.csproj b/.DepricatedMods/ClearHudNotifications/ClearHudNotifications.csproj similarity index 100% rename from .Deprecated/ClearHudNotifications/ClearHudNotifications.csproj rename to .DepricatedMods/ClearHudNotifications/ClearHudNotifications.csproj diff --git a/.Deprecated/ClearHudNotifications/HarmonyPatches.cs b/.DepricatedMods/ClearHudNotifications/HarmonyPatches.cs similarity index 100% rename from .Deprecated/ClearHudNotifications/HarmonyPatches.cs rename to .DepricatedMods/ClearHudNotifications/HarmonyPatches.cs diff --git a/.Deprecated/ClearHudNotifications/Main.cs b/.DepricatedMods/ClearHudNotifications/Main.cs similarity index 100% rename from .Deprecated/ClearHudNotifications/Main.cs rename to .DepricatedMods/ClearHudNotifications/Main.cs diff --git a/.Deprecated/ClearHudNotifications/Properties/AssemblyInfo.cs b/.DepricatedMods/ClearHudNotifications/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/ClearHudNotifications/Properties/AssemblyInfo.cs rename to .DepricatedMods/ClearHudNotifications/Properties/AssemblyInfo.cs diff --git a/.Deprecated/ClearHudNotifications/format.json b/.DepricatedMods/ClearHudNotifications/format.json similarity index 100% rename from .Deprecated/ClearHudNotifications/format.json rename to .DepricatedMods/ClearHudNotifications/format.json diff --git a/.Deprecated/ControllerFreeze/ControllerFreeze.csproj b/.DepricatedMods/ControllerFreeze/ControllerFreeze.csproj similarity index 100% rename from .Deprecated/ControllerFreeze/ControllerFreeze.csproj rename to .DepricatedMods/ControllerFreeze/ControllerFreeze.csproj diff --git a/.Deprecated/ControllerFreeze/HarmonyPatches.cs b/.DepricatedMods/ControllerFreeze/HarmonyPatches.cs similarity index 100% rename from .Deprecated/ControllerFreeze/HarmonyPatches.cs rename to .DepricatedMods/ControllerFreeze/HarmonyPatches.cs diff --git a/.Deprecated/ControllerFreeze/Main.cs b/.DepricatedMods/ControllerFreeze/Main.cs similarity index 100% rename from .Deprecated/ControllerFreeze/Main.cs rename to .DepricatedMods/ControllerFreeze/Main.cs diff --git a/.Deprecated/ControllerFreeze/Properties/AssemblyInfo.cs b/.DepricatedMods/ControllerFreeze/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/ControllerFreeze/Properties/AssemblyInfo.cs rename to .DepricatedMods/ControllerFreeze/Properties/AssemblyInfo.cs diff --git a/.Deprecated/ControllerFreeze/README.md b/.DepricatedMods/ControllerFreeze/README.md similarity index 100% rename from .Deprecated/ControllerFreeze/README.md rename to .DepricatedMods/ControllerFreeze/README.md diff --git a/.Deprecated/ControllerFreeze/format.json b/.DepricatedMods/ControllerFreeze/format.json similarity index 100% rename from .Deprecated/ControllerFreeze/format.json rename to .DepricatedMods/ControllerFreeze/format.json diff --git a/.Deprecated/DesktopVRIK/DesktopVRIK.csproj b/.DepricatedMods/DesktopVRIK/DesktopVRIK.csproj similarity index 100% rename from .Deprecated/DesktopVRIK/DesktopVRIK.csproj rename to .DepricatedMods/DesktopVRIK/DesktopVRIK.csproj diff --git a/.Deprecated/DesktopVRIK/HarmonyPatches.cs b/.DepricatedMods/DesktopVRIK/HarmonyPatches.cs similarity index 100% rename from .Deprecated/DesktopVRIK/HarmonyPatches.cs rename to .DepricatedMods/DesktopVRIK/HarmonyPatches.cs diff --git a/.Deprecated/DesktopVRIK/IK/IKCalibrator.cs b/.DepricatedMods/DesktopVRIK/IK/IKCalibrator.cs similarity index 100% rename from .Deprecated/DesktopVRIK/IK/IKCalibrator.cs rename to .DepricatedMods/DesktopVRIK/IK/IKCalibrator.cs diff --git a/.Deprecated/DesktopVRIK/IK/IKHandlers/IKHandler.cs b/.DepricatedMods/DesktopVRIK/IK/IKHandlers/IKHandler.cs similarity index 100% rename from .Deprecated/DesktopVRIK/IK/IKHandlers/IKHandler.cs rename to .DepricatedMods/DesktopVRIK/IK/IKHandlers/IKHandler.cs diff --git a/.Deprecated/DesktopVRIK/IK/IKHandlers/IKHandlerDesktop.cs b/.DepricatedMods/DesktopVRIK/IK/IKHandlers/IKHandlerDesktop.cs similarity index 100% rename from .Deprecated/DesktopVRIK/IK/IKHandlers/IKHandlerDesktop.cs rename to .DepricatedMods/DesktopVRIK/IK/IKHandlers/IKHandlerDesktop.cs diff --git a/.Deprecated/DesktopVRIK/IK/IKManager.cs b/.DepricatedMods/DesktopVRIK/IK/IKManager.cs similarity index 100% rename from .Deprecated/DesktopVRIK/IK/IKManager.cs rename to .DepricatedMods/DesktopVRIK/IK/IKManager.cs diff --git a/.Deprecated/DesktopVRIK/IK/MusclePoses.cs b/.DepricatedMods/DesktopVRIK/IK/MusclePoses.cs similarity index 100% rename from .Deprecated/DesktopVRIK/IK/MusclePoses.cs rename to .DepricatedMods/DesktopVRIK/IK/MusclePoses.cs diff --git a/.Deprecated/DesktopVRIK/IK/VRIKHelpers/VRIKLocomotionData.cs b/.DepricatedMods/DesktopVRIK/IK/VRIKHelpers/VRIKLocomotionData.cs similarity index 100% rename from .Deprecated/DesktopVRIK/IK/VRIKHelpers/VRIKLocomotionData.cs rename to .DepricatedMods/DesktopVRIK/IK/VRIKHelpers/VRIKLocomotionData.cs diff --git a/.Deprecated/DesktopVRIK/IK/VRIKHelpers/VRIKUtils.cs b/.DepricatedMods/DesktopVRIK/IK/VRIKHelpers/VRIKUtils.cs similarity index 100% rename from .Deprecated/DesktopVRIK/IK/VRIKHelpers/VRIKUtils.cs rename to .DepricatedMods/DesktopVRIK/IK/VRIKHelpers/VRIKUtils.cs diff --git a/.Deprecated/DesktopVRIK/Integrations/AMTAddon.cs b/.DepricatedMods/DesktopVRIK/Integrations/AMTAddon.cs similarity index 100% rename from .Deprecated/DesktopVRIK/Integrations/AMTAddon.cs rename to .DepricatedMods/DesktopVRIK/Integrations/AMTAddon.cs diff --git a/.Deprecated/DesktopVRIK/Integrations/BTKUIAddon.cs b/.DepricatedMods/DesktopVRIK/Integrations/BTKUIAddon.cs similarity index 100% rename from .Deprecated/DesktopVRIK/Integrations/BTKUIAddon.cs rename to .DepricatedMods/DesktopVRIK/Integrations/BTKUIAddon.cs diff --git a/.Deprecated/DesktopVRIK/Main.cs b/.DepricatedMods/DesktopVRIK/Main.cs similarity index 100% rename from .Deprecated/DesktopVRIK/Main.cs rename to .DepricatedMods/DesktopVRIK/Main.cs diff --git a/.Deprecated/DesktopVRIK/ModSettings.cs b/.DepricatedMods/DesktopVRIK/ModSettings.cs similarity index 100% rename from .Deprecated/DesktopVRIK/ModSettings.cs rename to .DepricatedMods/DesktopVRIK/ModSettings.cs diff --git a/.Deprecated/DesktopVRIK/Properties/AssemblyInfo.cs b/.DepricatedMods/DesktopVRIK/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/DesktopVRIK/Properties/AssemblyInfo.cs rename to .DepricatedMods/DesktopVRIK/Properties/AssemblyInfo.cs diff --git a/.Deprecated/DesktopVRIK/README.md b/.DepricatedMods/DesktopVRIK/README.md similarity index 100% rename from .Deprecated/DesktopVRIK/README.md rename to .DepricatedMods/DesktopVRIK/README.md diff --git a/.Deprecated/DesktopVRIK/format.json b/.DepricatedMods/DesktopVRIK/format.json similarity index 100% rename from .Deprecated/DesktopVRIK/format.json rename to .DepricatedMods/DesktopVRIK/format.json diff --git a/.Deprecated/DesktopVRSwitch/DesktopVRSwitch.csproj b/.DepricatedMods/DesktopVRSwitch/DesktopVRSwitch.csproj similarity index 100% rename from .Deprecated/DesktopVRSwitch/DesktopVRSwitch.csproj rename to .DepricatedMods/DesktopVRSwitch/DesktopVRSwitch.csproj diff --git a/.Deprecated/DesktopVRSwitch/HarmonyPatches.cs b/.DepricatedMods/DesktopVRSwitch/HarmonyPatches.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/HarmonyPatches.cs rename to .DepricatedMods/DesktopVRSwitch/HarmonyPatches.cs diff --git a/.Deprecated/DesktopVRSwitch/Integrations/BTKUIAddon.cs b/.DepricatedMods/DesktopVRSwitch/Integrations/BTKUIAddon.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/Integrations/BTKUIAddon.cs rename to .DepricatedMods/DesktopVRSwitch/Integrations/BTKUIAddon.cs diff --git a/.Deprecated/DesktopVRSwitch/Main.cs b/.DepricatedMods/DesktopVRSwitch/Main.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/Main.cs rename to .DepricatedMods/DesktopVRSwitch/Main.cs diff --git a/.Deprecated/DesktopVRSwitch/ModSettings.cs b/.DepricatedMods/DesktopVRSwitch/ModSettings.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/ModSettings.cs rename to .DepricatedMods/DesktopVRSwitch/ModSettings.cs diff --git a/.Deprecated/DesktopVRSwitch/Patches/DestroySteamVRInstancesImmediate.cs b/.DepricatedMods/DesktopVRSwitch/Patches/DestroySteamVRInstancesImmediate.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/Patches/DestroySteamVRInstancesImmediate.cs rename to .DepricatedMods/DesktopVRSwitch/Patches/DestroySteamVRInstancesImmediate.cs diff --git a/.Deprecated/DesktopVRSwitch/Patches/ReferenceCameraPatch.cs b/.DepricatedMods/DesktopVRSwitch/Patches/ReferenceCameraPatch.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/Patches/ReferenceCameraPatch.cs rename to .DepricatedMods/DesktopVRSwitch/Patches/ReferenceCameraPatch.cs diff --git a/.Deprecated/DesktopVRSwitch/Properties/AssemblyInfo.cs b/.DepricatedMods/DesktopVRSwitch/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/Properties/AssemblyInfo.cs rename to .DepricatedMods/DesktopVRSwitch/Properties/AssemblyInfo.cs diff --git a/.Deprecated/DesktopVRSwitch/README.md b/.DepricatedMods/DesktopVRSwitch/README.md similarity index 100% rename from .Deprecated/DesktopVRSwitch/README.md rename to .DepricatedMods/DesktopVRSwitch/README.md diff --git a/.Deprecated/DesktopVRSwitch/Utils.cs b/.DepricatedMods/DesktopVRSwitch/Utils.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/Utils.cs rename to .DepricatedMods/DesktopVRSwitch/Utils.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeSwitchDebugger.cs b/.DepricatedMods/DesktopVRSwitch/VRModeSwitchDebugger.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeSwitchDebugger.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeSwitchDebugger.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeSwitchManager.cs b/.DepricatedMods/DesktopVRSwitch/VRModeSwitchManager.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeSwitchManager.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeSwitchManager.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/CVRGestureRecognizerTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRGestureRecognizerTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/CVRGestureRecognizerTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRGestureRecognizerTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/CVRInputManagerTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRInputManagerTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/CVRInputManagerTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRInputManagerTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/CVRPickupObjectTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRPickupObjectTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/CVRPickupObjectTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRPickupObjectTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/CVRWorldTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRWorldTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/CVRWorldTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRWorldTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/CVR_InteractableManagerTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVR_InteractableManagerTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/CVR_InteractableManagerTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVR_InteractableManagerTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/CVR_MenuManagerTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVR_MenuManagerTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/CVR_MenuManagerTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVR_MenuManagerTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/CameraFacingObjectTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CameraFacingObjectTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/CameraFacingObjectTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CameraFacingObjectTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/CheckVRTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CheckVRTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/CheckVRTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CheckVRTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/CohtmlHudTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CohtmlHudTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/CohtmlHudTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CohtmlHudTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/HudOperationsTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/HudOperationsTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/HudOperationsTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/HudOperationsTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/IKSystemTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/IKSystemTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/IKSystemTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/IKSystemTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/MetaPortTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/MetaPortTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/MetaPortTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/MetaPortTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/MovementSystemTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/MovementSystemTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/MovementSystemTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/MovementSystemTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/PlayerSetupTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/PlayerSetupTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/PlayerSetupTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/PlayerSetupTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/PortableCameraTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/PortableCameraTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/PortableCameraTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/PortableCameraTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/VRModeTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/VRModeTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/VRModeTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/VRModeTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/VRModeTrackers/ViewManagerTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/ViewManagerTracker.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/VRModeTrackers/ViewManagerTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/ViewManagerTracker.cs diff --git a/.Deprecated/DesktopVRSwitch/XRHandler.cs b/.DepricatedMods/DesktopVRSwitch/XRHandler.cs similarity index 100% rename from .Deprecated/DesktopVRSwitch/XRHandler.cs rename to .DepricatedMods/DesktopVRSwitch/XRHandler.cs diff --git a/.Deprecated/DesktopVRSwitch/format.json b/.DepricatedMods/DesktopVRSwitch/format.json similarity index 100% rename from .Deprecated/DesktopVRSwitch/format.json rename to .DepricatedMods/DesktopVRSwitch/format.json diff --git a/.Deprecated/EzCurls/EzCurls.csproj b/.DepricatedMods/EzCurls/EzCurls.csproj similarity index 100% rename from .Deprecated/EzCurls/EzCurls.csproj rename to .DepricatedMods/EzCurls/EzCurls.csproj diff --git a/.Deprecated/EzCurls/InputModules/InputModuleCurlAdjuster.cs b/.DepricatedMods/EzCurls/InputModules/InputModuleCurlAdjuster.cs similarity index 100% rename from .Deprecated/EzCurls/InputModules/InputModuleCurlAdjuster.cs rename to .DepricatedMods/EzCurls/InputModules/InputModuleCurlAdjuster.cs diff --git a/.Deprecated/EzCurls/Main.cs b/.DepricatedMods/EzCurls/Main.cs similarity index 100% rename from .Deprecated/EzCurls/Main.cs rename to .DepricatedMods/EzCurls/Main.cs diff --git a/.Deprecated/EzCurls/ModSettings.cs b/.DepricatedMods/EzCurls/ModSettings.cs similarity index 100% rename from .Deprecated/EzCurls/ModSettings.cs rename to .DepricatedMods/EzCurls/ModSettings.cs diff --git a/.Deprecated/EzCurls/Properties/AssemblyInfo.cs b/.DepricatedMods/EzCurls/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/EzCurls/Properties/AssemblyInfo.cs rename to .DepricatedMods/EzCurls/Properties/AssemblyInfo.cs diff --git a/.Deprecated/EzCurls/README.md b/.DepricatedMods/EzCurls/README.md similarity index 100% rename from .Deprecated/EzCurls/README.md rename to .DepricatedMods/EzCurls/README.md diff --git a/.Deprecated/EzCurls/format.json b/.DepricatedMods/EzCurls/format.json similarity index 100% rename from .Deprecated/EzCurls/format.json rename to .DepricatedMods/EzCurls/format.json diff --git a/.Deprecated/EzGrab/EzGrab.csproj b/.DepricatedMods/EzGrab/EzGrab.csproj similarity index 100% rename from .Deprecated/EzGrab/EzGrab.csproj rename to .DepricatedMods/EzGrab/EzGrab.csproj diff --git a/.Deprecated/EzGrab/Main.cs b/.DepricatedMods/EzGrab/Main.cs similarity index 100% rename from .Deprecated/EzGrab/Main.cs rename to .DepricatedMods/EzGrab/Main.cs diff --git a/.Deprecated/EzGrab/Properties/AssemblyInfo.cs b/.DepricatedMods/EzGrab/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/EzGrab/Properties/AssemblyInfo.cs rename to .DepricatedMods/EzGrab/Properties/AssemblyInfo.cs diff --git a/.Deprecated/EzGrab/format.json b/.DepricatedMods/EzGrab/format.json similarity index 100% rename from .Deprecated/EzGrab/format.json rename to .DepricatedMods/EzGrab/format.json diff --git a/.Deprecated/FuckCohtmlResourceHandler/FuckCohtmlResourceHandler.csproj b/.DepricatedMods/FuckCohtmlResourceHandler/FuckCohtmlResourceHandler.csproj similarity index 100% rename from .Deprecated/FuckCohtmlResourceHandler/FuckCohtmlResourceHandler.csproj rename to .DepricatedMods/FuckCohtmlResourceHandler/FuckCohtmlResourceHandler.csproj diff --git a/.Deprecated/FuckCohtmlResourceHandler/HarmonyPatches.cs b/.DepricatedMods/FuckCohtmlResourceHandler/HarmonyPatches.cs similarity index 100% rename from .Deprecated/FuckCohtmlResourceHandler/HarmonyPatches.cs rename to .DepricatedMods/FuckCohtmlResourceHandler/HarmonyPatches.cs diff --git a/.Deprecated/FuckCohtmlResourceHandler/Main.cs b/.DepricatedMods/FuckCohtmlResourceHandler/Main.cs similarity index 100% rename from .Deprecated/FuckCohtmlResourceHandler/Main.cs rename to .DepricatedMods/FuckCohtmlResourceHandler/Main.cs diff --git a/.Deprecated/FuckCohtmlResourceHandler/Properties/AssemblyInfo.cs b/.DepricatedMods/FuckCohtmlResourceHandler/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/FuckCohtmlResourceHandler/Properties/AssemblyInfo.cs rename to .DepricatedMods/FuckCohtmlResourceHandler/Properties/AssemblyInfo.cs diff --git a/.Deprecated/FuckCohtmlResourceHandler/README.md b/.DepricatedMods/FuckCohtmlResourceHandler/README.md similarity index 100% rename from .Deprecated/FuckCohtmlResourceHandler/README.md rename to .DepricatedMods/FuckCohtmlResourceHandler/README.md diff --git a/.Deprecated/FuckCohtmlResourceHandler/format.json b/.DepricatedMods/FuckCohtmlResourceHandler/format.json similarity index 100% rename from .Deprecated/FuckCohtmlResourceHandler/format.json rename to .DepricatedMods/FuckCohtmlResourceHandler/format.json diff --git a/.Deprecated/FuckMLA/FuckMLA.csproj b/.DepricatedMods/FuckMLA/FuckMLA.csproj similarity index 100% rename from .Deprecated/FuckMLA/FuckMLA.csproj rename to .DepricatedMods/FuckMLA/FuckMLA.csproj diff --git a/.Deprecated/FuckMLA/HarmonyPatches.cs b/.DepricatedMods/FuckMLA/HarmonyPatches.cs similarity index 100% rename from .Deprecated/FuckMLA/HarmonyPatches.cs rename to .DepricatedMods/FuckMLA/HarmonyPatches.cs diff --git a/.Deprecated/FuckMLA/Main.cs b/.DepricatedMods/FuckMLA/Main.cs similarity index 100% rename from .Deprecated/FuckMLA/Main.cs rename to .DepricatedMods/FuckMLA/Main.cs diff --git a/.Deprecated/FuckMLA/Properties/AssemblyInfo.cs b/.DepricatedMods/FuckMLA/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/FuckMLA/Properties/AssemblyInfo.cs rename to .DepricatedMods/FuckMLA/Properties/AssemblyInfo.cs diff --git a/.Deprecated/FuckMLA/format.json b/.DepricatedMods/FuckMLA/format.json similarity index 100% rename from .Deprecated/FuckMLA/format.json rename to .DepricatedMods/FuckMLA/format.json diff --git a/.Deprecated/FuckMetrics/FuckMetrics.csproj b/.DepricatedMods/FuckMetrics/FuckMetrics.csproj similarity index 100% rename from .Deprecated/FuckMetrics/FuckMetrics.csproj rename to .DepricatedMods/FuckMetrics/FuckMetrics.csproj diff --git a/.Deprecated/FuckMetrics/HarmonyPatches.cs b/.DepricatedMods/FuckMetrics/HarmonyPatches.cs similarity index 100% rename from .Deprecated/FuckMetrics/HarmonyPatches.cs rename to .DepricatedMods/FuckMetrics/HarmonyPatches.cs diff --git a/.Deprecated/FuckMetrics/Main.cs b/.DepricatedMods/FuckMetrics/Main.cs similarity index 100% rename from .Deprecated/FuckMetrics/Main.cs rename to .DepricatedMods/FuckMetrics/Main.cs diff --git a/.Deprecated/FuckMetrics/ManagedLibs/.keep b/.DepricatedMods/FuckMetrics/ManagedLibs/.keep similarity index 100% rename from .Deprecated/FuckMetrics/ManagedLibs/.keep rename to .DepricatedMods/FuckMetrics/ManagedLibs/.keep diff --git a/.Deprecated/FuckMetrics/Properties/AssemblyInfo.cs b/.DepricatedMods/FuckMetrics/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/FuckMetrics/Properties/AssemblyInfo.cs rename to .DepricatedMods/FuckMetrics/Properties/AssemblyInfo.cs diff --git a/.Deprecated/FuckMetrics/format.json b/.DepricatedMods/FuckMetrics/format.json similarity index 100% rename from .Deprecated/FuckMetrics/format.json rename to .DepricatedMods/FuckMetrics/format.json diff --git a/.Deprecated/FuckVivox/FuckVivox.csproj b/.DepricatedMods/FuckVivox/FuckVivox.csproj similarity index 100% rename from .Deprecated/FuckVivox/FuckVivox.csproj rename to .DepricatedMods/FuckVivox/FuckVivox.csproj diff --git a/.Deprecated/FuckVivox/HarmonyPatches.cs b/.DepricatedMods/FuckVivox/HarmonyPatches.cs similarity index 100% rename from .Deprecated/FuckVivox/HarmonyPatches.cs rename to .DepricatedMods/FuckVivox/HarmonyPatches.cs diff --git a/.Deprecated/FuckVivox/Main.cs b/.DepricatedMods/FuckVivox/Main.cs similarity index 100% rename from .Deprecated/FuckVivox/Main.cs rename to .DepricatedMods/FuckVivox/Main.cs diff --git a/.Deprecated/FuckVivox/Properties/AssemblyInfo.cs b/.DepricatedMods/FuckVivox/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/FuckVivox/Properties/AssemblyInfo.cs rename to .DepricatedMods/FuckVivox/Properties/AssemblyInfo.cs diff --git a/.Deprecated/FuckVivox/VivoxHelpers.cs b/.DepricatedMods/FuckVivox/VivoxHelpers.cs similarity index 100% rename from .Deprecated/FuckVivox/VivoxHelpers.cs rename to .DepricatedMods/FuckVivox/VivoxHelpers.cs diff --git a/.Deprecated/FuckVivox/WindowFocusManager.cs b/.DepricatedMods/FuckVivox/WindowFocusManager.cs similarity index 100% rename from .Deprecated/FuckVivox/WindowFocusManager.cs rename to .DepricatedMods/FuckVivox/WindowFocusManager.cs diff --git a/.Deprecated/FuckVivox/format.json b/.DepricatedMods/FuckVivox/format.json similarity index 100% rename from .Deprecated/FuckVivox/format.json rename to .DepricatedMods/FuckVivox/format.json diff --git a/.Deprecated/HeadBobbingFix/HarmonyPatches.cs b/.DepricatedMods/HeadBobbingFix/HarmonyPatches.cs similarity index 100% rename from .Deprecated/HeadBobbingFix/HarmonyPatches.cs rename to .DepricatedMods/HeadBobbingFix/HarmonyPatches.cs diff --git a/.Deprecated/HeadBobbingFix/HeadBobbingFix.csproj b/.DepricatedMods/HeadBobbingFix/HeadBobbingFix.csproj similarity index 100% rename from .Deprecated/HeadBobbingFix/HeadBobbingFix.csproj rename to .DepricatedMods/HeadBobbingFix/HeadBobbingFix.csproj diff --git a/.Deprecated/HeadBobbingFix/Main.cs b/.DepricatedMods/HeadBobbingFix/Main.cs similarity index 100% rename from .Deprecated/HeadBobbingFix/Main.cs rename to .DepricatedMods/HeadBobbingFix/Main.cs diff --git a/.Deprecated/HeadBobbingFix/Properties/AssemblyInfo.cs b/.DepricatedMods/HeadBobbingFix/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/HeadBobbingFix/Properties/AssemblyInfo.cs rename to .DepricatedMods/HeadBobbingFix/Properties/AssemblyInfo.cs diff --git a/.Deprecated/HeadBobbingFix/README.md b/.DepricatedMods/HeadBobbingFix/README.md similarity index 100% rename from .Deprecated/HeadBobbingFix/README.md rename to .DepricatedMods/HeadBobbingFix/README.md diff --git a/.Deprecated/HeadBobbingFix/format.json b/.DepricatedMods/HeadBobbingFix/format.json similarity index 100% rename from .Deprecated/HeadBobbingFix/format.json rename to .DepricatedMods/HeadBobbingFix/format.json diff --git a/.Deprecated/HeadLookLockingInputFix/HeadLookLockingInputFix.csproj b/.DepricatedMods/HeadLookLockingInputFix/HeadLookLockingInputFix.csproj similarity index 100% rename from .Deprecated/HeadLookLockingInputFix/HeadLookLockingInputFix.csproj rename to .DepricatedMods/HeadLookLockingInputFix/HeadLookLockingInputFix.csproj diff --git a/.Deprecated/HeadLookLockingInputFix/Main.cs b/.DepricatedMods/HeadLookLockingInputFix/Main.cs similarity index 100% rename from .Deprecated/HeadLookLockingInputFix/Main.cs rename to .DepricatedMods/HeadLookLockingInputFix/Main.cs diff --git a/.Deprecated/HeadLookLockingInputFix/Properties/AssemblyInfo.cs b/.DepricatedMods/HeadLookLockingInputFix/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/HeadLookLockingInputFix/Properties/AssemblyInfo.cs rename to .DepricatedMods/HeadLookLockingInputFix/Properties/AssemblyInfo.cs diff --git a/.Deprecated/HeadLookLockingInputFix/README.md b/.DepricatedMods/HeadLookLockingInputFix/README.md similarity index 100% rename from .Deprecated/HeadLookLockingInputFix/README.md rename to .DepricatedMods/HeadLookLockingInputFix/README.md diff --git a/.Deprecated/HeadLookLockingInputFix/format.json b/.DepricatedMods/HeadLookLockingInputFix/format.json similarity index 100% rename from .Deprecated/HeadLookLockingInputFix/format.json rename to .DepricatedMods/HeadLookLockingInputFix/format.json diff --git a/.Deprecated/IKAdjustments/HarmonyPatches.cs b/.DepricatedMods/IKAdjustments/HarmonyPatches.cs similarity index 100% rename from .Deprecated/IKAdjustments/HarmonyPatches.cs rename to .DepricatedMods/IKAdjustments/HarmonyPatches.cs diff --git a/.Deprecated/IKAdjustments/IKAdjuster.cs b/.DepricatedMods/IKAdjustments/IKAdjuster.cs similarity index 100% rename from .Deprecated/IKAdjustments/IKAdjuster.cs rename to .DepricatedMods/IKAdjustments/IKAdjuster.cs diff --git a/.Deprecated/IKAdjustments/IKAdjustments.csproj b/.DepricatedMods/IKAdjustments/IKAdjustments.csproj similarity index 100% rename from .Deprecated/IKAdjustments/IKAdjustments.csproj rename to .DepricatedMods/IKAdjustments/IKAdjustments.csproj diff --git a/.Deprecated/IKAdjustments/Integrations/BTKUIAddon.cs b/.DepricatedMods/IKAdjustments/Integrations/BTKUIAddon.cs similarity index 100% rename from .Deprecated/IKAdjustments/Integrations/BTKUIAddon.cs rename to .DepricatedMods/IKAdjustments/Integrations/BTKUIAddon.cs diff --git a/.Deprecated/IKAdjustments/Main.cs b/.DepricatedMods/IKAdjustments/Main.cs similarity index 100% rename from .Deprecated/IKAdjustments/Main.cs rename to .DepricatedMods/IKAdjustments/Main.cs diff --git a/.Deprecated/IKAdjustments/Properties/AssemblyInfo.cs b/.DepricatedMods/IKAdjustments/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/IKAdjustments/Properties/AssemblyInfo.cs rename to .DepricatedMods/IKAdjustments/Properties/AssemblyInfo.cs diff --git a/.Deprecated/IKFixes/HarmonyPatches.cs b/.DepricatedMods/IKFixes/HarmonyPatches.cs similarity index 100% rename from .Deprecated/IKFixes/HarmonyPatches.cs rename to .DepricatedMods/IKFixes/HarmonyPatches.cs diff --git a/.Deprecated/IKFixes/IKFixes.csproj b/.DepricatedMods/IKFixes/IKFixes.csproj similarity index 100% rename from .Deprecated/IKFixes/IKFixes.csproj rename to .DepricatedMods/IKFixes/IKFixes.csproj diff --git a/.Deprecated/IKFixes/Integrations/UIExKitAddon.cs b/.DepricatedMods/IKFixes/Integrations/UIExKitAddon.cs similarity index 100% rename from .Deprecated/IKFixes/Integrations/UIExKitAddon.cs rename to .DepricatedMods/IKFixes/Integrations/UIExKitAddon.cs diff --git a/.Deprecated/IKFixes/Main.cs b/.DepricatedMods/IKFixes/Main.cs similarity index 100% rename from .Deprecated/IKFixes/Main.cs rename to .DepricatedMods/IKFixes/Main.cs diff --git a/.Deprecated/IKFixes/Properties/AssemblyInfo.cs b/.DepricatedMods/IKFixes/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/IKFixes/Properties/AssemblyInfo.cs rename to .DepricatedMods/IKFixes/Properties/AssemblyInfo.cs diff --git a/.Deprecated/IKFixes/README.md b/.DepricatedMods/IKFixes/README.md similarity index 100% rename from .Deprecated/IKFixes/README.md rename to .DepricatedMods/IKFixes/README.md diff --git a/.Deprecated/IKFixes/format.json b/.DepricatedMods/IKFixes/format.json similarity index 100% rename from .Deprecated/IKFixes/format.json rename to .DepricatedMods/IKFixes/format.json diff --git a/.Deprecated/InteractionTest/AutoArmIK.cs b/.DepricatedMods/InteractionTest/AutoArmIK.cs similarity index 100% rename from .Deprecated/InteractionTest/AutoArmIK.cs rename to .DepricatedMods/InteractionTest/AutoArmIK.cs diff --git a/.Deprecated/InteractionTest/ColliderTest/AvatarColliderStruct.cs b/.DepricatedMods/InteractionTest/ColliderTest/AvatarColliderStruct.cs similarity index 100% rename from .Deprecated/InteractionTest/ColliderTest/AvatarColliderStruct.cs rename to .DepricatedMods/InteractionTest/ColliderTest/AvatarColliderStruct.cs diff --git a/.Deprecated/InteractionTest/ColliderTest/AvatarColliders.cs b/.DepricatedMods/InteractionTest/ColliderTest/AvatarColliders.cs similarity index 100% rename from .Deprecated/InteractionTest/ColliderTest/AvatarColliders.cs rename to .DepricatedMods/InteractionTest/ColliderTest/AvatarColliders.cs diff --git a/.Deprecated/InteractionTest/ColliderTest/LineColliderTest.cs b/.DepricatedMods/InteractionTest/ColliderTest/LineColliderTest.cs similarity index 100% rename from .Deprecated/InteractionTest/ColliderTest/LineColliderTest.cs rename to .DepricatedMods/InteractionTest/ColliderTest/LineColliderTest.cs diff --git a/.Deprecated/InteractionTest/GrabbableAvatar.cs b/.DepricatedMods/InteractionTest/GrabbableAvatar.cs similarity index 100% rename from .Deprecated/InteractionTest/GrabbableAvatar.cs rename to .DepricatedMods/InteractionTest/GrabbableAvatar.cs diff --git a/.Deprecated/InteractionTest/GrabbingAvatar.cs b/.DepricatedMods/InteractionTest/GrabbingAvatar.cs similarity index 100% rename from .Deprecated/InteractionTest/GrabbingAvatar.cs rename to .DepricatedMods/InteractionTest/GrabbingAvatar.cs diff --git a/.Deprecated/InteractionTest/HarmonyPatches.cs b/.DepricatedMods/InteractionTest/HarmonyPatches.cs similarity index 100% rename from .Deprecated/InteractionTest/HarmonyPatches.cs rename to .DepricatedMods/InteractionTest/HarmonyPatches.cs diff --git a/.Deprecated/InteractionTest/InteractionTest.csproj b/.DepricatedMods/InteractionTest/InteractionTest.csproj similarity index 100% rename from .Deprecated/InteractionTest/InteractionTest.csproj rename to .DepricatedMods/InteractionTest/InteractionTest.csproj diff --git a/.Deprecated/InteractionTest/Main.cs b/.DepricatedMods/InteractionTest/Main.cs similarity index 100% rename from .Deprecated/InteractionTest/Main.cs rename to .DepricatedMods/InteractionTest/Main.cs diff --git a/.Deprecated/InteractionTest/Properties/AssemblyInfo.cs b/.DepricatedMods/InteractionTest/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/InteractionTest/Properties/AssemblyInfo.cs rename to .DepricatedMods/InteractionTest/Properties/AssemblyInfo.cs diff --git a/.Deprecated/InteractionTest/README.md b/.DepricatedMods/InteractionTest/README.md similarity index 100% rename from .Deprecated/InteractionTest/README.md rename to .DepricatedMods/InteractionTest/README.md diff --git a/.Deprecated/AvatarScaleMod/format.json b/.DepricatedMods/InteractionTest/format.json similarity index 100% rename from .Deprecated/AvatarScaleMod/format.json rename to .DepricatedMods/InteractionTest/format.json diff --git a/.Deprecated/JumpPatch/HarmonyPatches.cs b/.DepricatedMods/JumpPatch/HarmonyPatches.cs similarity index 100% rename from .Deprecated/JumpPatch/HarmonyPatches.cs rename to .DepricatedMods/JumpPatch/HarmonyPatches.cs diff --git a/.Deprecated/JumpPatch/JumpPatch.csproj b/.DepricatedMods/JumpPatch/JumpPatch.csproj similarity index 100% rename from .Deprecated/JumpPatch/JumpPatch.csproj rename to .DepricatedMods/JumpPatch/JumpPatch.csproj diff --git a/.Deprecated/JumpPatch/Main.cs b/.DepricatedMods/JumpPatch/Main.cs similarity index 100% rename from .Deprecated/JumpPatch/Main.cs rename to .DepricatedMods/JumpPatch/Main.cs diff --git a/.Deprecated/JumpPatch/Properties/AssemblyInfo.cs b/.DepricatedMods/JumpPatch/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/JumpPatch/Properties/AssemblyInfo.cs rename to .DepricatedMods/JumpPatch/Properties/AssemblyInfo.cs diff --git a/.Deprecated/JumpPatch/format.json b/.DepricatedMods/JumpPatch/format.json similarity index 100% rename from .Deprecated/JumpPatch/format.json rename to .DepricatedMods/JumpPatch/format.json diff --git a/.Deprecated/LateInitComponentHelperHack/LateInitComponentHelperHack.csproj b/.DepricatedMods/LateInitComponentHelperHack/LateInitComponentHelperHack.csproj similarity index 100% rename from .Deprecated/LateInitComponentHelperHack/LateInitComponentHelperHack.csproj rename to .DepricatedMods/LateInitComponentHelperHack/LateInitComponentHelperHack.csproj diff --git a/.Deprecated/LateInitComponentHelperHack/Main.cs b/.DepricatedMods/LateInitComponentHelperHack/Main.cs similarity index 100% rename from .Deprecated/LateInitComponentHelperHack/Main.cs rename to .DepricatedMods/LateInitComponentHelperHack/Main.cs diff --git a/.Deprecated/LateInitComponentHelperHack/Properties/AssemblyInfo.cs b/.DepricatedMods/LateInitComponentHelperHack/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/LateInitComponentHelperHack/Properties/AssemblyInfo.cs rename to .DepricatedMods/LateInitComponentHelperHack/Properties/AssemblyInfo.cs diff --git a/.Deprecated/LateInitComponentHelperHack/format.json b/.DepricatedMods/LateInitComponentHelperHack/format.json similarity index 100% rename from .Deprecated/LateInitComponentHelperHack/format.json rename to .DepricatedMods/LateInitComponentHelperHack/format.json diff --git a/.Deprecated/MenuScalePatch/HarmonyPatches.cs b/.DepricatedMods/MenuScalePatch/HarmonyPatches.cs similarity index 100% rename from .Deprecated/MenuScalePatch/HarmonyPatches.cs rename to .DepricatedMods/MenuScalePatch/HarmonyPatches.cs diff --git a/.Deprecated/MenuScalePatch/Helpers/MainMenuHelper.cs b/.DepricatedMods/MenuScalePatch/Helpers/MainMenuHelper.cs similarity index 100% rename from .Deprecated/MenuScalePatch/Helpers/MainMenuHelper.cs rename to .DepricatedMods/MenuScalePatch/Helpers/MainMenuHelper.cs diff --git a/.Deprecated/MenuScalePatch/Helpers/QuickMenuHelper.cs b/.DepricatedMods/MenuScalePatch/Helpers/QuickMenuHelper.cs similarity index 100% rename from .Deprecated/MenuScalePatch/Helpers/QuickMenuHelper.cs rename to .DepricatedMods/MenuScalePatch/Helpers/QuickMenuHelper.cs diff --git a/.Deprecated/MenuScalePatch/MSP_Menus.cs b/.DepricatedMods/MenuScalePatch/MSP_Menus.cs similarity index 100% rename from .Deprecated/MenuScalePatch/MSP_Menus.cs rename to .DepricatedMods/MenuScalePatch/MSP_Menus.cs diff --git a/.Deprecated/MenuScalePatch/Main.cs b/.DepricatedMods/MenuScalePatch/Main.cs similarity index 100% rename from .Deprecated/MenuScalePatch/Main.cs rename to .DepricatedMods/MenuScalePatch/Main.cs diff --git a/.Deprecated/MenuScalePatch/MenuScalePatch.csproj b/.DepricatedMods/MenuScalePatch/MenuScalePatch.csproj similarity index 100% rename from .Deprecated/MenuScalePatch/MenuScalePatch.csproj rename to .DepricatedMods/MenuScalePatch/MenuScalePatch.csproj diff --git a/.Deprecated/MenuScalePatch/Properties/AssemblyInfo.cs b/.DepricatedMods/MenuScalePatch/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/MenuScalePatch/Properties/AssemblyInfo.cs rename to .DepricatedMods/MenuScalePatch/Properties/AssemblyInfo.cs diff --git a/.Deprecated/MenuScalePatch/README.md b/.DepricatedMods/MenuScalePatch/README.md similarity index 100% rename from .Deprecated/MenuScalePatch/README.md rename to .DepricatedMods/MenuScalePatch/README.md diff --git a/.Deprecated/MenuScalePatch/format.json b/.DepricatedMods/MenuScalePatch/format.json similarity index 100% rename from .Deprecated/MenuScalePatch/format.json rename to .DepricatedMods/MenuScalePatch/format.json diff --git a/.Deprecated/MoreMenuOptions/Main.cs b/.DepricatedMods/MoreMenuOptions/Main.cs similarity index 100% rename from .Deprecated/MoreMenuOptions/Main.cs rename to .DepricatedMods/MoreMenuOptions/Main.cs diff --git a/.Deprecated/MoreMenuOptions/ModSettings.cs b/.DepricatedMods/MoreMenuOptions/ModSettings.cs similarity index 100% rename from .Deprecated/MoreMenuOptions/ModSettings.cs rename to .DepricatedMods/MoreMenuOptions/ModSettings.cs diff --git a/.Deprecated/MoreMenuOptions/MoreMenuOptions.csproj b/.DepricatedMods/MoreMenuOptions/MoreMenuOptions.csproj similarity index 100% rename from .Deprecated/MoreMenuOptions/MoreMenuOptions.csproj rename to .DepricatedMods/MoreMenuOptions/MoreMenuOptions.csproj diff --git a/.Deprecated/MoreMenuOptions/Properties/AssemblyInfo.cs b/.DepricatedMods/MoreMenuOptions/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/MoreMenuOptions/Properties/AssemblyInfo.cs rename to .DepricatedMods/MoreMenuOptions/Properties/AssemblyInfo.cs diff --git a/.Deprecated/MoreMenuOptions/README.md b/.DepricatedMods/MoreMenuOptions/README.md similarity index 100% rename from .Deprecated/MoreMenuOptions/README.md rename to .DepricatedMods/MoreMenuOptions/README.md diff --git a/.Deprecated/MoreMenuOptions/format.json b/.DepricatedMods/MoreMenuOptions/format.json similarity index 100% rename from .Deprecated/MoreMenuOptions/format.json rename to .DepricatedMods/MoreMenuOptions/format.json diff --git a/.Deprecated/NAK.CustomComponents/Components/NAKPointerTracker.cs b/.DepricatedMods/NAK.CustomComponents/Components/NAKPointerTracker.cs similarity index 100% rename from .Deprecated/NAK.CustomComponents/Components/NAKPointerTracker.cs rename to .DepricatedMods/NAK.CustomComponents/Components/NAKPointerTracker.cs diff --git a/.Deprecated/NAK.CustomComponents/CustomComponents.csproj b/.DepricatedMods/NAK.CustomComponents/CustomComponents.csproj similarity index 100% rename from .Deprecated/NAK.CustomComponents/CustomComponents.csproj rename to .DepricatedMods/NAK.CustomComponents/CustomComponents.csproj diff --git a/.Deprecated/NAK.CustomComponents/Main.cs b/.DepricatedMods/NAK.CustomComponents/Main.cs similarity index 100% rename from .Deprecated/NAK.CustomComponents/Main.cs rename to .DepricatedMods/NAK.CustomComponents/Main.cs diff --git a/.Deprecated/NAK.CustomComponents/Properties/AssemblyInfo.cs b/.DepricatedMods/NAK.CustomComponents/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/NAK.CustomComponents/Properties/AssemblyInfo.cs rename to .DepricatedMods/NAK.CustomComponents/Properties/AssemblyInfo.cs diff --git a/.Deprecated/NAK.CustomComponents/format.json b/.DepricatedMods/NAK.CustomComponents/format.json similarity index 100% rename from .Deprecated/NAK.CustomComponents/format.json rename to .DepricatedMods/NAK.CustomComponents/format.json diff --git a/.Deprecated/NoDepthOnlyFlat/Main.cs b/.DepricatedMods/NoDepthOnlyFlat/Main.cs similarity index 100% rename from .Deprecated/NoDepthOnlyFlat/Main.cs rename to .DepricatedMods/NoDepthOnlyFlat/Main.cs diff --git a/.Deprecated/NoDepthOnlyFlat/NoDepthOnlyFlat.csproj b/.DepricatedMods/NoDepthOnlyFlat/NoDepthOnlyFlat.csproj similarity index 100% rename from .Deprecated/NoDepthOnlyFlat/NoDepthOnlyFlat.csproj rename to .DepricatedMods/NoDepthOnlyFlat/NoDepthOnlyFlat.csproj diff --git a/.Deprecated/NoDepthOnlyFlat/Properties/AssemblyInfo.cs b/.DepricatedMods/NoDepthOnlyFlat/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/NoDepthOnlyFlat/Properties/AssemblyInfo.cs rename to .DepricatedMods/NoDepthOnlyFlat/Properties/AssemblyInfo.cs diff --git a/.Deprecated/NoDepthOnlyFlat/README.md b/.DepricatedMods/NoDepthOnlyFlat/README.md similarity index 100% rename from .Deprecated/NoDepthOnlyFlat/README.md rename to .DepricatedMods/NoDepthOnlyFlat/README.md diff --git a/.Deprecated/NoDepthOnlyFlat/format.json b/.DepricatedMods/NoDepthOnlyFlat/format.json similarity index 100% rename from .Deprecated/NoDepthOnlyFlat/format.json rename to .DepricatedMods/NoDepthOnlyFlat/format.json diff --git a/.Deprecated/PickupPushPull/HarmonyPatches.cs b/.DepricatedMods/PickupPushPull/HarmonyPatches.cs similarity index 100% rename from .Deprecated/PickupPushPull/HarmonyPatches.cs rename to .DepricatedMods/PickupPushPull/HarmonyPatches.cs diff --git a/.Deprecated/PickupPushPull/InputModules/PickupPushPull_Module.cs b/.DepricatedMods/PickupPushPull/InputModules/PickupPushPull_Module.cs similarity index 100% rename from .Deprecated/PickupPushPull/InputModules/PickupPushPull_Module.cs rename to .DepricatedMods/PickupPushPull/InputModules/PickupPushPull_Module.cs diff --git a/.Deprecated/PickupPushPull/Main.cs b/.DepricatedMods/PickupPushPull/Main.cs similarity index 100% rename from .Deprecated/PickupPushPull/Main.cs rename to .DepricatedMods/PickupPushPull/Main.cs diff --git a/.Deprecated/PickupPushPull/PickupPushPull.csproj b/.DepricatedMods/PickupPushPull/PickupPushPull.csproj similarity index 100% rename from .Deprecated/PickupPushPull/PickupPushPull.csproj rename to .DepricatedMods/PickupPushPull/PickupPushPull.csproj diff --git a/.Deprecated/PickupPushPull/Properties/AssemblyInfo.cs b/.DepricatedMods/PickupPushPull/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/PickupPushPull/Properties/AssemblyInfo.cs rename to .DepricatedMods/PickupPushPull/Properties/AssemblyInfo.cs diff --git a/.Deprecated/PickupPushPull/format.json b/.DepricatedMods/PickupPushPull/format.json similarity index 100% rename from .Deprecated/PickupPushPull/format.json rename to .DepricatedMods/PickupPushPull/format.json diff --git a/.Deprecated/PlaySpaceScaleFix/HarmonyPatches.cs b/.DepricatedMods/PlaySpaceScaleFix/HarmonyPatches.cs similarity index 100% rename from .Deprecated/PlaySpaceScaleFix/HarmonyPatches.cs rename to .DepricatedMods/PlaySpaceScaleFix/HarmonyPatches.cs diff --git a/.Deprecated/PlaySpaceScaleFix/Main.cs b/.DepricatedMods/PlaySpaceScaleFix/Main.cs similarity index 100% rename from .Deprecated/PlaySpaceScaleFix/Main.cs rename to .DepricatedMods/PlaySpaceScaleFix/Main.cs diff --git a/.Deprecated/PlaySpaceScaleFix/PlaySpaceScaleFix.csproj b/.DepricatedMods/PlaySpaceScaleFix/PlaySpaceScaleFix.csproj similarity index 100% rename from .Deprecated/PlaySpaceScaleFix/PlaySpaceScaleFix.csproj rename to .DepricatedMods/PlaySpaceScaleFix/PlaySpaceScaleFix.csproj diff --git a/.Deprecated/PlaySpaceScaleFix/Properties/AssemblyInfo.cs b/.DepricatedMods/PlaySpaceScaleFix/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/PlaySpaceScaleFix/Properties/AssemblyInfo.cs rename to .DepricatedMods/PlaySpaceScaleFix/Properties/AssemblyInfo.cs diff --git a/.Deprecated/PlaySpaceScaleFix/README.md b/.DepricatedMods/PlaySpaceScaleFix/README.md similarity index 100% rename from .Deprecated/PlaySpaceScaleFix/README.md rename to .DepricatedMods/PlaySpaceScaleFix/README.md diff --git a/.Deprecated/PlaySpaceScaleFix/format.json b/.DepricatedMods/PlaySpaceScaleFix/format.json similarity index 100% rename from .Deprecated/PlaySpaceScaleFix/format.json rename to .DepricatedMods/PlaySpaceScaleFix/format.json diff --git a/.Deprecated/SwitchToDesktopOnSteamVRExit/Main.cs b/.DepricatedMods/SwitchToDesktopOnSteamVRExit/Main.cs similarity index 100% rename from .Deprecated/SwitchToDesktopOnSteamVRExit/Main.cs rename to .DepricatedMods/SwitchToDesktopOnSteamVRExit/Main.cs diff --git a/.Deprecated/SwitchToDesktopOnSteamVRExit/Properties/AssemblyInfo.cs b/.DepricatedMods/SwitchToDesktopOnSteamVRExit/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/SwitchToDesktopOnSteamVRExit/Properties/AssemblyInfo.cs rename to .DepricatedMods/SwitchToDesktopOnSteamVRExit/Properties/AssemblyInfo.cs diff --git a/.Deprecated/SwitchToDesktopOnSteamVRExit/README.md b/.DepricatedMods/SwitchToDesktopOnSteamVRExit/README.md similarity index 100% rename from .Deprecated/SwitchToDesktopOnSteamVRExit/README.md rename to .DepricatedMods/SwitchToDesktopOnSteamVRExit/README.md diff --git a/.Deprecated/SwitchToDesktopOnSteamVRExit/SwitchToDesktopOnSteamVRExit.csproj b/.DepricatedMods/SwitchToDesktopOnSteamVRExit/SwitchToDesktopOnSteamVRExit.csproj similarity index 100% rename from .Deprecated/SwitchToDesktopOnSteamVRExit/SwitchToDesktopOnSteamVRExit.csproj rename to .DepricatedMods/SwitchToDesktopOnSteamVRExit/SwitchToDesktopOnSteamVRExit.csproj diff --git a/.Deprecated/SwitchToDesktopOnSteamVRExit/format.json b/.DepricatedMods/SwitchToDesktopOnSteamVRExit/format.json similarity index 100% rename from .Deprecated/SwitchToDesktopOnSteamVRExit/format.json rename to .DepricatedMods/SwitchToDesktopOnSteamVRExit/format.json diff --git a/.Deprecated/TrackedControllerFix/HarmonyPatches.cs b/.DepricatedMods/TrackedControllerFix/HarmonyPatches.cs similarity index 100% rename from .Deprecated/TrackedControllerFix/HarmonyPatches.cs rename to .DepricatedMods/TrackedControllerFix/HarmonyPatches.cs diff --git a/.Deprecated/TrackedControllerFix/Main.cs b/.DepricatedMods/TrackedControllerFix/Main.cs similarity index 100% rename from .Deprecated/TrackedControllerFix/Main.cs rename to .DepricatedMods/TrackedControllerFix/Main.cs diff --git a/.Deprecated/TrackedControllerFix/Properties/AssemblyInfo.cs b/.DepricatedMods/TrackedControllerFix/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/TrackedControllerFix/Properties/AssemblyInfo.cs rename to .DepricatedMods/TrackedControllerFix/Properties/AssemblyInfo.cs diff --git a/.Deprecated/TrackedControllerFix/README.md b/.DepricatedMods/TrackedControllerFix/README.md similarity index 100% rename from .Deprecated/TrackedControllerFix/README.md rename to .DepricatedMods/TrackedControllerFix/README.md diff --git a/.Deprecated/TrackedControllerFix/TrackedControllerFix.csproj b/.DepricatedMods/TrackedControllerFix/TrackedControllerFix.csproj similarity index 100% rename from .Deprecated/TrackedControllerFix/TrackedControllerFix.csproj rename to .DepricatedMods/TrackedControllerFix/TrackedControllerFix.csproj diff --git a/.Deprecated/TrackedControllerFix/TrackedControllerFixer.cs b/.DepricatedMods/TrackedControllerFix/TrackedControllerFixer.cs similarity index 100% rename from .Deprecated/TrackedControllerFix/TrackedControllerFixer.cs rename to .DepricatedMods/TrackedControllerFix/TrackedControllerFixer.cs diff --git a/.Deprecated/TrackedControllerFix/format.json b/.DepricatedMods/TrackedControllerFix/format.json similarity index 100% rename from .Deprecated/TrackedControllerFix/format.json rename to .DepricatedMods/TrackedControllerFix/format.json diff --git a/.Deprecated/TrackedPointFix/HarmonyPatches.cs b/.DepricatedMods/TrackedPointFix/HarmonyPatches.cs similarity index 100% rename from .Deprecated/TrackedPointFix/HarmonyPatches.cs rename to .DepricatedMods/TrackedPointFix/HarmonyPatches.cs diff --git a/.Deprecated/TrackedPointFix/Main.cs b/.DepricatedMods/TrackedPointFix/Main.cs similarity index 100% rename from .Deprecated/TrackedPointFix/Main.cs rename to .DepricatedMods/TrackedPointFix/Main.cs diff --git a/.Deprecated/TrackedPointFix/Properties/AssemblyInfo.cs b/.DepricatedMods/TrackedPointFix/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/TrackedPointFix/Properties/AssemblyInfo.cs rename to .DepricatedMods/TrackedPointFix/Properties/AssemblyInfo.cs diff --git a/.Deprecated/TrackedPointFix/README.md b/.DepricatedMods/TrackedPointFix/README.md similarity index 100% rename from .Deprecated/TrackedPointFix/README.md rename to .DepricatedMods/TrackedPointFix/README.md diff --git a/.Deprecated/TrackedPointFix/TrackedPointFix.csproj b/.DepricatedMods/TrackedPointFix/TrackedPointFix.csproj similarity index 100% rename from .Deprecated/TrackedPointFix/TrackedPointFix.csproj rename to .DepricatedMods/TrackedPointFix/TrackedPointFix.csproj diff --git a/.Deprecated/TrackedPointFix/format.json b/.DepricatedMods/TrackedPointFix/format.json similarity index 100% rename from .Deprecated/TrackedPointFix/format.json rename to .DepricatedMods/TrackedPointFix/format.json diff --git a/.Experimental/LuaNetworkVariables/README.md b/.Experimental/LuaNetworkVariables/README.md deleted file mode 100644 index c78a56a..0000000 --- a/.Experimental/LuaNetworkVariables/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# WhereAmIPointing - -Simple mod that makes your controller rays always visible when the menus are open. Useful for when you're trying to aim at something in the distance. Also visualizes which ray is being used for menu interaction. - ---- - -Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI. -https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games - -> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive. - -> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use. - -> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive. diff --git a/.Experimental/LuaNetworkVariables/format.json b/.Experimental/LuaNetworkVariables/format.json deleted file mode 100644 index 654911a..0000000 --- a/.Experimental/LuaNetworkVariables/format.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "_id": 234, - "name": "WhereAmIPointing", - "modversion": "1.0.1", - "gameversion": "2024r175", - "loaderversion": "0.6.1", - "modtype": "Mod", - "author": "NotAKidoS", - "description": "Simple mod that makes your controller rays always visible when the menus are open. Useful for when you're trying to aim at something in the distance. Also visualizes which ray is being used for menu interaction.", - "searchtags": [ - "controller", - "ray", - "line", - "tomato" - ], - "requirements": [ - "None" - ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r40/WhereAmIPointing.dll", - "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/WhereAmIPointing/", - "changelog": "- Fixed line renderer alpha not being reset when the menu is closed.", - "embedcolor": "#f61963" -} \ No newline at end of file diff --git a/.Experimental/LuaTTS/Main.cs b/.Experimental/LuaTTS/Main.cs deleted file mode 100644 index 6242c04..0000000 --- a/.Experimental/LuaTTS/Main.cs +++ /dev/null @@ -1,54 +0,0 @@ -using ABI_RC.Scripting.ScriptNetwork; -using ABI_RC.Systems.ModNetwork; -using MelonLoader; -using NAK.LuaTTS.Patches; - -namespace NAK.LuaTTS; - -public class LuaTTSMod : MelonMod -{ - public override void OnInitializeMelon() - { - ApplyPatches(typeof(LuaScriptFactoryPatches)); - - ModNetworkMessage.AddConverter(ReadScriptID, WriteScriptID); - ModNetworkMessage.AddConverter(ReadScriptInstanceID, WriteScriptInstanceID); - } - - private static ScriptID ReadScriptID(ModNetworkMessage msg) - { - msg.Read(out byte[] value); - ScriptID scriptID = new(value); - return scriptID; - } - - private static void WriteScriptID(ModNetworkMessage msg, ScriptID scriptID) - { - msg.Write(scriptID.value); - } - - private static ScriptInstanceID ReadScriptInstanceID(ModNetworkMessage msg) - { - msg.Read(out byte[] value); - ScriptInstanceID scriptInstanceID = new(value); - return scriptInstanceID; - } - - private static void WriteScriptInstanceID(ModNetworkMessage msg, ScriptInstanceID scriptInstanceID) - { - msg.Write(scriptInstanceID.value); - } - - private void ApplyPatches(Type type) - { - try - { - HarmonyInstance.PatchAll(type); - } - catch (Exception e) - { - LoggerInstance.Msg($"Failed while patching {type.Name}!"); - LoggerInstance.Error(e); - } - } -} \ No newline at end of file diff --git a/.Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftEventReceiver.cs b/.Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftEventReceiver.cs deleted file mode 100644 index 11fe6fc..0000000 --- a/.Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftEventReceiver.cs +++ /dev/null @@ -1,87 +0,0 @@ -using ABI.CCK.Components; -using JetBrains.Annotations; -using UnityEngine; -using UnityEngine.Events; - -#if !UNITY_EDITOR -using ABI_RC.Core.Util; -using ABI_RC.Core.Util.AssetFiltering; -#endif - -namespace NAK.OriginShift.Components; - -public class OriginShiftEventReceiver : MonoBehaviour -{ - #region Serialized Fields - - [SerializeField] private UnityEvent _onOriginShifted = new(); - [SerializeField] private bool _filterChunkBoundary; - [SerializeField] private Vector3 _chunkBoundaryMin = Vector3.zero; - [SerializeField] private Vector3 _chunkBoundaryMax = Vector3.one; - - #endregion Serialized Fields - -#if !UNITY_EDITOR - - #region Private Fields - - private bool _isInitialized; - - #endregion Private Fields - - #region Unity Events - - private void OnEnable() - { - if (!_isInitialized) - { - //SharedFilter.SanitizeUnityEvents("OriginShiftEventReceiver", _onOriginShifted); - - UnityEventsHelper.SanitizeUnityEvents("OriginShiftEventReceiver", - UnityEventsHelper.EventSource.Unknown, - this, - CVRWorld.Instance, - _onOriginShifted); - - _isInitialized = true; - } - - OriginShiftManager.OnOriginShifted += HandleOriginShifted; - } - - private void OnDisable() - { - OriginShiftManager.OnOriginShifted -= HandleOriginShifted; - } - - #endregion Unity Events - - #region Origin Shift Events - - private void HandleOriginShifted(Vector3 shift) - { - if (_filterChunkBoundary && !IsWithinChunkBoundary(shift)) - return; - - // wrap user-defined event because the user can't be trusted - try - { - _onOriginShifted.Invoke(); - } - catch (Exception e) - { - OriginShiftMod.Logger.Error("OriginShiftEventReceiver: Exception invoking OnOriginShifted event: " + e, this); - } - } - - private bool IsWithinChunkBoundary(Vector3 shift) - { - return shift.x >= _chunkBoundaryMin.x && shift.x <= _chunkBoundaryMax.x && - shift.y >= _chunkBoundaryMin.y && shift.y <= _chunkBoundaryMax.y && - shift.z >= _chunkBoundaryMin.z && shift.z <= _chunkBoundaryMax.z; - } - - #endregion Origin Shift Events - -#endif -} \ No newline at end of file diff --git a/.Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftTransformReceiver.cs b/.Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftTransformReceiver.cs deleted file mode 100644 index 1e98ce7..0000000 --- a/.Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftTransformReceiver.cs +++ /dev/null @@ -1,33 +0,0 @@ -using UnityEngine; - -namespace NAK.OriginShift.Components; - -public class OriginShiftTransformReceiver : MonoBehaviour -{ -#if !UNITY_EDITOR - - #region Unity Events - - private void OnEnable() - { - OriginShiftManager.OnOriginShifted += OnOriginShifted; - } - - private void OnDisable() - { - OriginShiftManager.OnOriginShifted -= OnOriginShifted; - } - - #endregion Unity Events - - #region Origin Shift Events - - private void OnOriginShifted(Vector3 shift) - { - transform.position += shift; - } - - #endregion Origin Shift Events - -#endif -} \ No newline at end of file diff --git a/.gitignore b/.gitignore index e3092f6..7a3e958 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,6 @@ ## ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore -# NAK -.Blackbox/ - # Nstrip & ManagedLibs stuff NStrip.exe .ManagedLibs/*.dll diff --git a/.Deprecated/AASDefaultProfileFix/AASDefaultProfileFix.csproj b/AASDefaultProfileFix/AASDefaultProfileFix.csproj similarity index 100% rename from .Deprecated/AASDefaultProfileFix/AASDefaultProfileFix.csproj rename to AASDefaultProfileFix/AASDefaultProfileFix.csproj diff --git a/.Deprecated/AASDefaultProfileFix/Main.cs b/AASDefaultProfileFix/Main.cs similarity index 100% rename from .Deprecated/AASDefaultProfileFix/Main.cs rename to AASDefaultProfileFix/Main.cs diff --git a/.Deprecated/AASDefaultProfileFix/Properties/AssemblyInfo.cs b/AASDefaultProfileFix/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/AASDefaultProfileFix/Properties/AssemblyInfo.cs rename to AASDefaultProfileFix/Properties/AssemblyInfo.cs diff --git a/.Deprecated/AASDefaultProfileFix/README.md b/AASDefaultProfileFix/README.md similarity index 100% rename from .Deprecated/AASDefaultProfileFix/README.md rename to AASDefaultProfileFix/README.md diff --git a/.Deprecated/AASDefaultProfileFix/format.json b/AASDefaultProfileFix/format.json similarity index 100% rename from .Deprecated/AASDefaultProfileFix/format.json rename to AASDefaultProfileFix/format.json diff --git a/ASTExtension/Integrations/BTKUI/BtkUiAddon.cs b/ASTExtension/Integrations/BTKUI/BtkUiAddon.cs index e0e294a..cbb7534 100644 --- a/ASTExtension/Integrations/BTKUI/BtkUiAddon.cs +++ b/ASTExtension/Integrations/BTKUI/BtkUiAddon.cs @@ -1,9 +1,7 @@ using ABI_RC.Core.Player; -using ABI_RC.Core.Util.AnimatorManager; using BTKUILib; using BTKUILib.UIObjects; using BTKUILib.UIObjects.Components; -using UnityEngine; namespace NAK.ASTExtension.Integrations; @@ -31,9 +29,6 @@ public static partial class BtkUiAddon Category category = QuickMenuAPI.PlayerSelectPage.AddCategory(ASTExtensionMod.ModName, ASTExtensionMod.ModName); Button button = category.AddButton("Copy Height", "ASM_Icon_AvatarHeightCopy", "Copy selected players Eye Height."); button.OnPress += OnCopyPlayerHeight; - - Button button2 = category.AddButton("Copy AAS", string.Empty, "Copy selected players AAS."); - button2.OnPress += OnCopyPlayerAAS; } private static void OnPlayerSelected(string _, string id) @@ -43,56 +38,18 @@ public static partial class BtkUiAddon private static void OnCopyPlayerHeight() { - if (string.IsNullOrEmpty(_selectedPlayer)) - return; - - if (!CVRPlayerManager.Instance.GetPlayerPuppetMaster(_selectedPlayer, out PuppetMaster player)) - return; - - if (player._avatar == null) - return; + if (string.IsNullOrEmpty(_selectedPlayer)) + return; + + if (!CVRPlayerManager.Instance.GetPlayerPuppetMaster(_selectedPlayer, out PuppetMaster player)) + return; + + if (player._avatar == null) + return; - float height = player.netIkController.GetRemoteHeight(); - ASTExtensionMod.Instance.SetAvatarHeight(height); - } - - private static void OnCopyPlayerAAS() - { - if (string.IsNullOrEmpty(_selectedPlayer)) - return; - - if (!CVRPlayerManager.Instance.GetPlayerPuppetMaster(_selectedPlayer, out PuppetMaster player)) - return; - - AvatarAnimatorManager localAnimator = PlayerSetup.Instance.animatorManager; - AvatarAnimatorManager remoteAnimator = player.animatorManager; - if (!localAnimator.IsInitialized - || !remoteAnimator.IsInitialized) - return; - - // Copy AAS - foreach ((var parameterName, CVRAnimatorManager.ParamDef paramDef) in remoteAnimator.Parameters) - { - switch (paramDef.type) - { - case AnimatorControllerParameterType.Trigger: - case AnimatorControllerParameterType.Bool: - remoteAnimator.GetParameter(parameterName, out bool value); - localAnimator.SetParameter(parameterName, value); - break; - case AnimatorControllerParameterType.Float: - remoteAnimator.GetParameter(parameterName, out float value2); - localAnimator.SetParameter(parameterName, value2); - break; - case AnimatorControllerParameterType.Int: - remoteAnimator.GetParameter(parameterName, out int value3); - localAnimator.SetParameter(parameterName, value3); - break; - } + float height = player.netIkController.GetRemoteHeight(); + ASTExtensionMod.Instance.SetAvatarHeight(height); } - - } - #endregion Player Select Page } \ No newline at end of file diff --git a/ASTExtension/Properties/AssemblyInfo.cs b/ASTExtension/Properties/AssemblyInfo.cs index 0200119..5c617e2 100644 --- a/ASTExtension/Properties/AssemblyInfo.cs +++ b/ASTExtension/Properties/AssemblyInfo.cs @@ -27,6 +27,6 @@ using System.Reflection; namespace NAK.ASTExtension.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.3"; + public const string Version = "1.0.2"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/ASTExtension/format.json b/ASTExtension/format.json index 934110a..5ad14ea 100644 --- a/ASTExtension/format.json +++ b/ASTExtension/format.json @@ -1,8 +1,8 @@ { "_id": 223, "name": "ASTExtension", - "modversion": "1.0.3", - "gameversion": "2025r179", + "modversion": "1.0.2", + "gameversion": "2025r178", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", @@ -17,8 +17,8 @@ "requirements": [ "BTKUILib" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/ASTExtension.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r45/ASTExtension.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/ASTExtension/", - "changelog": "- Recompiled for 2025r179", + "changelog": "- Fixes for 2025r178", "embedcolor": "#f61963" } \ No newline at end of file diff --git a/AvatarCloneTest/AvatarClone/AvatarClone.API.cs b/AvatarCloneTest/AvatarClone/AvatarClone.API.cs new file mode 100644 index 0000000..89835bd --- /dev/null +++ b/AvatarCloneTest/AvatarClone/AvatarClone.API.cs @@ -0,0 +1,68 @@ +using UnityEngine; + +namespace NAK.AvatarCloneTest; + +public partial class AvatarClone +{ + #region Public API Methods + + /// + /// Sets whether the specific renderer requires additional runtime checks when copying to the clone. + /// For example, Magica Cloth modifies the sharedMesh & bones of the renderer at runtime. This is not needed + /// for most renderers, so copying for all renderers would be inefficient. + /// + public void SetRendererNeedsAdditionalChecks(Renderer rend, bool needsChecks) + { + switch (rend) + { + case MeshRenderer meshRenderer: + { + int index = _standardRenderers.IndexOf(meshRenderer); + if (index == -1) return; + + if (needsChecks && !_standardRenderersNeedingChecks.Contains(index)) + { + int insertIndex = _standardRenderersNeedingChecks.Count; + _standardRenderersNeedingChecks.Add(index); + _cachedSharedMeshes.Insert(insertIndex, null); + } + else if (!needsChecks) + { + int removeIndex = _standardRenderersNeedingChecks.IndexOf(index); + if (removeIndex != -1) + { + _standardRenderersNeedingChecks.RemoveAt(removeIndex); + _cachedSharedMeshes.RemoveAt(removeIndex); + } + } + return; + } + case SkinnedMeshRenderer skinnedRenderer: + { + int index = _skinnedRenderers.IndexOf(skinnedRenderer); + if (index == -1) return; + + if (needsChecks && !_skinnedRenderersNeedingChecks.Contains(index)) + { + int insertIndex = _skinnedRenderersNeedingChecks.Count; + _skinnedRenderersNeedingChecks.Add(index); + _cachedSharedMeshes.Insert(_standardRenderersNeedingChecks.Count + insertIndex, null); + _cachedSkinnedBoneCounts.Add(0); + } + else if (!needsChecks) + { + int removeIndex = _skinnedRenderersNeedingChecks.IndexOf(index); + if (removeIndex != -1) + { + _skinnedRenderersNeedingChecks.RemoveAt(removeIndex); + _cachedSharedMeshes.RemoveAt(_standardRenderersNeedingChecks.Count + removeIndex); + _cachedSkinnedBoneCounts.RemoveAt(removeIndex); + } + } + break; + } + } + } + + #endregion Public API Methods +} \ No newline at end of file diff --git a/AvatarCloneTest/AvatarClone/AvatarClone.Clones.cs b/AvatarCloneTest/AvatarClone/AvatarClone.Clones.cs new file mode 100644 index 0000000..8fb54ec --- /dev/null +++ b/AvatarCloneTest/AvatarClone/AvatarClone.Clones.cs @@ -0,0 +1,103 @@ +using ABI_RC.Core; +using UnityEngine; +using UnityEngine.Rendering; + +namespace NAK.AvatarCloneTest; + +public partial class AvatarClone +{ + #region Clone Creation + + private void CreateClones() + { + int standardCount = _standardRenderers.Count; + _standardClones = new List(standardCount); + _standardCloneFilters = new List(standardCount); + for (int i = 0; i < standardCount; i++) CreateStandardClone(i); + + int skinnedCount = _skinnedRenderers.Count; + _skinnedClones = new List(skinnedCount); + for (int i = 0; i < skinnedCount; i++) CreateSkinnedClone(i); + } + + private void CreateStandardClone(int index) + { + MeshRenderer sourceRenderer = _standardRenderers[index]; + MeshFilter sourceFilter = _standardFilters[index]; + + GameObject go = new(sourceRenderer.name + "_VisualClone") + { + layer = CVRLayers.PlayerClone + }; + + go.transform.SetParent(sourceRenderer.transform, false); + //go.transform.SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity); + + MeshRenderer cloneRenderer = go.AddComponent(); + MeshFilter cloneFilter = go.AddComponent(); + + // Initial setup + cloneRenderer.sharedMaterials = sourceRenderer.sharedMaterials; + cloneRenderer.shadowCastingMode = ShadowCastingMode.Off; + cloneRenderer.probeAnchor = sourceRenderer.probeAnchor; + cloneRenderer.localBounds = new Bounds(Vector3.zero, Vector3.positiveInfinity); + cloneFilter.sharedMesh = sourceFilter.sharedMesh; + + // Optimizations to enforce + cloneRenderer.motionVectorGenerationMode = MotionVectorGenerationMode.ForceNoMotion; + cloneRenderer.allowOcclusionWhenDynamic = false; + + // Optimizations to enforce + sourceRenderer.motionVectorGenerationMode = MotionVectorGenerationMode.ForceNoMotion; + sourceRenderer.allowOcclusionWhenDynamic = false; + + _standardClones.Add(cloneRenderer); + _standardCloneFilters.Add(cloneFilter); + } + + private void CreateSkinnedClone(int index) + { + SkinnedMeshRenderer source = _skinnedRenderers[index]; + + GameObject go = new(source.name + "_VisualClone") + { + layer = CVRLayers.PlayerClone + }; + + go.transform.SetParent(source.transform, false); + //go.transform.SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity); + + SkinnedMeshRenderer clone = go.AddComponent(); + + // Initial setup + clone.sharedMaterials = source.sharedMaterials; + clone.shadowCastingMode = ShadowCastingMode.Off; + clone.probeAnchor = source.probeAnchor; + clone.localBounds = new Bounds(Vector3.zero, Vector3.positiveInfinity); + clone.sharedMesh = source.sharedMesh; + clone.rootBone = source.rootBone; + clone.bones = source.bones; + clone.quality = source.quality; + clone.updateWhenOffscreen = source.updateWhenOffscreen; + + // Optimizations to enforce + clone.motionVectorGenerationMode = MotionVectorGenerationMode.ForceNoMotion; + clone.allowOcclusionWhenDynamic = false; + clone.updateWhenOffscreen = false; + clone.skinnedMotionVectors = false; + clone.forceMatrixRecalculationPerRender = false; + clone.quality = SkinQuality.Bone4; + + // Optimizations to enforce + source.motionVectorGenerationMode = MotionVectorGenerationMode.ForceNoMotion; + source.allowOcclusionWhenDynamic = false; + source.updateWhenOffscreen = false; + source.skinnedMotionVectors = false; + source.forceMatrixRecalculationPerRender = false; + source.quality = SkinQuality.Bone4; + + _skinnedClones.Add(clone); + } + + #endregion Clone Creation +} \ No newline at end of file diff --git a/AvatarCloneTest/AvatarClone/AvatarClone.Exclusion.cs b/AvatarCloneTest/AvatarClone/AvatarClone.Exclusion.cs new file mode 100644 index 0000000..d5136e3 --- /dev/null +++ b/AvatarCloneTest/AvatarClone/AvatarClone.Exclusion.cs @@ -0,0 +1,141 @@ +using ABI.CCK.Components; +using UnityEngine; + +namespace NAK.AvatarCloneTest; + +public partial class AvatarClone +{ + private readonly Dictionary> _exclusionDirectRenderers = new(); + private readonly Dictionary> _exclusionControlledBones = new(); + + private void InitializeExclusions() + { + // Add head exclusion for humanoid avatars if not present + var animator = GetComponent(); + if (animator != null && animator.isHuman) + { + var headBone = animator.GetBoneTransform(HumanBodyBones.Head); + if (headBone != null && headBone.GetComponent() == null) + { + var exclusion = headBone.gameObject.AddComponent(); + exclusion.isShown = false; + exclusion.target = headBone; + exclusion.shrinkToZero = true; + } + } + + // Process existing exclusions bottom-up + var exclusions = GetComponentsInChildren(true); + + for (int i = exclusions.Length - 1; i >= 0; i--) + { + var exclusion = exclusions[i]; + if (exclusion.target == null) + exclusion.target = exclusion.transform; + + // Skip invalid exclusions or already processed targets + if (exclusion.target == null || _exclusionDirectRenderers.ContainsKey(exclusion.target)) + { + Destroy(exclusion); + continue; + } + + // Initialize data for this exclusion + _exclusionDirectRenderers[exclusion.target] = new HashSet(); + _exclusionControlledBones[exclusion.target] = new HashSet(); + + // Set up our behaviour + exclusion.behaviour = new AvatarCloneExclusion(this, exclusion.target); + + // Collect affected renderers and bones + CollectExclusionData(exclusion.target); + + // Initial update + exclusion.UpdateExclusions(); + } + } + + private void CollectExclusionData(Transform target) + { + var stack = new Stack(); + stack.Push(target); + + while (stack.Count > 0) + { + var current = stack.Pop(); + + // Skip if this transform belongs to another exclusion + if (current != target && current.GetComponent() != null) + continue; + + _exclusionControlledBones[target].Add(current); + + // Add renderers that will need their clone visibility toggled + foreach (var renderer in current.GetComponents()) + { + // Find corresponding clone renderer + if (renderer is MeshRenderer meshRenderer) + { + int index = _standardRenderers.IndexOf(meshRenderer); + if (index != -1) + _exclusionDirectRenderers[target].Add(_standardClones[index]); + } + else if (renderer is SkinnedMeshRenderer skinnedRenderer) + { + int index = _skinnedRenderers.IndexOf(skinnedRenderer); + if (index != -1) + _exclusionDirectRenderers[target].Add(_skinnedClones[index]); + } + } + + // Add children to stack + foreach (Transform child in current) + { + stack.Push(child); + } + } + } + + public void HandleExclusionUpdate(Transform target, Transform shrinkBone, bool isShown) + { + if (!_exclusionDirectRenderers.TryGetValue(target, out var directCloneRenderers) || + !_exclusionControlledBones.TryGetValue(target, out var controlledBones)) + return; + + // Handle direct clone renderers + foreach (var cloneRenderer in directCloneRenderers) + { + cloneRenderer.enabled = isShown; + } + + // Update bone references in clone renderers + int cloneCount = _skinnedClones.Count; + var cloneRenderers = _skinnedClones; + var sourceRenderers = _skinnedRenderers; + + for (int i = 0; i < cloneCount; i++) + { + var clone = cloneRenderers[i]; + var source = sourceRenderers[i]; + var sourceBones = source.bones; + var cloneBones = clone.bones; + int boneCount = cloneBones.Length; + bool needsUpdate = false; + + for (int j = 0; j < boneCount; j++) + { + // Check if this bone is in our controlled set + if (controlledBones.Contains(sourceBones[j])) + { + cloneBones[j] = isShown ? sourceBones[j] : shrinkBone; + needsUpdate = true; + } + } + + if (needsUpdate) + { + clone.bones = cloneBones; + } + } + } +} \ No newline at end of file diff --git a/AvatarCloneTest/AvatarClone/AvatarClone.Fields.cs b/AvatarCloneTest/AvatarClone/AvatarClone.Fields.cs new file mode 100644 index 0000000..0ba69b0 --- /dev/null +++ b/AvatarCloneTest/AvatarClone/AvatarClone.Fields.cs @@ -0,0 +1,67 @@ +using UnityEngine; + +namespace NAK.AvatarCloneTest; + +public partial class AvatarClone +{ + #region Profile Markers +//#if UNITY_EDITOR + private static readonly UnityEngine.Profiling.CustomSampler s_CopyMaterials = + UnityEngine.Profiling.CustomSampler.Create("AvatarClone2.CopyMaterials"); + private static readonly UnityEngine.Profiling.CustomSampler s_CopyBlendShapes = + UnityEngine.Profiling.CustomSampler.Create("AvatarClone2.CopyBlendShapes"); + private static readonly UnityEngine.Profiling.CustomSampler s_CopyMeshes = + UnityEngine.Profiling.CustomSampler.Create("AvatarClone2.CopyMeshes"); + + private static readonly UnityEngine.Profiling.CustomSampler s_MyOnPreRender = + UnityEngine.Profiling.CustomSampler.Create("AvatarClone2.MyOnPreRender"); + private static readonly UnityEngine.Profiling.CustomSampler s_SetShadowsOnly = + UnityEngine.Profiling.CustomSampler.Create("AvatarClone2.SetShadowsOnly"); + private static readonly UnityEngine.Profiling.CustomSampler s_UndoShadowsOnly = + UnityEngine.Profiling.CustomSampler.Create("AvatarClone2.UndoShadowsOnly"); + private static readonly UnityEngine.Profiling.CustomSampler s_SetUiCulling = + UnityEngine.Profiling.CustomSampler.Create("AvatarClone2.SetUiCulling"); + private static readonly UnityEngine.Profiling.CustomSampler s_UndoUiCulling = + UnityEngine.Profiling.CustomSampler.Create("AvatarClone2.UndoUiCulling"); + +//#endif + #endregion Profile Markers + + #region Source Renderers + private List _standardRenderers; + private List _standardFilters; + private List _skinnedRenderers; + private List _allSourceRenderers; // For shadow casting only + #endregion Source Renderers + + #region Clone Renderers + private List _standardClones; + private List _standardCloneFilters; + private List _skinnedClones; + #endregion Clone Renderers + + #region Dynamic Check Lists + private List _standardRenderersNeedingChecks; // Stores indices into _standardRenderers + private List _skinnedRenderersNeedingChecks; // Stores indices into _skinnedRenderers + private List _cachedSkinnedBoneCounts; // So we don't copy the bones unless they've changed + private List _cachedSharedMeshes; // So we don't copy the mesh unless it's changed + #endregion Dynamic Check Lists + + #region Material Data + private List _localMaterials; + private List _cullingMaterials; + private List _mainMaterials; + private MaterialPropertyBlock _propertyBlock; + #endregion Material Data + + #region Blend Shape Data + private List> _blendShapeWeights; + #endregion Blend Shape Data + + #region Shadow and UI Culling Settings + private bool _uiCullingActive; + private bool _shadowsOnlyActive; + private bool[] _originallyHadShadows; + private bool[] _originallyWasEnabled; + #endregion Shadow and UI Culling Settings +} \ No newline at end of file diff --git a/AvatarCloneTest/AvatarClone/AvatarClone.Init.cs b/AvatarCloneTest/AvatarClone/AvatarClone.Init.cs new file mode 100644 index 0000000..41bd84b --- /dev/null +++ b/AvatarCloneTest/AvatarClone/AvatarClone.Init.cs @@ -0,0 +1,128 @@ +using ABI_RC.Core.Player.ShadowClone; +using UnityEngine; + +namespace NAK.AvatarCloneTest; + +public partial class AvatarClone +{ + #region Initialization + + private void InitializeCollections() + { + _standardRenderers = new List(); + _standardFilters = new List(); + _skinnedRenderers = new List(); + _allSourceRenderers = new List(); + + _standardClones = new List(); + _standardCloneFilters = new List(); + _skinnedClones = new List(); + + _standardRenderersNeedingChecks = new List(); + _skinnedRenderersNeedingChecks = new List(); + _cachedSkinnedBoneCounts = new List(); + _cachedSharedMeshes = new List(); + + _localMaterials = new List(); + _cullingMaterials = new List(); + _mainMaterials = new List(); + _propertyBlock = new MaterialPropertyBlock(); + + _blendShapeWeights = new List>(); + } + + private void InitializeRenderers() + { + var renderers = GetComponentsInChildren(true); + + // Pre-size lists based on found renderers + // _standardRenderers.Capacity = renderers.Length; + // _standardFilters.Capacity = renderers.Length; + // _skinnedRenderers.Capacity = renderers.Length; + // _allSourceRenderers.Capacity = renderers.Length; + + // Sort renderers into their respective lists + foreach (Renderer render in renderers) + { + _allSourceRenderers.Add(render); + + switch (render) + { + case MeshRenderer meshRenderer: + { + MeshFilter filter = meshRenderer.GetComponent(); + if (filter != null && filter.sharedMesh != null) + { + _standardRenderers.Add(meshRenderer); + _standardFilters.Add(filter); + } + break; + } + case SkinnedMeshRenderer skinnedRenderer: + { + if (skinnedRenderer.sharedMesh != null) _skinnedRenderers.Add(skinnedRenderer); + break; + } + } + } + } + + private void SetupMaterialsAndBlendShapes() + { + // Cache counts + int standardCount = _standardRenderers.Count; + int skinnedCount = _skinnedRenderers.Count; + var standardRenderers = _standardRenderers; + var skinnedRenderers = _skinnedRenderers; + var localMats = _localMaterials; + var cullingMats = _cullingMaterials; + var blendWeights = _blendShapeWeights; + + // Setup standard renderer materials + for (int i = 0; i < standardCount; i++) + { + MeshRenderer render = standardRenderers[i]; + int matCount = render.sharedMaterials.Length; + + // Local materials array + var localMatArray = new Material[matCount]; + for (int j = 0; j < matCount; j++) localMatArray[j] = render.sharedMaterials[j]; + localMats.Add(localMatArray); + + // Culling materials array + var cullingMatArray = new Material[matCount]; + for (int j = 0; j < matCount; j++) cullingMatArray[j] = ShadowCloneUtils.cullingMaterial; + cullingMats.Add(cullingMatArray); + } + + // Setup skinned renderer materials and blend shapes + for (int i = 0; i < skinnedCount; i++) + { + SkinnedMeshRenderer render = skinnedRenderers[i]; + int matCount = render.sharedMaterials.Length; + + // Local materials array + var localMatArray = new Material[matCount]; + for (int j = 0; j < matCount; j++) localMatArray[j] = render.sharedMaterials[j]; + localMats.Add(localMatArray); + + // Culling materials array + var cullingMatArray = new Material[matCount]; + for (int j = 0; j < matCount; j++) cullingMatArray[j] = ShadowCloneUtils.cullingMaterial; + cullingMats.Add(cullingMatArray); + + // Blend shape weights + int blendShapeCount = render.sharedMesh.blendShapeCount; + var weights = new List(blendShapeCount); + for (int j = 0; j < blendShapeCount; j++) weights.Add(0f); + blendWeights.Add(weights); + } + + // Initialize renderer state arrays + int totalRenderers = _allSourceRenderers.Count; + _originallyHadShadows = new bool[totalRenderers]; + _originallyWasEnabled = new bool[totalRenderers]; + } + + #endregion Initialization +} \ No newline at end of file diff --git a/AvatarCloneTest/AvatarClone/AvatarClone.MagicaSupport.cs b/AvatarCloneTest/AvatarClone/AvatarClone.MagicaSupport.cs new file mode 100644 index 0000000..7ae5855 --- /dev/null +++ b/AvatarCloneTest/AvatarClone/AvatarClone.MagicaSupport.cs @@ -0,0 +1,34 @@ +using MagicaCloth; +using MagicaCloth2; +using UnityEngine; + +namespace NAK.AvatarCloneTest; + +public partial class AvatarClone +{ + #region Magica Cloth Support + + private void SetupMagicaClothSupport() + { + var magicaCloths1 = GetComponentsInChildren(true); + foreach (MagicaRenderDeformer magicaCloth in magicaCloths1) + { + // Get the renderer on the same object + Renderer renderer = magicaCloth.gameObject.GetComponent(); + SetRendererNeedsAdditionalChecks(renderer, true); + } + + var magicaCloths2 = GetComponentsInChildren(true); + foreach (MagicaCloth2.MagicaCloth magicaCloth in magicaCloths2) + { + if (magicaCloth.serializeData.clothType != ClothProcess.ClothType.MeshCloth) + continue; // Only matters for cloth physics + + // Set the affected renderers as requiring extra checks + var renderers = magicaCloth.serializeData.sourceRenderers; + foreach (Renderer renderer in renderers) SetRendererNeedsAdditionalChecks(renderer, true); + } + } + + #endregion Magica Cloth Support +} \ No newline at end of file diff --git a/AvatarCloneTest/AvatarClone/AvatarClone.Update.cs b/AvatarCloneTest/AvatarClone/AvatarClone.Update.cs new file mode 100644 index 0000000..42cef73 --- /dev/null +++ b/AvatarCloneTest/AvatarClone/AvatarClone.Update.cs @@ -0,0 +1,181 @@ +using UnityEngine; + +namespace NAK.AvatarCloneTest; + +public partial class AvatarClone +{ + #region Update Methods + + private void UpdateStandardRenderers() + { + int count = _standardRenderers.Count; + var sourceRenderers = _standardRenderers; + var cloneRenderers = _standardClones; + var localMats = _localMaterials; + + for (int i = 0; i < count; i++) + { + if (!IsRendererValid(sourceRenderers[i])) continue; + CopyMaterialsAndProperties( + sourceRenderers[i], + cloneRenderers[i], + _propertyBlock, + _mainMaterials, + localMats[i]); + } + } + + private void UpdateSkinnedRenderers() + { + int standardCount = _standardRenderers.Count; + int count = _skinnedRenderers.Count; + var sourceRenderers = _skinnedRenderers; + var cloneRenderers = _skinnedClones; + var localMats = _localMaterials; + var blendWeights = _blendShapeWeights; + + for (int i = 0; i < count; i++) + { + SkinnedMeshRenderer source = sourceRenderers[i]; + if (!IsRendererValid(source)) continue; + + SkinnedMeshRenderer clone = cloneRenderers[i]; + CopyMaterialsAndProperties( + source, + clone, + _propertyBlock, + _mainMaterials, + localMats[i + standardCount]); + + CopyBlendShapes(source, clone, blendWeights[i]); + } + } + + private void UpdateStandardRenderersWithChecks() + { + s_CopyMeshes.Begin(); + + var cloneFilters = _standardCloneFilters; + var sourceFilters = _standardFilters; + var cachedMeshes = _cachedSharedMeshes; + var checkIndices = _standardRenderersNeedingChecks; + int checkCount = checkIndices.Count; + + while (cachedMeshes.Count < checkCount) cachedMeshes.Add(null); + + for (int i = 0; i < checkCount; i++) + { + int rendererIndex = checkIndices[i]; + Mesh newMesh = sourceFilters[rendererIndex].sharedMesh; + if (ReferenceEquals(newMesh, cachedMeshes[i])) continue; + cloneFilters[rendererIndex].sharedMesh = newMesh; // expensive & allocates + cachedMeshes[i] = newMesh; + } + + s_CopyMeshes.End(); + } + + private void UpdateSkinnedRenderersWithChecks() + { + s_CopyMeshes.Begin(); + + var sourceRenderers = _skinnedRenderers; + var cloneRenderers = _skinnedClones; + var cachedMeshes = _cachedSharedMeshes; + var cachedBoneCounts = _cachedSkinnedBoneCounts; + var checkIndices = _skinnedRenderersNeedingChecks; + int checkCount = checkIndices.Count; + int meshOffset = _standardRenderersNeedingChecks.Count; + + // Ensure cache lists are properly sized + while (cachedMeshes.Count < meshOffset + checkCount) cachedMeshes.Add(null); + while (cachedBoneCounts.Count < checkCount) cachedBoneCounts.Add(0); + + for (int i = 0; i < checkCount; i++) + { + int rendererIndex = checkIndices[i]; + SkinnedMeshRenderer source = sourceRenderers[rendererIndex]; + SkinnedMeshRenderer clone = cloneRenderers[rendererIndex]; + + // Check mesh changes + Mesh newMesh = source.sharedMesh; // expensive & allocates + if (!ReferenceEquals(newMesh, cachedMeshes[meshOffset + i])) + { + clone.sharedMesh = newMesh; + cachedMeshes[meshOffset + i] = newMesh; + } + + // Check bone changes + var sourceBones = source.bones; + int newBoneCount = sourceBones.Length; + int oldBoneCount = cachedBoneCounts[i]; + if (newBoneCount == oldBoneCount) + continue; + + var cloneBones = clone.bones; // expensive & allocates + if (newBoneCount > oldBoneCount) + { + // Resize array and copy only the new bones (Magica Cloth appends bones when enabling Mesh Cloth) + Array.Resize(ref cloneBones, newBoneCount); + for (int boneIndex = oldBoneCount; boneIndex < newBoneCount; boneIndex++) + cloneBones[boneIndex] = sourceBones[boneIndex]; + clone.bones = cloneBones; + } + else + { + // If shrinking, just set the whole array + clone.bones = sourceBones; + } + + cachedBoneCounts[i] = newBoneCount; + } + + s_CopyMeshes.End(); + } + + private static void CopyMaterialsAndProperties( + Renderer source, Renderer clone, + MaterialPropertyBlock propertyBlock, + List mainMaterials, + Material[] localMaterials) + { + s_CopyMaterials.Begin(); + + source.GetSharedMaterials(mainMaterials); + + int matCount = mainMaterials.Count; + bool hasChanged = false; + for (var i = 0; i < matCount; i++) + { + if (ReferenceEquals(mainMaterials[i], localMaterials[i])) continue; + localMaterials[i] = mainMaterials[i]; + hasChanged = true; + } + if (hasChanged) clone.sharedMaterials = localMaterials; + + source.GetPropertyBlock(propertyBlock); + clone.SetPropertyBlock(propertyBlock); + + s_CopyMaterials.End(); + } + + private static void CopyBlendShapes( + SkinnedMeshRenderer source, + SkinnedMeshRenderer target, + List blendShapeWeights) + { + s_CopyBlendShapes.Begin(); + + int weightCount = blendShapeWeights.Count; + for (var i = 0; i < weightCount; i++) + { + var weight = source.GetBlendShapeWeight(i); + // ReSharper disable once CompareOfFloatsByEqualityOperator + if (weight == blendShapeWeights[i]) continue; // Halves the work + target.SetBlendShapeWeight(i, blendShapeWeights[i] = weight); + } + + s_CopyBlendShapes.End(); + } + #endregion Update Methods +} \ No newline at end of file diff --git a/AvatarCloneTest/AvatarClone/AvatarClone.Util.cs b/AvatarCloneTest/AvatarClone/AvatarClone.Util.cs new file mode 100644 index 0000000..c6fb033 --- /dev/null +++ b/AvatarCloneTest/AvatarClone/AvatarClone.Util.cs @@ -0,0 +1,20 @@ +using ABI_RC.Core; +using ABI_RC.Core.Player; +using UnityEngine; + +namespace NAK.AvatarCloneTest; + +public partial class AvatarClone +{ + private static bool CameraRendersPlayerLocalLayer(Camera cam) + => (cam.cullingMask & (1 << CVRLayers.PlayerLocal)) != 0; + + private static bool CameraRendersPlayerCloneLayer(Camera cam) + => (cam.cullingMask & (1 << CVRLayers.PlayerClone)) != 0; + + private static bool IsUIInternalCamera(Camera cam) + => cam == PlayerSetup.Instance.activeUiCam; + + private static bool IsRendererValid(Renderer renderer) + => renderer && renderer.gameObject.activeInHierarchy; +} \ No newline at end of file diff --git a/AvatarCloneTest/AvatarClone/AvatarClone.cs b/AvatarCloneTest/AvatarClone/AvatarClone.cs new file mode 100644 index 0000000..88c8112 --- /dev/null +++ b/AvatarCloneTest/AvatarClone/AvatarClone.cs @@ -0,0 +1,134 @@ +using UnityEngine; +using UnityEngine.Rendering; + +namespace NAK.AvatarCloneTest; + +public partial class AvatarClone : MonoBehaviour +{ + #region Unity Events + + private void Start() + { + InitializeCollections(); + InitializeRenderers(); + SetupMaterialsAndBlendShapes(); + CreateClones(); + + InitializeExclusions(); + SetupMagicaClothSupport(); + + Camera.onPreCull += MyOnPreRender; + } + + private void OnDestroy() + { + Camera.onPreCull -= MyOnPreRender; + } + + private void LateUpdate() + { + // Update all renderers with basic properties (Materials & BlendShapes) + UpdateStandardRenderers(); + UpdateSkinnedRenderers(); + + // Additional pass for renderers needing extra checks (Shared Mesh & Bone Changes) + UpdateStandardRenderersWithChecks(); + UpdateSkinnedRenderersWithChecks(); + } + + private void MyOnPreRender(Camera cam) + { + s_MyOnPreRender.Begin(); + + bool isOurUiCamera = IsUIInternalCamera(cam); + bool rendersOurPlayerLayer = CameraRendersPlayerLocalLayer(cam); + bool rendersOurCloneLayer = CameraRendersPlayerCloneLayer(cam); + + // Renders both player layers. + // PlayerLocal will now act as a shadow caster, while PlayerClone will act as the actual head-hidden renderer. + bool rendersBothPlayerLayers = rendersOurPlayerLayer && rendersOurCloneLayer; + if (!_shadowsOnlyActive && rendersBothPlayerLayers) + { + s_SetShadowsOnly.Begin(); + + int sourceCount = _allSourceRenderers.Count; + var sourceRenderers = _allSourceRenderers; + for (int i = 0; i < sourceCount; i++) + { + Renderer renderer = sourceRenderers[i]; + if (!IsRendererValid(renderer)) continue; + + bool shouldRender = renderer.shadowCastingMode != ShadowCastingMode.Off; + _originallyWasEnabled[i] = renderer.enabled; + _originallyHadShadows[i] = shouldRender; + renderer.shadowCastingMode = ShadowCastingMode.ShadowsOnly; + if (renderer.forceRenderingOff == shouldRender) renderer.forceRenderingOff = !shouldRender; // TODO: Eval if check is needed + } + _shadowsOnlyActive = true; + + s_SetShadowsOnly.End(); + } + else if (_shadowsOnlyActive && !rendersBothPlayerLayers) + { + s_UndoShadowsOnly.Begin(); + + int sourceCount = _allSourceRenderers.Count; + var sourceRenderers = _allSourceRenderers; + for (int i = 0; i < sourceCount; i++) + { + Renderer renderer = sourceRenderers[i]; + if (!IsRendererValid(renderer)) continue; + + renderer.shadowCastingMode = _originallyHadShadows[i] ? ShadowCastingMode.On : ShadowCastingMode.Off; + if (renderer.forceRenderingOff == _originallyWasEnabled[i]) renderer.forceRenderingOff = !_originallyWasEnabled[i]; // TODO: Eval if check is needed + } + _shadowsOnlyActive = false; + + s_UndoShadowsOnly.End(); + } + + // Handle UI culling material changes + if (isOurUiCamera && !_uiCullingActive && rendersOurCloneLayer) + { + s_SetUiCulling.Begin(); + + int standardCount = _standardRenderers.Count; + var standardClones = _standardClones; + var cullingMaterials = _cullingMaterials; + for (int i = 0; i < standardCount; i++) + standardClones[i].sharedMaterials = cullingMaterials[i]; + + int skinnedCount = _skinnedRenderers.Count; + var skinnedClones = _skinnedClones; + for (int i = 0; i < skinnedCount; i++) + skinnedClones[i].sharedMaterials = cullingMaterials[i + standardCount]; + + _uiCullingActive = true; + + s_SetUiCulling.End(); + } + else if (!isOurUiCamera && _uiCullingActive) + { + s_UndoUiCulling.Begin(); + + int standardCount = _standardRenderers.Count; + var standardClones = _standardClones; + var localMaterials = _localMaterials; + for (int i = 0; i < standardCount; i++) + standardClones[i].sharedMaterials = localMaterials[i]; + + int skinnedCount = _skinnedRenderers.Count; + var skinnedClones = _skinnedClones; + for (int i = 0; i < skinnedCount; i++) + skinnedClones[i].sharedMaterials = localMaterials[i + standardCount]; + + _uiCullingActive = false; + + s_UndoUiCulling.End(); + } + + s_MyOnPreRender.End(); + } + + #endregion Unity Events +} \ No newline at end of file diff --git a/.Deprecated/AvatarCloneTest/AvatarClone/FPRExclusion/AvatarCloneExclusion.cs b/AvatarCloneTest/AvatarClone/FPRExclusion/AvatarCloneExclusion.cs similarity index 65% rename from .Deprecated/AvatarCloneTest/AvatarClone/FPRExclusion/AvatarCloneExclusion.cs rename to AvatarCloneTest/AvatarClone/FPRExclusion/AvatarCloneExclusion.cs index 4f38900..5681761 100644 --- a/.Deprecated/AvatarCloneTest/AvatarClone/FPRExclusion/AvatarCloneExclusion.cs +++ b/AvatarCloneTest/AvatarClone/FPRExclusion/AvatarCloneExclusion.cs @@ -5,14 +5,9 @@ namespace NAK.AvatarCloneTest; public class AvatarCloneExclusion : IExclusionBehaviour { - public readonly Dictionary> skinnedToBoneIndex = new(); - public readonly List affectedTransforms = new(); - public readonly List affectedRenderers = new(); - public HashSet affectedTransformSet = new(); - private readonly AvatarClone _cloneSystem; private readonly Transform _target; - internal Transform _shrinkBone; + private Transform _shrinkBone; public bool isImmuneToGlobalState { get; set; } @@ -24,16 +19,20 @@ public class AvatarCloneExclusion : IExclusionBehaviour public void UpdateExclusions(bool isShown, bool shrinkToZero) { + Debug.Log($"[AvatarClone2] Updating exclusion for {_target.name}: isShown={isShown}, shrinkToZero={shrinkToZero}"); + if (_shrinkBone == null) { // Create shrink bone parented directly to target _shrinkBone = new GameObject($"{_target.name}_Shrink").transform; _shrinkBone.SetParent(_target, false); + Debug.Log($"[AvatarClone2] Created shrink bone for {_target.name}"); } + // Set scale based on shrink mode _shrinkBone.localScale = shrinkToZero ? Vector3.zero : Vector3.positiveInfinity; - // Replace the bone references with the shrink bone for the indicies we modify - _cloneSystem.HandleExclusionUpdate(this, isShown); + // Let the clone system handle the update + _cloneSystem.HandleExclusionUpdate(_target, _shrinkBone, isShown); } } \ No newline at end of file diff --git a/.Deprecated/AvatarCloneTest/AvatarCloneTest.csproj b/AvatarCloneTest/AvatarCloneTest.csproj similarity index 100% rename from .Deprecated/AvatarCloneTest/AvatarCloneTest.csproj rename to AvatarCloneTest/AvatarCloneTest.csproj diff --git a/.Deprecated/AvatarCloneTest/Main.cs b/AvatarCloneTest/Main.cs similarity index 60% rename from .Deprecated/AvatarCloneTest/Main.cs rename to AvatarCloneTest/Main.cs index 3bb4f09..21a34bf 100644 --- a/.Deprecated/AvatarCloneTest/Main.cs +++ b/AvatarCloneTest/Main.cs @@ -1,6 +1,4 @@ using ABI_RC.Core; -using ABI_RC.Core.EventSystem; -using ABI_RC.Core.Savior; using MelonLoader; using UnityEngine; @@ -17,17 +15,17 @@ public class AvatarCloneTestMod : MelonMod Category.CreateEntry("use_avatar_clone_test", true, "Use Avatar Clone", description: "Uses the Avatar Clone setup for the local avatar."); - internal static readonly MelonPreferences_Entry EntryCloneMeshRenderers = - Category.CreateEntry("clone_mesh_renderers", false, - "Clone Mesh Renderers", description: "Clones the mesh renderers from the original avatar to the clone."); - - internal static readonly MelonPreferences_Entry EntryCopyBlendShapes = - Category.CreateEntry("copy_blend_shapes", true, - "Copy Blend Shapes", description: "Copies the blend shapes from the original avatar to the clone."); - - internal static readonly MelonPreferences_Entry EntryCopyMaterials = - Category.CreateEntry("copy_materials", true, - "Copy Materials", description: "Copies the materials from the original avatar to the clone."); + // internal static readonly MelonPreferences_Entry EntryCopyBlendShapes = + // Category.CreateEntry("copy_blend_shapes", true, + // "Copy Blend Shapes", description: "Copies the blend shapes from the original avatar to the clone."); + // + // internal static readonly MelonPreferences_Entry EntryCopyMaterials = + // Category.CreateEntry("copy_materials", true, + // "Copy Materials", description: "Copies the materials from the original avatar to the clone."); + // + // internal static readonly MelonPreferences_Entry EntryCopyMeshes = + // Category.CreateEntry("copy_meshes", true, + // "Copy Meshes", description: "Copies the meshes from the original avatar to the clone."); #endregion Melon Preferences @@ -51,13 +49,6 @@ public class AvatarCloneTestMod : MelonMod } } } - - // if pressing ctrl + r, reload avatar - if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.R)) - { - var player = MetaPort.Instance.currentAvatarGuid; - AssetManagement.Instance.LoadLocalAvatar(player); - } } #endregion Melon Events diff --git a/AvatarCloneTest/Patches.cs b/AvatarCloneTest/Patches.cs new file mode 100644 index 0000000..b4cec17 --- /dev/null +++ b/AvatarCloneTest/Patches.cs @@ -0,0 +1,87 @@ +using ABI_RC.Core; +using ABI_RC.Core.Player; +using ABI_RC.Core.Player.TransformHider; +using ABI_RC.Core.Savior; +using ABI_RC.Systems.Camera; +using HarmonyLib; +using UnityEngine; + +namespace NAK.AvatarCloneTest; + +public static class Patches +{ + [HarmonyPrefix] + [HarmonyPatch(typeof(TransformHiderUtils), nameof(TransformHiderUtils.SetupAvatar))] + private static bool OnSetupAvatar(GameObject avatar) + { + if (!AvatarCloneTestMod.EntryUseAvatarCloneTest.Value) return true; + avatar.AddComponent(); + return false; + } + + // [HarmonyPostfix] + // [HarmonyPatch(typeof(FPRExclusion), nameof(FPRExclusion.UpdateExclusions))] + // private static void OnUpdateExclusions(ref FPRExclusion __instance) + // { + // AvatarClone clone = PlayerSetup.Instance._avatar.GetComponent(); + // if (clone == null) return; + // clone.SetBoneChainVisibility(__instance.target, !__instance.isShown, !__instance.shrinkToZero); + // } + + [HarmonyPostfix] + [HarmonyPatch(typeof(CVRMirror), nameof(CVRMirror.Start))] + private static void OnMirrorStart(CVRMirror __instance) + { + if (!AvatarCloneTestMod.EntryUseAvatarCloneTest.Value) + return; + + // Don't reflect the player clone layer + __instance.m_ReflectLayers &= ~(1 << CVRLayers.PlayerClone); + } + + [HarmonyPostfix] + [HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.Update))] + private static void OnTransformHiderManagerUpdate(PlayerSetup __instance) + { + if (!AvatarCloneTestMod.EntryUseAvatarCloneTest.Value) + return; + + if (MetaPort.Instance.settings.GetSettingsBool("ExperimentalAvatarOverrenderUI")) + __instance.activeUiCam.cullingMask |= 1 << CVRLayers.PlayerClone; + else + __instance.activeUiCam.cullingMask &= ~(1 << CVRLayers.PlayerClone); + } + + private static bool _wasDebugInPortableCamera; + + [HarmonyPostfix] + [HarmonyPatch(typeof(PortableCamera), nameof(PortableCamera.Update))] + private static void OnPortableCameraUpdate(ref PortableCamera __instance) + { + if (!AvatarCloneTestMod.EntryUseAvatarCloneTest.Value) + { + // Show both PlayerLocal and PlayerClone + __instance.cameraComponent.cullingMask |= 1 << CVRLayers.PlayerLocal; + __instance.cameraComponent.cullingMask |= 1 << CVRLayers.PlayerClone; + return; + } + + if (TransformHiderManager.s_DebugInPortableCamera == _wasDebugInPortableCamera) + return; + + if (TransformHiderManager.s_DebugInPortableCamera) + { + // Hide PlayerLocal, show PlayerClone + __instance.cameraComponent.cullingMask &= ~(1 << CVRLayers.PlayerLocal); + __instance.cameraComponent.cullingMask |= 1 << CVRLayers.PlayerClone; + } + else + { + // Show PlayerLocal, hide PlayerClone + __instance.cameraComponent.cullingMask |= 1 << CVRLayers.PlayerLocal; + __instance.cameraComponent.cullingMask &= ~(1 << CVRLayers.PlayerClone); + } + + _wasDebugInPortableCamera = TransformHiderManager.s_DebugInPortableCamera; + } +} \ No newline at end of file diff --git a/.Deprecated/AvatarCloneTest/Properties/AssemblyInfo.cs b/AvatarCloneTest/Properties/AssemblyInfo.cs similarity index 96% rename from .Deprecated/AvatarCloneTest/Properties/AssemblyInfo.cs rename to AvatarCloneTest/Properties/AssemblyInfo.cs index 84f8de2..3334b28 100644 --- a/.Deprecated/AvatarCloneTest/Properties/AssemblyInfo.cs +++ b/AvatarCloneTest/Properties/AssemblyInfo.cs @@ -27,6 +27,6 @@ using System.Reflection; namespace NAK.AvatarCloneTest.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.3"; + public const string Version = "1.0.0"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/.Deprecated/AvatarCloneTest/README.md b/AvatarCloneTest/README.md similarity index 100% rename from .Deprecated/AvatarCloneTest/README.md rename to AvatarCloneTest/README.md diff --git a/.Deprecated/AvatarCloneTest/format.json b/AvatarCloneTest/format.json similarity index 100% rename from .Deprecated/AvatarCloneTest/format.json rename to AvatarCloneTest/format.json diff --git a/AvatarQueueSystemTweaks/Properties/AssemblyInfo.cs b/AvatarQueueSystemTweaks/Properties/AssemblyInfo.cs index 821459b..1273c2c 100644 --- a/AvatarQueueSystemTweaks/Properties/AssemblyInfo.cs +++ b/AvatarQueueSystemTweaks/Properties/AssemblyInfo.cs @@ -27,6 +27,6 @@ using System.Reflection; namespace NAK.AvatarQueueSystemTweaks.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.1"; + public const string Version = "1.0.0"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/AvatarQueueSystemTweaks/format.json b/AvatarQueueSystemTweaks/format.json index 84dadfc..bb6a269 100644 --- a/AvatarQueueSystemTweaks/format.json +++ b/AvatarQueueSystemTweaks/format.json @@ -1,8 +1,8 @@ { - "_id": 226, + "_id": -1, "name": "AvatarQueueSystemTweaks", - "modversion": "1.0.1", - "gameversion": "2025r179", + "modversion": "1.0.0", + "gameversion": "2024r175", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", @@ -17,8 +17,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/AvatarQueueSystemTweaks.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r36/AvatarQueueSystemTweaks.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/AvatarQueueSystemTweaks/", - "changelog": "- Recompiled for 2025r179", + "changelog": "- Initial Release", "embedcolor": "#f61963" } \ No newline at end of file diff --git a/.Deprecated/AvatarScaleMod/AvatarScaleMod.csproj b/AvatarScaleMod/AvatarScaleMod.csproj similarity index 100% rename from .Deprecated/AvatarScaleMod/AvatarScaleMod.csproj rename to AvatarScaleMod/AvatarScaleMod.csproj diff --git a/.Deprecated/AvatarScaleMod/AvatarScaling/AvatarScaleManager.cs b/AvatarScaleMod/AvatarScaling/AvatarScaleManager.cs similarity index 99% rename from .Deprecated/AvatarScaleMod/AvatarScaling/AvatarScaleManager.cs rename to AvatarScaleMod/AvatarScaling/AvatarScaleManager.cs index f3c1da4..38d6a9a 100644 --- a/.Deprecated/AvatarScaleMod/AvatarScaling/AvatarScaleManager.cs +++ b/AvatarScaleMod/AvatarScaling/AvatarScaleManager.cs @@ -211,7 +211,7 @@ public class AvatarScaleManager : MonoBehaviour public float GetHeight() { if (_localAvatarScaler == null) - return PlayerAvatarPoint.DefaultAvatarHeight; + return PlayerAvatarPoint.defaultAvatarHeight; if (!_localAvatarScaler.IsForcingHeight()) return PlayerSetup.Instance.GetAvatarHeight(); @@ -222,7 +222,7 @@ public class AvatarScaleManager : MonoBehaviour public float GetAnimationClipHeight() { if (_localAvatarScaler == null) - return PlayerAvatarPoint.DefaultAvatarHeight; + return PlayerAvatarPoint.defaultAvatarHeight; if (!_localAvatarScaler.IsForcingHeight()) return PlayerSetup.Instance.GetAvatarHeight(); diff --git a/.Deprecated/AvatarScaleMod/AvatarScaling/Components/BaseScaler.cs b/AvatarScaleMod/AvatarScaling/Components/BaseScaler.cs similarity index 100% rename from .Deprecated/AvatarScaleMod/AvatarScaling/Components/BaseScaler.cs rename to AvatarScaleMod/AvatarScaling/Components/BaseScaler.cs diff --git a/.Deprecated/AvatarScaleMod/AvatarScaling/Components/LocalScaler.cs b/AvatarScaleMod/AvatarScaling/Components/LocalScaler.cs similarity index 94% rename from .Deprecated/AvatarScaleMod/AvatarScaling/Components/LocalScaler.cs rename to AvatarScaleMod/AvatarScaling/Components/LocalScaler.cs index 7a076d8..e6d79f4 100644 --- a/.Deprecated/AvatarScaleMod/AvatarScaling/Components/LocalScaler.cs +++ b/AvatarScaleMod/AvatarScaling/Components/LocalScaler.cs @@ -1,5 +1,4 @@ -using ABI_RC.Core; -using ABI_RC.Core.Player; +using ABI_RC.Core.Player; using ABI_RC.Core.UI; using NAK.AvatarScaleMod.AvatarScaling; using UnityEngine; @@ -73,7 +72,7 @@ public class LocalScaler : BaseScaler } // animation scale changed, record it! - Vector3 scaleDifference = CVRTools.DivideVectors(localScale - _initialScale, _initialScale); + Vector3 scaleDifference = PlayerSetup.DivideVectors(localScale - _initialScale, _initialScale); _animatedScaleFactor = scaleDifference.y; _animatedHeight = (_initialHeight * _animatedScaleFactor) + _initialHeight; _animatedScale = localScale; diff --git a/.Deprecated/AvatarScaleMod/AvatarScaling/Components/NetworkScaler.cs b/AvatarScaleMod/AvatarScaling/Components/NetworkScaler.cs similarity index 100% rename from .Deprecated/AvatarScaleMod/AvatarScaling/Components/NetworkScaler.cs rename to AvatarScaleMod/AvatarScaling/Components/NetworkScaler.cs diff --git a/.Deprecated/AvatarScaleMod/AvatarScaling/Events/AvatarScaleEvents.cs b/AvatarScaleMod/AvatarScaling/Events/AvatarScaleEvents.cs similarity index 100% rename from .Deprecated/AvatarScaleMod/AvatarScaling/Events/AvatarScaleEvents.cs rename to AvatarScaleMod/AvatarScaling/Events/AvatarScaleEvents.cs diff --git a/.Deprecated/AvatarScaleMod/AvatarScaling/ScaledComponents.cs b/AvatarScaleMod/AvatarScaling/ScaledComponents.cs similarity index 100% rename from .Deprecated/AvatarScaleMod/AvatarScaling/ScaledComponents.cs rename to AvatarScaleMod/AvatarScaling/ScaledComponents.cs diff --git a/.Deprecated/AvatarScaleMod/HarmonyPatches.cs b/AvatarScaleMod/HarmonyPatches.cs similarity index 100% rename from .Deprecated/AvatarScaleMod/HarmonyPatches.cs rename to AvatarScaleMod/HarmonyPatches.cs diff --git a/.Deprecated/AvatarScaleMod/Input/DebugKeybinds.cs b/AvatarScaleMod/Input/DebugKeybinds.cs similarity index 100% rename from .Deprecated/AvatarScaleMod/Input/DebugKeybinds.cs rename to AvatarScaleMod/Input/DebugKeybinds.cs diff --git a/.Deprecated/AvatarScaleMod/Input/ScaleReconizer.cs b/AvatarScaleMod/Input/ScaleReconizer.cs similarity index 100% rename from .Deprecated/AvatarScaleMod/Input/ScaleReconizer.cs rename to AvatarScaleMod/Input/ScaleReconizer.cs diff --git a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon.cs b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon.cs similarity index 71% rename from .Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon.cs rename to AvatarScaleMod/Integrations/BTKUI/BtkUiAddon.cs index acf9fab..09a5ff4 100644 --- a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon.cs +++ b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon.cs @@ -3,32 +3,32 @@ using BTKUILib; using BTKUILib.UIObjects; using NAK.AvatarScaleMod.AvatarScaling; -namespace NAK.AvatarScaleMod.Integrations; - -public static partial class BtkUiAddon +namespace NAK.AvatarScaleMod.Integrations { - private static Page _asmRootPage; - private static string _rootPageElementID; - - public static void Initialize() + public static partial class BtkUiAddon { + private static Page _asmRootPage; + private static string _rootPageElementID; + + public static void Initialize() + { Prepare_Icons(); Setup_AvatarScaleModTab(); Setup_PlayerSelectPage(); } - #region Initialization + #region Initialization - private static void Prepare_Icons() - { + private static void Prepare_Icons() + { QuickMenuAPI.PrepareIcon(ModSettings.ModName, "ASM_Icon_AvatarHeightConfig", GetIconStream("ASM_Icon_AvatarHeightConfig.png")); QuickMenuAPI.PrepareIcon(ModSettings.ModName, "ASM_Icon_AvatarHeightCopy", GetIconStream("ASM_Icon_AvatarHeightCopy.png")); } - private static void Setup_AvatarScaleModTab() - { + private static void Setup_AvatarScaleModTab() + { _asmRootPage = new Page(ModSettings.ModName, ModSettings.ASM_SettingsCategory, true, "ASM_Icon_AvatarHeightConfig") { MenuTitle = ModSettings.ASM_SettingsCategory, @@ -54,18 +54,18 @@ public static partial class BtkUiAddon Setup_DebugOptionsCategory(_asmRootPage); } - #endregion + #endregion - #region Player Count Display + #region Player Count Display - private static void OnWorldLeave() - => UpdatePlayerCountDisplay(); + private static void OnWorldLeave() + => UpdatePlayerCountDisplay(); - private static void OnUserJoinLeave(CVRPlayerEntity _) - => UpdatePlayerCountDisplay(); + private static void OnUserJoinLeave(CVRPlayerEntity _) + => UpdatePlayerCountDisplay(); - private static void UpdatePlayerCountDisplay() - { + private static void UpdatePlayerCountDisplay() + { if (_asmRootPage == null) return; @@ -74,14 +74,14 @@ public static partial class BtkUiAddon _asmRootPage.MenuSubtitle = $"Everything Avatar Scaling! :: ({modUserCount}/{playerCount} players using ASM)"; } - #endregion + #endregion - #region Double-Click Reset Height + #region Double-Click Reset Height - private static DateTime lastTime = DateTime.Now; + private static DateTime lastTime = DateTime.Now; - private static void OnTabChange(string newTab, string previousTab) - { + private static void OnTabChange(string newTab, string previousTab) + { if (newTab == _rootPageElementID) { UpdatePlayerCountDisplay(); @@ -95,5 +95,6 @@ public static partial class BtkUiAddon lastTime = DateTime.Now; } - #endregion + #endregion + } } \ No newline at end of file diff --git a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_AvatarScaleMod.cs b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_AvatarScaleMod.cs similarity index 76% rename from .Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_AvatarScaleMod.cs rename to AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_AvatarScaleMod.cs index 9ddc1c2..875668c 100644 --- a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_AvatarScaleMod.cs +++ b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_AvatarScaleMod.cs @@ -1,11 +1,11 @@ using BTKUILib.UIObjects; -namespace NAK.AvatarScaleMod.Integrations; - -public static partial class BtkUiAddon +namespace NAK.AvatarScaleMod.Integrations { - private static void Setup_AvatarScaleModCategory(Page page) + public static partial class BtkUiAddon { + private static void Setup_AvatarScaleModCategory(Page page) + { Category avScaleModCategory = AddMelonCategory(ref page, ModSettings.Hidden_Foldout_ASM_SettingsCategory); AddMelonToggle(ref avScaleModCategory, ModSettings.EntryScaleGestureEnabled); @@ -13,4 +13,5 @@ public static partial class BtkUiAddon AddMelonToggle(ref avScaleModCategory, ModSettings.EntryPersistentHeight); AddMelonToggle(ref avScaleModCategory, ModSettings.EntryPersistThroughRestart); } + } } \ No newline at end of file diff --git a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_AvatarScaleTool.cs b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_AvatarScaleTool.cs similarity index 83% rename from .Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_AvatarScaleTool.cs rename to AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_AvatarScaleTool.cs index d3820df..2eb6c57 100644 --- a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_AvatarScaleTool.cs +++ b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_AvatarScaleTool.cs @@ -1,12 +1,12 @@ using BTKUILib.UIObjects; using BTKUILib.UIObjects.Components; -namespace NAK.AvatarScaleMod.Integrations; - -public static partial class BtkUiAddon +namespace NAK.AvatarScaleMod.Integrations { - private static void Setup_AvatarScaleToolCategory(Page page) + public static partial class BtkUiAddon { + private static void Setup_AvatarScaleToolCategory(Page page) + { Category avScaleToolCategory = AddMelonCategory(ref page, ModSettings.Hidden_Foldout_AST_SettingsCategory); AddMelonStringInput(ref avScaleToolCategory, ModSettings.EntryASTScaleParameter, "icon"); @@ -19,4 +19,5 @@ public static partial class BtkUiAddon ModSettings.EntryASTMaxHeight.ResetToDefault(); }; } + } } \ No newline at end of file diff --git a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_DebugOptions.cs b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_DebugOptions.cs similarity index 71% rename from .Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_DebugOptions.cs rename to AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_DebugOptions.cs index 088aafd..b05dd94 100644 --- a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_DebugOptions.cs +++ b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_DebugOptions.cs @@ -1,15 +1,16 @@ using BTKUILib.UIObjects; -namespace NAK.AvatarScaleMod.Integrations; - -public static partial class BtkUiAddon +namespace NAK.AvatarScaleMod.Integrations { - private static void Setup_DebugOptionsCategory(Page page) + public static partial class BtkUiAddon { + private static void Setup_DebugOptionsCategory(Page page) + { Category debugCategory = AddMelonCategory(ref page, ModSettings.Hidden_Foldout_DEBUG_SettingsCategory); AddMelonToggle(ref debugCategory, ModSettings.Debug_NetworkInbound); AddMelonToggle(ref debugCategory, ModSettings.Debug_NetworkOutbound); AddMelonToggle(ref debugCategory, ModSettings.Debug_ComponentSearchTime); } + } } \ No newline at end of file diff --git a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_UniversalScalingSettings.cs b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_UniversalScalingSettings.cs similarity index 83% rename from .Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_UniversalScalingSettings.cs rename to AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_UniversalScalingSettings.cs index 1437582..216fa48 100644 --- a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_UniversalScalingSettings.cs +++ b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_CAT_UniversalScalingSettings.cs @@ -4,14 +4,14 @@ using BTKUILib.UIObjects.Components; using NAK.AvatarScaleMod.AvatarScaling; using System.Collections.Generic; // Added for list support -namespace NAK.AvatarScaleMod.Integrations; - -public static partial class BtkUiAddon +namespace NAK.AvatarScaleMod.Integrations { - private static readonly List USM_QmUiElements = new(); - - private static void Setup_UniversalScalingSettings(Page page) + public static partial class BtkUiAddon { + private static readonly List USM_QmUiElements = new(); + + private static void Setup_UniversalScalingSettings(Page page) + { Category uniScalingCategory = AddMelonCategory(ref page, ModSettings.Hidden_Foldout_USM_SettingsCategory); SliderFloat scaleSlider = AddMelonSlider(ref uniScalingCategory, ModSettings.EntryHiddenAvatarHeight, AvatarScaleManager.DefaultMinHeight, AvatarScaleManager.DefaultMaxHeight); @@ -52,23 +52,24 @@ public static partial class BtkUiAddon ModSettings.EntryUseUniversalScaling.OnEntryValueChanged.Subscribe((_, newValue) => OnUniversalScalingChanged(newValue)); } - private static void OnUniversalScalingChanged(bool value) - { + private static void OnUniversalScalingChanged(bool value) + { foreach (QMUIElement uiElement in USM_QmUiElements) uiElement.Disabled = !value; } - #region Slider Events + #region Slider Events - private static void OnAvatarHeightSliderChanged(float height) - { + private static void OnAvatarHeightSliderChanged(float height) + { AvatarScaleManager.Instance.SetTargetHeight(height); } - private static void OnAvatarHeightSliderReset() - { + private static void OnAvatarHeightSliderReset() + { AvatarScaleManager.Instance.Setting_UniversalScaling = false; } - #endregion + #endregion + } } \ No newline at end of file diff --git a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_PSP_AvatarScaleMod.cs b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_PSP_AvatarScaleMod.cs similarity index 76% rename from .Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_PSP_AvatarScaleMod.cs rename to AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_PSP_AvatarScaleMod.cs index ab54a69..c83796d 100644 --- a/.Deprecated/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_PSP_AvatarScaleMod.cs +++ b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_PSP_AvatarScaleMod.cs @@ -3,15 +3,15 @@ using BTKUILib.UIObjects; using BTKUILib.UIObjects.Components; using NAK.AvatarScaleMod.AvatarScaling; -namespace NAK.AvatarScaleMod.Integrations; - -public static partial class BtkUiAddon +namespace NAK.AvatarScaleMod.Integrations { - private static Button _playerHasModElement; - private static string _selectedPlayer; - - private static void Setup_PlayerSelectPage() + public static partial class BtkUiAddon { + private static Button _playerHasModElement; + private static string _selectedPlayer; + + private static void Setup_PlayerSelectPage() + { QuickMenuAPI.OnPlayerSelected += OnPlayerSelected; Category category = QuickMenuAPI.PlayerSelectPage.AddCategory(ModSettings.ASM_SettingsCategory, ModSettings.ModName); @@ -22,27 +22,27 @@ public static partial class BtkUiAddon button.OnPress += OnCopyPlayerHeight; } - #region QM Events + #region QM Events - private static void OnPlayerSelected(string _, string id) - { + private static void OnPlayerSelected(string _, string id) + { _selectedPlayer = id; UpdatePlayerHasModIcon(); } - private static void OnCopyPlayerHeight() - { + private static void OnCopyPlayerHeight() + { float networkHeight = AvatarScaleManager.Instance.GetNetworkHeight(_selectedPlayer); if (networkHeight < 0) return; AvatarScaleManager.Instance.SetTargetHeight(networkHeight); } - #endregion + #endregion - #region Private Methods + #region Private Methods - private static void UpdatePlayerHasModIcon() - { + private static void UpdatePlayerHasModIcon() + { if (_playerHasModElement == null) return; @@ -60,5 +60,6 @@ public static partial class BtkUiAddon } } - #endregion + #endregion + } } \ No newline at end of file diff --git a/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_Utils.cs b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_Utils.cs new file mode 100644 index 0000000..473dc45 --- /dev/null +++ b/AvatarScaleMod/Integrations/BTKUI/BtkUiAddon_Utils.cs @@ -0,0 +1,78 @@ +using System.Reflection; +using BTKUILib; +using BTKUILib.UIObjects; +using BTKUILib.UIObjects.Components; +using MelonLoader; +using UnityEngine; + +namespace NAK.AvatarScaleMod.Integrations +{ + public static partial class BtkUiAddon + { + #region Melon Preference Helpers + + private static ToggleButton AddMelonToggle(ref Category category, MelonPreferences_Entry entry) + { + ToggleButton toggle = category.AddToggle(entry.DisplayName, entry.Description, entry.Value); + toggle.OnValueUpdated += b => entry.Value = b; + return toggle; + } + + private static SliderFloat AddMelonSlider(ref Category category, MelonPreferences_Entry entry, float min, + float max, int decimalPlaces = 2, bool allowReset = true) + { + SliderFloat slider = category.AddSlider(entry.DisplayName, entry.Description, + Mathf.Clamp(entry.Value, min, max), min, max, decimalPlaces, entry.DefaultValue, allowReset); + slider.OnValueUpdated += f => entry.Value = f; + return slider; + } + + private static Button AddMelonStringInput(ref Category category, MelonPreferences_Entry entry, string buttonIcon = "", ButtonStyle buttonStyle = ButtonStyle.TextOnly) + { + Button button = category.AddButton(entry.DisplayName, buttonIcon, entry.Description, buttonStyle); + button.OnPress += () => QuickMenuAPI.OpenKeyboard(entry.Value, s => entry.Value = s); + return button; + } + + private static Button AddMelonNumberInput(ref Category category, MelonPreferences_Entry entry, string buttonIcon = "", ButtonStyle buttonStyle = ButtonStyle.TextOnly) + { + Button button = category.AddButton(entry.DisplayName, buttonIcon, entry.Description, buttonStyle); + button.OnPress += () => QuickMenuAPI.OpenNumberInput(entry.DisplayName, entry.Value, f => entry.Value = f); + return button; + } + + // private static SliderFloat AddMelonSlider(ref Page page, MelonPreferences_Entry entry, float min, float max, int decimalPlaces = 2, bool allowReset = true) + // { + // SliderFloat slider = page.AddSlider(entry.DisplayName, entry.Description, Mathf.Clamp(entry.Value, min, max), min, max, decimalPlaces, entry.DefaultValue, allowReset); + // slider.OnValueUpdated += f => entry.Value = f; + // return slider; + // } + + /// + /// Helper method to create a category that saves its collapsed state to a MelonPreferences entry. + /// + /// + /// + /// + /// + private static Category AddMelonCategory(ref Page page, MelonPreferences_Entry entry, bool showHeader = true) + { + Category category = page.AddCategory(entry.DisplayName, showHeader, true, entry.Value); + category.OnCollapse += b => entry.Value = b; + return category; + } + + #endregion + + #region Icon Utils + + private static Stream GetIconStream(string iconName) + { + Assembly assembly = Assembly.GetExecutingAssembly(); + string assemblyName = assembly.GetName().Name; + return assembly.GetManifestResourceStream($"{assemblyName}.resources.{iconName}"); + } + + #endregion + } +} \ No newline at end of file diff --git a/.Deprecated/AvatarScaleMod/Main.cs b/AvatarScaleMod/Main.cs similarity index 100% rename from .Deprecated/AvatarScaleMod/Main.cs rename to AvatarScaleMod/Main.cs diff --git a/.Deprecated/AvatarScaleMod/ModSettings.cs b/AvatarScaleMod/ModSettings.cs similarity index 100% rename from .Deprecated/AvatarScaleMod/ModSettings.cs rename to AvatarScaleMod/ModSettings.cs diff --git a/.Deprecated/AvatarScaleMod/Networking/ModNetwork.cs b/AvatarScaleMod/Networking/ModNetwork.cs similarity index 100% rename from .Deprecated/AvatarScaleMod/Networking/ModNetwork.cs rename to AvatarScaleMod/Networking/ModNetwork.cs diff --git a/.Deprecated/AvatarScaleMod/Properties/AssemblyInfo.cs b/AvatarScaleMod/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/AvatarScaleMod/Properties/AssemblyInfo.cs rename to AvatarScaleMod/Properties/AssemblyInfo.cs diff --git a/.Deprecated/AvatarScaleMod/README.md b/AvatarScaleMod/README.md similarity index 100% rename from .Deprecated/AvatarScaleMod/README.md rename to AvatarScaleMod/README.md diff --git a/.Deprecated/AvatarScaleMod/Scripts.cs b/AvatarScaleMod/Scripts.cs similarity index 83% rename from .Deprecated/AvatarScaleMod/Scripts.cs rename to AvatarScaleMod/Scripts.cs index 16d7319..5980b65 100644 --- a/.Deprecated/AvatarScaleMod/Scripts.cs +++ b/AvatarScaleMod/Scripts.cs @@ -3,12 +3,12 @@ using System.IO; using System.Reflection; // https://github.com/SDraw/ml_mods_cvr/blob/master/ml_amt/Scripts.cs -namespace NAK.AvatarScaleMod; - -static class Scripts +namespace NAK.AvatarScaleMod { - public static string GetEmbeddedScript(string p_name) + static class Scripts { + public static string GetEmbeddedScript(string p_name) + { string l_result = ""; Assembly l_assembly = Assembly.GetExecutingAssembly(); string l_assemblyName = l_assembly.GetName().Name; @@ -23,4 +23,5 @@ static class Scripts return l_result; } + } } \ No newline at end of file diff --git a/.Deprecated/InteractionTest/format.json b/AvatarScaleMod/format.json similarity index 100% rename from .Deprecated/InteractionTest/format.json rename to AvatarScaleMod/format.json diff --git a/.Deprecated/AvatarScaleMod/resources/ASM_Icon_AvatarHeightConfig.png b/AvatarScaleMod/resources/ASM_Icon_AvatarHeightConfig.png similarity index 100% rename from .Deprecated/AvatarScaleMod/resources/ASM_Icon_AvatarHeightConfig.png rename to AvatarScaleMod/resources/ASM_Icon_AvatarHeightConfig.png diff --git a/.Deprecated/AvatarScaleMod/resources/ASM_Icon_AvatarHeightCopy.png b/AvatarScaleMod/resources/ASM_Icon_AvatarHeightCopy.png similarity index 100% rename from .Deprecated/AvatarScaleMod/resources/ASM_Icon_AvatarHeightCopy.png rename to AvatarScaleMod/resources/ASM_Icon_AvatarHeightCopy.png diff --git a/.Deprecated/AvatarScaleMod/resources/menu.js b/AvatarScaleMod/resources/menu.js similarity index 100% rename from .Deprecated/AvatarScaleMod/resources/menu.js rename to AvatarScaleMod/resources/menu.js diff --git a/.Deprecated/BullshitWatcher/BullshitWatcher.csproj b/BullshitWatcher/BullshitWatcher.csproj similarity index 100% rename from .Deprecated/BullshitWatcher/BullshitWatcher.csproj rename to BullshitWatcher/BullshitWatcher.csproj diff --git a/.Deprecated/BullshitWatcher/Main.cs b/BullshitWatcher/Main.cs similarity index 100% rename from .Deprecated/BullshitWatcher/Main.cs rename to BullshitWatcher/Main.cs diff --git a/.Deprecated/BullshitWatcher/Properties/AssemblyInfo.cs b/BullshitWatcher/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/BullshitWatcher/Properties/AssemblyInfo.cs rename to BullshitWatcher/Properties/AssemblyInfo.cs diff --git a/.Deprecated/CVRGizmos/CVRGizmoManager.cs b/CVRGizmos/CVRGizmoManager.cs similarity index 76% rename from .Deprecated/CVRGizmos/CVRGizmoManager.cs rename to CVRGizmos/CVRGizmoManager.cs index b1d55b5..fd03eb0 100644 --- a/.Deprecated/CVRGizmos/CVRGizmoManager.cs +++ b/CVRGizmos/CVRGizmoManager.cs @@ -2,18 +2,18 @@ using UnityEngine; using Gizmos = Popcron.Gizmos; -namespace NAK.CVRGizmos; - -public class CVRGizmoManager : MonoBehaviour +namespace NAK.CVRGizmos { - public static CVRGizmoManager Instance; + public class CVRGizmoManager : MonoBehaviour + { + public static CVRGizmoManager Instance; - public bool g_enabled = false; - public bool g_localOnly = false; + public bool g_enabled = false; + public bool g_localOnly = false; - public MonoBehaviour[] managed; + public MonoBehaviour[] managed; - public System.Type[] GizmoTypes = { + public System.Type[] GizmoTypes = { typeof(CVRGizmos_Pointer), typeof(CVRGizmos_AdvancedAvatarSettingsTrigger), typeof(CVRGizmos_SpawnableTrigger), @@ -30,8 +30,8 @@ public class CVRGizmoManager : MonoBehaviour typeof(CVRGizmos_CapsuleCollider), }; - private void Start() - { + private void Start() + { CVRGizmoManager.Instance = this; managed = new MonoBehaviour[GizmoTypes.Count()]; for (int i = 0; i < GizmoTypes.Count(); i++) @@ -40,8 +40,8 @@ public class CVRGizmoManager : MonoBehaviour } } - public void EnableGizmos(bool able) - { + public void EnableGizmos(bool able) + { for (int i = 0; i < GizmoTypes.Count(); i++) { managed[i].enabled = able; @@ -50,11 +50,12 @@ public class CVRGizmoManager : MonoBehaviour RefreshGizmos(); } - public void RefreshGizmos() - { + public void RefreshGizmos() + { for (int i = 0; i < GizmoTypes.Count(); i++) { managed[i].Invoke("CacheGizmos", 0f); } } + } } \ No newline at end of file diff --git a/.Deprecated/CVRGizmos/CVRGizmos.csproj b/CVRGizmos/CVRGizmos.csproj similarity index 100% rename from .Deprecated/CVRGizmos/CVRGizmos.csproj rename to CVRGizmos/CVRGizmos.csproj diff --git a/.Deprecated/CVRGizmos/GizmoTypes/CVRAdvancedAvatarSettingsPointer.cs b/CVRGizmos/GizmoTypes/CVRAdvancedAvatarSettingsPointer.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/CVRAdvancedAvatarSettingsPointer.cs rename to CVRGizmos/GizmoTypes/CVRAdvancedAvatarSettingsPointer.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/CVRAdvancedAvatarSettingsTrigger.cs b/CVRGizmos/GizmoTypes/CVRAdvancedAvatarSettingsTrigger.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/CVRAdvancedAvatarSettingsTrigger.cs rename to CVRGizmos/GizmoTypes/CVRAdvancedAvatarSettingsTrigger.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/CVRAvatar.cs b/CVRGizmos/GizmoTypes/CVRAvatar.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/CVRAvatar.cs rename to CVRGizmos/GizmoTypes/CVRAvatar.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/CVRAvatarPickupMarker.cs b/CVRGizmos/GizmoTypes/CVRAvatarPickupMarker.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/CVRAvatarPickupMarker.cs rename to CVRGizmos/GizmoTypes/CVRAvatarPickupMarker.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/CVRDistanceConstrain.cs b/CVRGizmos/GizmoTypes/CVRDistanceConstrain.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/CVRDistanceConstrain.cs rename to CVRGizmos/GizmoTypes/CVRDistanceConstrain.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/CVRDistanceLod.cs b/CVRGizmos/GizmoTypes/CVRDistanceLod.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/CVRDistanceLod.cs rename to CVRGizmos/GizmoTypes/CVRDistanceLod.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/CVRGizmoBase.cs b/CVRGizmos/GizmoTypes/CVRGizmoBase.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/CVRGizmoBase.cs rename to CVRGizmos/GizmoTypes/CVRGizmoBase.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/CVRHapticAreaChest.cs b/CVRGizmos/GizmoTypes/CVRHapticAreaChest.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/CVRHapticAreaChest.cs rename to CVRGizmos/GizmoTypes/CVRHapticAreaChest.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/CVRHapticZone.cs b/CVRGizmos/GizmoTypes/CVRHapticZone.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/CVRHapticZone.cs rename to CVRGizmos/GizmoTypes/CVRHapticZone.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/CVRPointer.cs b/CVRGizmos/GizmoTypes/CVRPointer.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/CVRPointer.cs rename to CVRGizmos/GizmoTypes/CVRPointer.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/CVRSpawnableTrigger.cs b/CVRGizmos/GizmoTypes/CVRSpawnableTrigger.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/CVRSpawnableTrigger.cs rename to CVRGizmos/GizmoTypes/CVRSpawnableTrigger.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/CVRToggleStateTrigger.cs b/CVRGizmos/GizmoTypes/CVRToggleStateTrigger.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/CVRToggleStateTrigger.cs rename to CVRGizmos/GizmoTypes/CVRToggleStateTrigger.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/Unity_BoxCollider.cs b/CVRGizmos/GizmoTypes/Unity_BoxCollider.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/Unity_BoxCollider.cs rename to CVRGizmos/GizmoTypes/Unity_BoxCollider.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/Unity_CapsuleCollider.cs b/CVRGizmos/GizmoTypes/Unity_CapsuleCollider.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/Unity_CapsuleCollider.cs rename to CVRGizmos/GizmoTypes/Unity_CapsuleCollider.cs diff --git a/.Deprecated/CVRGizmos/GizmoTypes/Unity_SphereCollider.cs b/CVRGizmos/GizmoTypes/Unity_SphereCollider.cs similarity index 100% rename from .Deprecated/CVRGizmos/GizmoTypes/Unity_SphereCollider.cs rename to CVRGizmos/GizmoTypes/Unity_SphereCollider.cs diff --git a/.Deprecated/CVRGizmos/Main.cs b/CVRGizmos/Main.cs similarity index 100% rename from .Deprecated/CVRGizmos/Main.cs rename to CVRGizmos/Main.cs diff --git a/CVRGizmos/Popcron.Gizmos/Constants.cs b/CVRGizmos/Popcron.Gizmos/Constants.cs new file mode 100644 index 0000000..e5884c9 --- /dev/null +++ b/CVRGizmos/Popcron.Gizmos/Constants.cs @@ -0,0 +1,8 @@ +namespace Popcron +{ + public class Constants + { + public const string UniqueIdentifier = "Popcron.Gizmos"; + public const string EnabledKey = UniqueIdentifier + ".Enabled"; + } +} \ No newline at end of file diff --git a/.Deprecated/CVRGizmos/Popcron.Gizmos/Drawer.cs b/CVRGizmos/Popcron.Gizmos/Drawer.cs similarity index 86% rename from .Deprecated/CVRGizmos/Popcron.Gizmos/Drawer.cs rename to CVRGizmos/Popcron.Gizmos/Drawer.cs index 729445f..8e42ae8 100644 --- a/.Deprecated/CVRGizmos/Popcron.Gizmos/Drawer.cs +++ b/CVRGizmos/Popcron.Gizmos/Drawer.cs @@ -1,21 +1,21 @@ using System.Reflection; using UnityEngine; -namespace Popcron; - -public abstract class Drawer +namespace Popcron { - private static Dictionary typeToDrawer = null; - - public abstract int Draw(ref Vector3[] buffer, params object[] args); - - public Drawer() + public abstract class Drawer { + private static Dictionary typeToDrawer = null; + + public abstract int Draw(ref Vector3[] buffer, params object[] args); + + public Drawer() + { } - public static Drawer Get() where T : class - { + public static Drawer Get() where T : class + { //find all drawers if (typeToDrawer == null) { @@ -64,4 +64,5 @@ public abstract class Drawer return null; } } -} \ No newline at end of file + } +} diff --git a/.Deprecated/CVRGizmos/Popcron.Gizmos/Drawers/CubeDrawer.cs b/CVRGizmos/Popcron.Gizmos/Drawers/CubeDrawer.cs similarity index 93% rename from .Deprecated/CVRGizmos/Popcron.Gizmos/Drawers/CubeDrawer.cs rename to CVRGizmos/Popcron.Gizmos/Drawers/CubeDrawer.cs index 78ab2bf..478a0b6 100644 --- a/.Deprecated/CVRGizmos/Popcron.Gizmos/Drawers/CubeDrawer.cs +++ b/CVRGizmos/Popcron.Gizmos/Drawers/CubeDrawer.cs @@ -1,16 +1,16 @@ using UnityEngine; -namespace Popcron; - -public class CubeDrawer : Drawer +namespace Popcron { - public CubeDrawer() + public class CubeDrawer : Drawer { + public CubeDrawer() + { } - public override int Draw(ref Vector3[] buffer, params object[] values) - { + public override int Draw(ref Vector3[] buffer, params object[] values) + { Vector3 position = (Vector3)values[0]; Quaternion rotation = (Quaternion)values[1]; Vector3 size = (Vector3)values[2]; @@ -92,4 +92,5 @@ public class CubeDrawer : Drawer return 24; } -} \ No newline at end of file + } +} diff --git a/CVRGizmos/Popcron.Gizmos/Drawers/LineDrawer.cs b/CVRGizmos/Popcron.Gizmos/Drawers/LineDrawer.cs new file mode 100644 index 0000000..f9193cf --- /dev/null +++ b/CVRGizmos/Popcron.Gizmos/Drawers/LineDrawer.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace Popcron +{ + public class LineDrawer : Drawer + { + public LineDrawer() + { + + } + + public override int Draw(ref Vector3[] buffer, params object[] args) + { + buffer[0] = (Vector3)args[0]; + buffer[1] = (Vector3)args[1]; + return 2; + } + } +} diff --git a/.Deprecated/CVRGizmos/Popcron.Gizmos/Drawers/PolygonDrawer.cs b/CVRGizmos/Popcron.Gizmos/Drawers/PolygonDrawer.cs similarity index 84% rename from .Deprecated/CVRGizmos/Popcron.Gizmos/Drawers/PolygonDrawer.cs rename to CVRGizmos/Popcron.Gizmos/Drawers/PolygonDrawer.cs index ab66d29..ad3b1b2 100644 --- a/.Deprecated/CVRGizmos/Popcron.Gizmos/Drawers/PolygonDrawer.cs +++ b/CVRGizmos/Popcron.Gizmos/Drawers/PolygonDrawer.cs @@ -1,16 +1,16 @@ using UnityEngine; -namespace Popcron; - -public class PolygonDrawer : Drawer +namespace Popcron { - public PolygonDrawer() + public class PolygonDrawer : Drawer { + public PolygonDrawer() + { } - public override int Draw(ref Vector3[] buffer, params object[] values) - { + public override int Draw(ref Vector3[] buffer, params object[] values) + { Vector3 position = (Vector3)values[0]; int points = (int)values[1]; float radius = (float)values[2]; @@ -36,4 +36,5 @@ public class PolygonDrawer : Drawer return points * 2; } -} \ No newline at end of file + } +} diff --git a/.Deprecated/CVRGizmos/Popcron.Gizmos/Drawers/SquareDrawer.cs b/CVRGizmos/Popcron.Gizmos/Drawers/SquareDrawer.cs similarity index 89% rename from .Deprecated/CVRGizmos/Popcron.Gizmos/Drawers/SquareDrawer.cs rename to CVRGizmos/Popcron.Gizmos/Drawers/SquareDrawer.cs index 7b0643d..c46160a 100644 --- a/.Deprecated/CVRGizmos/Popcron.Gizmos/Drawers/SquareDrawer.cs +++ b/CVRGizmos/Popcron.Gizmos/Drawers/SquareDrawer.cs @@ -1,16 +1,16 @@ using UnityEngine; -namespace Popcron; - -public class SquareDrawer : Drawer +namespace Popcron { - public SquareDrawer() + public class SquareDrawer : Drawer { + public SquareDrawer() + { } - public override int Draw(ref Vector3[] buffer, params object[] values) - { + public override int Draw(ref Vector3[] buffer, params object[] values) + { Vector2 position = default; if (values[0] is Vector2 p2) { @@ -68,4 +68,5 @@ public class SquareDrawer : Drawer return 8; } -} \ No newline at end of file + } +} diff --git a/CVRGizmos/Popcron.Gizmos/Element.cs b/CVRGizmos/Popcron.Gizmos/Element.cs new file mode 100644 index 0000000..361fd59 --- /dev/null +++ b/CVRGizmos/Popcron.Gizmos/Element.cs @@ -0,0 +1,12 @@ +using UnityEngine; + +namespace Popcron +{ + internal class Element + { + public Vector3[] points = { }; + public Color color = Color.white; + public bool dashed = false; + public Matrix4x4 matrix = Matrix4x4.identity; + } +} \ No newline at end of file diff --git a/.Deprecated/CVRGizmos/Popcron.Gizmos/Gizmos.cs b/CVRGizmos/Popcron.Gizmos/Gizmos.cs similarity index 52% rename from .Deprecated/CVRGizmos/Popcron.Gizmos/Gizmos.cs rename to CVRGizmos/Popcron.Gizmos/Gizmos.cs index cf86940..a897991 100644 --- a/.Deprecated/CVRGizmos/Popcron.Gizmos/Gizmos.cs +++ b/CVRGizmos/Popcron.Gizmos/Gizmos.cs @@ -1,29 +1,29 @@ using UnityEngine; -namespace Popcron; - -public class Gizmos +namespace Popcron { - private static string _prefsKey = null; - private static int? _bufferSize = null; - private static bool? _enabled = null; - private static float? _dashGap = null; - private static bool? _cull = null; - private static int? _pass = null; - private static Vector3? _offset = null; - - private static Vector3[] buffer = new Vector3[BufferSize]; - - /// - /// By default, it will always render to scene view camera and the main camera. - /// Subscribing to this allows you to whitelist your custom cameras. - /// - public static Func CameraFilter = cam => false; - - private static string PrefsKey + public class Gizmos { - get + private static string _prefsKey = null; + private static int? _bufferSize = null; + private static bool? _enabled = null; + private static float? _dashGap = null; + private static bool? _cull = null; + private static int? _pass = null; + private static Vector3? _offset = null; + + private static Vector3[] buffer = new Vector3[BufferSize]; + + /// + /// By default, it will always render to scene view camera and the main camera. + /// Subscribing to this allows you to whitelist your custom cameras. + /// + public static Func CameraFilter = cam => false; + + private static string PrefsKey { + get + { if (string.IsNullOrEmpty(_prefsKey)) { _prefsKey = $"{SystemInfo.deviceUniqueIdentifier}.{Application.companyName}.{Application.productName}.{Constants.UniqueIdentifier}"; @@ -31,34 +31,34 @@ public class Gizmos return _prefsKey; } - } + } - /// - /// The matrix to use. - /// - public static Matrix4x4 Matrix - { - get => GizmosInstance.Matrix; - set => GizmosInstance.Matrix = value; - } - - /// - /// The matrix to use. - /// - public static Color Color - { - get => GizmosInstance.Color; - set => GizmosInstance.Color = value; - } - - /// - /// The size of the total gizmos buffer. - /// Default is 4096. - /// - public static int BufferSize - { - get + /// + /// The matrix to use. + /// + public static Matrix4x4 Matrix { + get => GizmosInstance.Matrix; + set => GizmosInstance.Matrix = value; + } + + /// + /// The matrix to use. + /// + public static Color Color + { + get => GizmosInstance.Color; + set => GizmosInstance.Color = value; + } + + /// + /// The size of the total gizmos buffer. + /// Default is 4096. + /// + public static int BufferSize + { + get + { if (_bufferSize == null) { _bufferSize = PlayerPrefs.GetInt($"{PrefsKey}.BufferSize", 4096); @@ -66,8 +66,8 @@ public class Gizmos return _bufferSize.Value; } - set - { + set + { value = Mathf.Clamp(value, 0, int.MaxValue); if (_bufferSize != value) { @@ -78,15 +78,15 @@ public class Gizmos buffer = new Vector3[value]; } } - } + } - /// - /// Toggles wether the gizmos could be drawn or not. - /// - public static bool Enabled - { - get + /// + /// Toggles wether the gizmos could be drawn or not. + /// + public static bool Enabled { + get + { if (_enabled == null) { _enabled = PlayerPrefs.GetInt($"{PrefsKey}.Enabled", 1) == 1; @@ -94,24 +94,24 @@ public class Gizmos return _enabled.Value; } - set - { + set + { if (_enabled != value) { _enabled = value; PlayerPrefs.SetInt($"{PrefsKey}.Enabled", value ? 1 : 0); } } - } + } - /// - /// The size of the gap when drawing dashed elements. - /// Default gap size is 0.1 - /// - public static float DashGap - { - get + /// + /// The size of the gap when drawing dashed elements. + /// Default gap size is 0.1 + /// + public static float DashGap { + get + { if (_dashGap == null) { _dashGap = PlayerPrefs.GetFloat($"{PrefsKey}.DashGap", 0.1f); @@ -119,46 +119,46 @@ public class Gizmos return _dashGap.Value; } - set - { + set + { if (_dashGap != value) { _dashGap = value; PlayerPrefs.SetFloat($"{PrefsKey}.DashGap", value); } } - } + } - [Obsolete("This property is obsolete. Use FrustumCulling instead.", false)] - public static bool Cull - { - get + [Obsolete("This property is obsolete. Use FrustumCulling instead.", false)] + public static bool Cull { + get + { return FrustumCulling; } - set - { + set + { FrustumCulling = value; } - } + } - [Obsolete("This property is obsolete. Subscribe to CameraFilter predicate instead and return true for your custom camera.", false)] - public static Camera Camera - { - get => null; - set + [Obsolete("This property is obsolete. Subscribe to CameraFilter predicate instead and return true for your custom camera.", false)] + public static Camera Camera { + get => null; + set + { } - } + } - /// - /// Should the camera not draw elements that are not visible? - /// - public static bool FrustumCulling - { - get + /// + /// Should the camera not draw elements that are not visible? + /// + public static bool FrustumCulling { + get + { if (_cull == null) { _cull = PlayerPrefs.GetInt($"{PrefsKey}.FrustumCulling", 1) == 1; @@ -166,32 +166,32 @@ public class Gizmos return _cull.Value; } - set - { + set + { if (_cull != value) { _cull = value; PlayerPrefs.SetInt($"{PrefsKey}.FrustumCulling", value ? 1 : 0); } } - } + } - /// - /// The material being used to render. - /// - public static Material Material - { - get => GizmosInstance.Material; - set => GizmosInstance.Material = value; - } - - /// - /// Rendering pass to activate. - /// - public static int Pass - { - get + /// + /// The material being used to render. + /// + public static Material Material { + get => GizmosInstance.Material; + set => GizmosInstance.Material = value; + } + + /// + /// Rendering pass to activate. + /// + public static int Pass + { + get + { if (_pass == null) { _pass = PlayerPrefs.GetInt($"{PrefsKey}.Pass", 0); @@ -199,23 +199,23 @@ public class Gizmos return _pass.Value; } - set - { + set + { if (_pass != value) { _pass = value; PlayerPrefs.SetInt($"{PrefsKey}.Pass", value); } } - } + } - /// - /// Global offset for all points. Default is (0, 0, 0). - /// - public static Vector3 Offset - { - get + /// + /// Global offset for all points. Default is (0, 0, 0). + /// + public static Vector3 Offset { + get + { const string Delim = ","; if (_offset == null) { @@ -235,8 +235,8 @@ public class Gizmos return _offset.Value; } - set - { + set + { const string Delim = ","; if (_offset != value) { @@ -244,13 +244,13 @@ public class Gizmos PlayerPrefs.SetString($"{PrefsKey}.Offset", value.x + Delim + value.y + Delim + value.y); } } - } + } - /// - /// Draws an element onto the screen. - /// - public static void Draw(Color? color, bool dashed, params object[] args) where T : Drawer - { + /// + /// Draws an element onto the screen. + /// + public static void Draw(Color? color, bool dashed, params object[] args) where T : Drawer + { if (!Enabled) { return; @@ -268,11 +268,11 @@ public class Gizmos } } - /// - /// Draws an array of lines. Useful for things like paths. - /// - public static void Lines(Vector3[] lines, Color? color = null, bool dashed = false) - { + /// + /// Draws an array of lines. Useful for things like paths. + /// + public static void Lines(Vector3[] lines, Color? color = null, bool dashed = false) + { if (!Enabled) { return; @@ -281,69 +281,69 @@ public class Gizmos GizmosInstance.Submit(lines, color, dashed); } - /// - /// Draw line in world space. - /// - public static void Line(Vector3 a, Vector3 b, Color? color = null, bool dashed = false) - { + /// + /// Draw line in world space. + /// + public static void Line(Vector3 a, Vector3 b, Color? color = null, bool dashed = false) + { Draw(color, dashed, a, b); } - /// - /// Draw square in world space. - /// - public static void Square(Vector2 position, Vector2 size, Color? color = null, bool dashed = false) - { + /// + /// Draw square in world space. + /// + public static void Square(Vector2 position, Vector2 size, Color? color = null, bool dashed = false) + { Square(position, Quaternion.identity, size, color, dashed); } - /// - /// Draw square in world space with float diameter parameter. - /// - public static void Square(Vector2 position, float diameter, Color? color = null, bool dashed = false) - { + /// + /// Draw square in world space with float diameter parameter. + /// + public static void Square(Vector2 position, float diameter, Color? color = null, bool dashed = false) + { Square(position, Quaternion.identity, Vector2.one * diameter, color, dashed); } - /// - /// Draw square in world space with a rotation parameter. - /// - public static void Square(Vector2 position, Quaternion rotation, Vector2 size, Color? color = null, bool dashed = false) - { + /// + /// Draw square in world space with a rotation parameter. + /// + public static void Square(Vector2 position, Quaternion rotation, Vector2 size, Color? color = null, bool dashed = false) + { Draw(color, dashed, position, rotation, size); } - /// - /// Draws a cube in world space. - /// - public static void Cube(Vector3 position, Quaternion rotation, Vector3 size, Color? color = null, bool dashed = false) - { + /// + /// Draws a cube in world space. + /// + public static void Cube(Vector3 position, Quaternion rotation, Vector3 size, Color? color = null, bool dashed = false) + { Draw(color, dashed, position, rotation, size); } - /// - /// Draws a rectangle in screen space. - /// - public static void Rect(Rect rect, Camera camera, Color? color = null, bool dashed = false) - { + /// + /// Draws a rectangle in screen space. + /// + public static void Rect(Rect rect, Camera camera, Color? color = null, bool dashed = false) + { rect.y = Screen.height - rect.y; Vector2 corner = camera.ScreenToWorldPoint(new Vector2(rect.x, rect.y - rect.height)); Draw(color, dashed, corner + rect.size * 0.5f, Quaternion.identity, rect.size); } - /// - /// Draws a representation of a bounding box. - /// - public static void Bounds(Bounds bounds, Color? color = null, bool dashed = false) - { + /// + /// Draws a representation of a bounding box. + /// + public static void Bounds(Bounds bounds, Color? color = null, bool dashed = false) + { Draw(color, dashed, bounds.center, Quaternion.identity, bounds.size); } - /// - /// Draws a cone similar to the one that spot lights draw. - /// - public static void Cone(Vector3 position, Quaternion rotation, float length, float angle, Color? color = null, bool dashed = false, int pointsCount = 16) - { + /// + /// Draws a cone similar to the one that spot lights draw. + /// + public static void Cone(Vector3 position, Quaternion rotation, float length, float angle, Color? color = null, bool dashed = false, int pointsCount = 16) + { //draw the end of the cone float endAngle = Mathf.Tan(angle * 0.5f * Mathf.Deg2Rad) * length; Vector3 forward = rotation * Vector3.forward; @@ -360,33 +360,34 @@ public class Gizmos } } - /// - /// Draws a sphere at position with specified radius. - /// - public static void Sphere(Vector3 position, float radius, Color? color = null, bool dashed = false, int pointsCount = 16) - { + /// + /// Draws a sphere at position with specified radius. + /// + public static void Sphere(Vector3 position, float radius, Color? color = null, bool dashed = false, int pointsCount = 16) + { float offset = 0f; Draw(color, dashed, position, pointsCount, radius, offset, Quaternion.Euler(0f, 0f, 0f)); Draw(color, dashed, position, pointsCount, radius, offset, Quaternion.Euler(90f, 0f, 0f)); Draw(color, dashed, position, pointsCount, radius, offset, Quaternion.Euler(0f, 90f, 90f)); } - /// - /// Draws a circle in world space and billboards towards the camera. - /// - public static void Circle(Vector3 position, float radius, Camera camera, Color? color = null, bool dashed = false, int pointsCount = 16) - { + /// + /// Draws a circle in world space and billboards towards the camera. + /// + public static void Circle(Vector3 position, float radius, Camera camera, Color? color = null, bool dashed = false, int pointsCount = 16) + { float offset = 0f; Quaternion rotation = Quaternion.LookRotation(position - camera.transform.position); Draw(color, dashed, position, pointsCount, radius, offset, rotation); } - /// - /// Draws a circle in world space with a specified rotation. - /// - public static void Circle(Vector3 position, float radius, Quaternion rotation, Color? color = null, bool dashed = false, int pointsCount = 16) - { + /// + /// Draws a circle in world space with a specified rotation. + /// + public static void Circle(Vector3 position, float radius, Quaternion rotation, Color? color = null, bool dashed = false, int pointsCount = 16) + { float offset = 0f; Draw(color, dashed, position, pointsCount, radius, offset, rotation); } -} \ No newline at end of file + } +} diff --git a/.Deprecated/CVRGizmos/Popcron.Gizmos/GizmosInstance.cs b/CVRGizmos/Popcron.Gizmos/GizmosInstance.cs similarity index 100% rename from .Deprecated/CVRGizmos/Popcron.Gizmos/GizmosInstance.cs rename to CVRGizmos/Popcron.Gizmos/GizmosInstance.cs diff --git a/.Deprecated/CVRGizmos/Popcron.Gizmos/LICENSE.md b/CVRGizmos/Popcron.Gizmos/LICENSE.md similarity index 100% rename from .Deprecated/CVRGizmos/Popcron.Gizmos/LICENSE.md rename to CVRGizmos/Popcron.Gizmos/LICENSE.md diff --git a/.Deprecated/CVRGizmos/Properties/AssemblyInfo.cs b/CVRGizmos/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/CVRGizmos/Properties/AssemblyInfo.cs rename to CVRGizmos/Properties/AssemblyInfo.cs diff --git a/.Deprecated/CVRGizmos/format.json b/CVRGizmos/format.json similarity index 100% rename from .Deprecated/CVRGizmos/format.json rename to CVRGizmos/format.json diff --git a/.Experimental/CVRLuaToolsExtension/CVRLuaToolsExtension.csproj b/CVRLuaToolsExtension/CVRLuaToolsExtension.csproj similarity index 100% rename from .Experimental/CVRLuaToolsExtension/CVRLuaToolsExtension.csproj rename to CVRLuaToolsExtension/CVRLuaToolsExtension.csproj diff --git a/.Experimental/CVRLuaToolsExtension/LuaToolsExtension/Base/Singleton.cs b/CVRLuaToolsExtension/LuaToolsExtension/Base/Singleton.cs similarity index 100% rename from .Experimental/CVRLuaToolsExtension/LuaToolsExtension/Base/Singleton.cs rename to CVRLuaToolsExtension/LuaToolsExtension/Base/Singleton.cs diff --git a/.Experimental/CVRLuaToolsExtension/LuaToolsExtension/Extensions/CVRBaseLuaBehaviourExtensions.cs b/CVRLuaToolsExtension/LuaToolsExtension/Extensions/CVRBaseLuaBehaviourExtensions.cs similarity index 100% rename from .Experimental/CVRLuaToolsExtension/LuaToolsExtension/Extensions/CVRBaseLuaBehaviourExtensions.cs rename to CVRLuaToolsExtension/LuaToolsExtension/Extensions/CVRBaseLuaBehaviourExtensions.cs diff --git a/.Experimental/CVRLuaToolsExtension/LuaToolsExtension/Extensions/CVRLuaClientBehaviourExtensions.cs b/CVRLuaToolsExtension/LuaToolsExtension/Extensions/CVRLuaClientBehaviourExtensions.cs similarity index 96% rename from .Experimental/CVRLuaToolsExtension/LuaToolsExtension/Extensions/CVRLuaClientBehaviourExtensions.cs rename to CVRLuaToolsExtension/LuaToolsExtension/Extensions/CVRLuaClientBehaviourExtensions.cs index 8c07542..6f77a61 100644 --- a/.Experimental/CVRLuaToolsExtension/LuaToolsExtension/Extensions/CVRLuaClientBehaviourExtensions.cs +++ b/CVRLuaToolsExtension/LuaToolsExtension/Extensions/CVRLuaClientBehaviourExtensions.cs @@ -2,21 +2,17 @@ using ABI.Scripting.CVRSTL.Client; using System.Diagnostics; using MTJobSystem; -using UnityEngine; namespace NAK.CVRLuaToolsExtension; public static class CVRLuaClientBehaviourExtensions { internal static readonly Dictionary _isRestarting = new(); - private static string PersistentDataPath; #region Public Methods public static void Restart(this CVRLuaClientBehaviour behaviour) { - PersistentDataPath ??= Application.persistentDataPath; // needs to be set on main - if (_isRestarting.TryGetValue(behaviour, out bool isRestarting) && isRestarting) { CVRLuaToolsExtensionMod.Logger.Warning($"Restart is already in progress for {behaviour.ScriptName}."); @@ -109,7 +105,7 @@ public static class CVRLuaClientBehaviourExtensions behaviour.LogInfo("[CVRLuaToolsExtension] Resetting script...\n"); behaviour.script = null; - behaviour.script = LuaScriptFactory.ForLuaBehaviour(behaviour, boundObjectEntries, behaviour.gameObject, behaviour.transform, PersistentDataPath); + behaviour.script = LuaScriptFactory.ForLuaBehaviour(behaviour, boundObjectEntries, behaviour.gameObject, behaviour.transform); behaviour.InitTimerIfNeeded(); // only null if crashed prior behaviour.script.AttachDebugger(behaviour.timer); // reattach the debugger diff --git a/.Experimental/CVRLuaToolsExtension/LuaToolsExtension/LuaHotReloadManager.cs b/CVRLuaToolsExtension/LuaToolsExtension/LuaHotReloadManager.cs similarity index 100% rename from .Experimental/CVRLuaToolsExtension/LuaToolsExtension/LuaHotReloadManager.cs rename to CVRLuaToolsExtension/LuaToolsExtension/LuaHotReloadManager.cs diff --git a/.Experimental/CVRLuaToolsExtension/LuaToolsExtension/NamedPipes/NamedPipeServer.cs b/CVRLuaToolsExtension/LuaToolsExtension/NamedPipes/NamedPipeServer.cs similarity index 100% rename from .Experimental/CVRLuaToolsExtension/LuaToolsExtension/NamedPipes/NamedPipeServer.cs rename to CVRLuaToolsExtension/LuaToolsExtension/NamedPipes/NamedPipeServer.cs diff --git a/.Experimental/CVRLuaToolsExtension/LuaToolsExtension/ScriptInfo.cs b/CVRLuaToolsExtension/LuaToolsExtension/ScriptInfo.cs similarity index 100% rename from .Experimental/CVRLuaToolsExtension/LuaToolsExtension/ScriptInfo.cs rename to CVRLuaToolsExtension/LuaToolsExtension/ScriptInfo.cs diff --git a/.Experimental/CVRLuaToolsExtension/Main.cs b/CVRLuaToolsExtension/Main.cs similarity index 100% rename from .Experimental/CVRLuaToolsExtension/Main.cs rename to CVRLuaToolsExtension/Main.cs diff --git a/.Experimental/CVRLuaToolsExtension/Properties/AssemblyInfo.cs b/CVRLuaToolsExtension/Properties/AssemblyInfo.cs similarity index 100% rename from .Experimental/CVRLuaToolsExtension/Properties/AssemblyInfo.cs rename to CVRLuaToolsExtension/Properties/AssemblyInfo.cs diff --git a/.Experimental/CVRLuaToolsExtension/README.md b/CVRLuaToolsExtension/README.md similarity index 100% rename from .Experimental/CVRLuaToolsExtension/README.md rename to CVRLuaToolsExtension/README.md diff --git a/.Experimental/CVRLuaToolsExtension/format.json b/CVRLuaToolsExtension/format.json similarity index 100% rename from .Experimental/CVRLuaToolsExtension/format.json rename to CVRLuaToolsExtension/format.json diff --git a/.Deprecated/ChatBoxExtensions/ChatBoxExtensions.csproj b/ChatBoxExtensions/ChatBoxExtensions.csproj similarity index 100% rename from .Deprecated/ChatBoxExtensions/ChatBoxExtensions.csproj rename to ChatBoxExtensions/ChatBoxExtensions.csproj diff --git a/.Deprecated/ChatBoxExtensions/HarmonyPatches.cs b/ChatBoxExtensions/HarmonyPatches.cs similarity index 100% rename from .Deprecated/ChatBoxExtensions/HarmonyPatches.cs rename to ChatBoxExtensions/HarmonyPatches.cs diff --git a/.Deprecated/ChatBoxExtensions/InputModules/InputModuleChatBoxExtensions.cs b/ChatBoxExtensions/InputModules/InputModuleChatBoxExtensions.cs similarity index 100% rename from .Deprecated/ChatBoxExtensions/InputModules/InputModuleChatBoxExtensions.cs rename to ChatBoxExtensions/InputModules/InputModuleChatBoxExtensions.cs diff --git a/.Deprecated/ChatBoxExtensions/Integrations/Base.cs b/ChatBoxExtensions/Integrations/Base.cs similarity index 100% rename from .Deprecated/ChatBoxExtensions/Integrations/Base.cs rename to ChatBoxExtensions/Integrations/Base.cs diff --git a/.Deprecated/ChatBoxExtensions/Integrations/ChatBox.cs b/ChatBoxExtensions/Integrations/ChatBox.cs similarity index 100% rename from .Deprecated/ChatBoxExtensions/Integrations/ChatBox.cs rename to ChatBoxExtensions/Integrations/ChatBox.cs diff --git a/.Deprecated/ChatBoxExtensions/Integrations/ChilloutVRAAS.cs b/ChatBoxExtensions/Integrations/ChilloutVRAAS.cs similarity index 100% rename from .Deprecated/ChatBoxExtensions/Integrations/ChilloutVRAAS.cs rename to ChatBoxExtensions/Integrations/ChilloutVRAAS.cs diff --git a/.Deprecated/ChatBoxExtensions/Integrations/ChilloutVRBase.cs b/ChatBoxExtensions/Integrations/ChilloutVRBase.cs similarity index 100% rename from .Deprecated/ChatBoxExtensions/Integrations/ChilloutVRBase.cs rename to ChatBoxExtensions/Integrations/ChilloutVRBase.cs diff --git a/.Deprecated/ChatBoxExtensions/Integrations/ChilloutVRInput.cs b/ChatBoxExtensions/Integrations/ChilloutVRInput.cs similarity index 100% rename from .Deprecated/ChatBoxExtensions/Integrations/ChilloutVRInput.cs rename to ChatBoxExtensions/Integrations/ChilloutVRInput.cs diff --git a/.Deprecated/ChatBoxExtensions/Integrations/Commands.cs b/ChatBoxExtensions/Integrations/Commands.cs similarity index 100% rename from .Deprecated/ChatBoxExtensions/Integrations/Commands.cs rename to ChatBoxExtensions/Integrations/Commands.cs diff --git a/.Deprecated/ChatBoxExtensions/Integrations/PlayerRagdollMod.cs b/ChatBoxExtensions/Integrations/PlayerRagdollMod.cs similarity index 100% rename from .Deprecated/ChatBoxExtensions/Integrations/PlayerRagdollMod.cs rename to ChatBoxExtensions/Integrations/PlayerRagdollMod.cs diff --git a/.Deprecated/ChatBoxExtensions/Main.cs b/ChatBoxExtensions/Main.cs similarity index 100% rename from .Deprecated/ChatBoxExtensions/Main.cs rename to ChatBoxExtensions/Main.cs diff --git a/.Deprecated/ChatBoxExtensions/Properties/AssemblyInfo.cs b/ChatBoxExtensions/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/ChatBoxExtensions/Properties/AssemblyInfo.cs rename to ChatBoxExtensions/Properties/AssemblyInfo.cs diff --git a/.Deprecated/ChatBoxExtensions/format.json b/ChatBoxExtensions/format.json similarity index 100% rename from .Deprecated/ChatBoxExtensions/format.json rename to ChatBoxExtensions/format.json diff --git a/CustomRichPresence/CustomRichPresence.csproj b/CustomRichPresence/CustomRichPresence.csproj deleted file mode 100644 index 4e44ed3..0000000 --- a/CustomRichPresence/CustomRichPresence.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - net48 - - - - ..\.ManagedLibs\TheClapper.dll - - - diff --git a/CustomRichPresence/Main.cs b/CustomRichPresence/Main.cs deleted file mode 100644 index a2702d5..0000000 --- a/CustomRichPresence/Main.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System.Reflection; -using ABI_RC.Core.Networking; -using ABI_RC.Core.Savior; -using ABI_RC.Core.Util.AnimatorManager; -using ABI_RC.Helpers; -using HarmonyLib; -using MagicaCloth; -using MelonLoader; -using Steamworks; -using UnityEngine; - -namespace NAK.CustomRichPresence; - -public class CustomRichPresenceMod : MelonMod -{ - #region Melon Preferences - - private static readonly MelonPreferences_Category Category = - MelonPreferences.CreateCategory(nameof(CustomRichPresence)); - - private static readonly MelonPreferences_Entry EntryUseCustomPresence = - Category.CreateEntry("use_custom_presence", true, - "Use Custom Presence", description: "Uses the custom rich presence setup."); - - // Discord Rich Presence Customization - private static readonly MelonPreferences_Entry DiscordStatusFormat = - Category.CreateEntry("discord_status_format", "Online using {mode}.", - "Discord Status Format", description: "Format for Discord status message. Available variables: {mode}, {instance_name}, {privacy}"); - - private static readonly MelonPreferences_Entry DiscordDetailsFormat = - Category.CreateEntry("discord_details_format", "{instance_name} [{privacy}]", - "Discord Details Format", description: "Format for Discord details. Available variables: {instance_name}, {privacy}, {world_name}, {mission_name}"); - - // Steam Rich Presence Customization - private static readonly MelonPreferences_Entry SteamStatusFormat = - Category.CreateEntry("steam_status_format", "Exploring ({mode}) {instance_name} [{privacy}].", - "Steam Status Format", description: "Format for Steam status. Available variables: {mode}, {instance_name}, {privacy}"); - - private static readonly MelonPreferences_Entry SteamGameStatusFormat = - Category.CreateEntry("steam_game_status_format", "Connected to a server, Privacy: {privacy}.", - "Steam Game Status Format", description: "Format for Steam game status. Available variables: {privacy}, {instance_name}, {world_name}"); - - private static readonly MelonPreferences_Entry SteamDisplayStatus = - Category.CreateEntry("steam_display_status", "#Status_Online", - "Steam Display Status", description: "Steam display status localization key."); - - #endregion Melon Preferences - - public override void OnInitializeMelon() - { - HarmonyInstance.Patch( - typeof(RichPresence).GetMethod(nameof(RichPresence.PopulateLastMessage), - BindingFlags.NonPublic | BindingFlags.Static), - prefix: new HarmonyMethod(typeof(CustomRichPresenceMod).GetMethod(nameof(OnPopulateLastMessage), - BindingFlags.NonPublic | BindingFlags.Static)) - ); - } - - private static string FormatPresenceText(string format, string mode) - { - return format - .Replace("{mode}", mode) - .Replace("{instance_name}", RichPresence.LastMsg.InstanceName) - .Replace("{privacy}", RichPresence.LastMsg.InstancePrivacy) - .Replace("{world_name}", RichPresence.LastMsg.InstanceWorldName) - .Replace("{mission_name}", RichPresence.LastMsg.InstanceMissionName) - .Replace("{current_players}", RichPresence.LastMsg.CurrentPlayers.ToString()) - .Replace("{max_players}", RichPresence.LastMsg.MaxPlayers.ToString()); - } - - private static bool OnPopulateLastMessage() - { - if (!EntryUseCustomPresence.Value) - return true; - - string mode = MetaPort.Instance.isUsingVr ? "VR Mode" : "Desktop Mode"; - - PresenceManager.ClearPresence(); - if (RichPresence.DiscordEnabled) - { - string status = FormatPresenceText(DiscordStatusFormat.Value, mode); - string details = FormatPresenceText(DiscordDetailsFormat.Value, mode); - - PresenceManager.UpdatePresence( - status, - details, - RichPresence.LastConnectedToServer, - 0L, - "discordrp-cvrmain", - null, - null, - null, - RichPresence.LastMsg.InstanceMeshId, - RichPresence.LastMsg.CurrentPlayers, - RichPresence.LastMsg.MaxPlayers - ); - } - - if (!CheckVR.Instance.skipSteamApiRegister && SteamManager.Initialized) - { - SteamFriends.ClearRichPresence(); - if (RichPresence.SteamEnabled) - { - string status = FormatPresenceText(SteamStatusFormat.Value, mode); - string gameStatus = FormatPresenceText(SteamGameStatusFormat.Value, mode); - - SteamFriends.SetRichPresence("status", status); - SteamFriends.SetRichPresence("gamestatus", gameStatus); - SteamFriends.SetRichPresence("steam_display", SteamDisplayStatus.Value); - SteamFriends.SetRichPresence("steam_player_group", RichPresence.LastMsg.InstanceMeshId); - SteamFriends.SetRichPresence("steam_player_group_size", RichPresence.LastMsg.CurrentPlayers.ToString()); - SteamFriends.SetRichPresence("gamemode", RichPresence.LastMsg.InstanceMissionName); - SteamFriends.SetRichPresence("worldname", RichPresence.LastMsg.InstanceWorldName); - SteamFriends.SetRichPresence("instancename", RichPresence.LastMsg.InstanceName); - SteamFriends.SetRichPresence("instanceprivacy", RichPresence.LastMsg.InstancePrivacy); - SteamFriends.SetRichPresence("currentplayer", RichPresence.LastMsg.CurrentPlayers.ToString()); - SteamFriends.SetRichPresence("maxplayer", RichPresence.LastMsg.MaxPlayers.ToString()); - } - } - - return false; - } -} \ No newline at end of file diff --git a/CustomRichPresence/README.md b/CustomRichPresence/README.md deleted file mode 100644 index 33bd3fd..0000000 --- a/CustomRichPresence/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# DropPropTweak - -Gives the Drop Prop button more utility by allowing you to drop props in the air. - ---- - -Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI. -https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games - -> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive. - -> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use. - -> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive. diff --git a/CustomRichPresence/format.json b/CustomRichPresence/format.json deleted file mode 100644 index a599614..0000000 --- a/CustomRichPresence/format.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "_id": -1, - "name": "DropPropTweak", - "modversion": "1.0.0", - "gameversion": "2024r175", - "loaderversion": "0.6.1", - "modtype": "Mod", - "author": "NotAKidoS", - "description": "Gives the Drop Prop button more utility by allowing you to drop props in the air.", - "searchtags": [ - "prop", - "spawn", - "indicator", - "loading" - ], - "requirements": [ - "None" - ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r34/DropPropTweak.dll", - "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/DropPropTweak/", - "changelog": "- Initial Release", - "embedcolor": "#f61963" -} \ No newline at end of file diff --git a/CustomSpawnPoint/Properties/AssemblyInfo.cs b/CustomSpawnPoint/Properties/AssemblyInfo.cs index 3676fa0..480612c 100644 --- a/CustomSpawnPoint/Properties/AssemblyInfo.cs +++ b/CustomSpawnPoint/Properties/AssemblyInfo.cs @@ -27,6 +27,6 @@ using System.Reflection; namespace NAK.CustomSpawnPoint.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.2"; + public const string Version = "1.0.1"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/CustomSpawnPoint/SpawnPointManager.cs b/CustomSpawnPoint/SpawnPointManager.cs index 350d07c..12bcd43 100644 --- a/CustomSpawnPoint/SpawnPointManager.cs +++ b/CustomSpawnPoint/SpawnPointManager.cs @@ -7,38 +7,38 @@ using Object = UnityEngine.Object; using ABI_RC.Core; using Newtonsoft.Json; -namespace NAK.CustomSpawnPoint; - -internal static class SpawnPointManager +namespace NAK.CustomSpawnPoint { - #region Fields - - private static string currentWorldId = string.Empty; - private static SpawnPointData? currentSpawnPoint; - - private static string requestedWorldId = string.Empty; - private static SpawnPointData? requestedSpawnPoint; - - private static Dictionary spawnPoints = new(); - private static readonly string jsonFilePath = Path.Combine("UserData", "customspawnpoints.json"); - - private static GameObject[] customSpawnPointsArray; - private static GameObject[] originalSpawnPointsArray; - - #endregion Fields - - #region Initialization - - internal static void Init() + internal static class SpawnPointManager { + #region Fields + + private static string currentWorldId = string.Empty; + private static SpawnPointData? currentSpawnPoint; + + private static string requestedWorldId = string.Empty; + private static SpawnPointData? requestedSpawnPoint; + + private static Dictionary spawnPoints = new(); + private static readonly string jsonFilePath = Path.Combine("UserData", "customspawnpoints.json"); + + private static GameObject[] customSpawnPointsArray; + private static GameObject[] originalSpawnPointsArray; + + #endregion Fields + + #region Initialization + + internal static void Init() + { LoadSpawnpoints(); CVRGameEventSystem.World.OnLoad.AddListener(OnWorldLoaded); CVRGameEventSystem.World.OnUnload.AddListener(OnWorldUnloaded); MelonLoader.MelonCoroutines.Start(WaitMainMenuUi()); } - private static System.Collections.IEnumerator WaitMainMenuUi() - { + private static System.Collections.IEnumerator WaitMainMenuUi() + { while (ViewManager.Instance == null) yield return null; while (ViewManager.Instance.gameMenuView == null) @@ -65,12 +65,12 @@ internal static class SpawnPointManager customSpawnPointsArray = new[] { customSpawnPointObject }; } - #endregion Initialization + #endregion Initialization - #region Game Events + #region Game Events - private static void OnWorldLoaded(string worldId) - { + private static void OnWorldLoaded(string worldId) + { CVRWorld world = CVRWorld.Instance; if (world == null) return; @@ -90,13 +90,13 @@ internal static class SpawnPointManager } } - private static void OnWorldUnloaded(string worldId) - { + private static void OnWorldUnloaded(string worldId) + { ClearCurrentWorldState(); } - internal static void OnRequestWorldDetailsPage(string worldId) - { + internal static void OnRequestWorldDetailsPage(string worldId) + { //CustomSpawnPointMod.Logger.Msg("Requesting world details page for world: " + worldId); requestedWorldId = worldId; @@ -106,24 +106,24 @@ internal static class SpawnPointManager UpdateMenuButtonState(hasSpawnpoint, worldId == currentWorldId && CVRWorld.Instance != null && CVRWorld.Instance.allowFlying); } - private static void OnClearSpawnpointConfirm(string id, string value, string data) - { + private static void OnClearSpawnpointConfirm(string id, string value, string data) + { if (id != "nak_clear_spawnpoint") return; if (value == "true") ClearSpawnPoint(); } - #endregion Game Events + #endregion Game Events - #region Spawnpoint Management + #region Spawnpoint Management - public static void SetSpawnPoint() - => SetSpawnPointForWorld(currentWorldId); + public static void SetSpawnPoint() + => SetSpawnPointForWorld(currentWorldId); - public static void ClearSpawnPoint() - => ClearSpawnPointForWorld(currentWorldId); + public static void ClearSpawnPoint() + => ClearSpawnPointForWorld(currentWorldId); - private static void SetSpawnPointForWorld(string worldId) - { + private static void SetSpawnPointForWorld(string worldId) + { CustomSpawnPointMod.Logger.Msg("Setting spawn point for world: " + worldId); Vector3 playerPosition = PlayerSetup.Instance.GetPlayerPosition(); @@ -152,8 +152,8 @@ internal static class SpawnPointManager UpdateMenuButtonState(true, worldId == currentWorldId); } - private static void ClearSpawnPointForWorld(string worldId) - { + private static void ClearSpawnPointForWorld(string worldId) + { CustomSpawnPointMod.Logger.Msg("Clearing spawn point for world: " + worldId); if (spawnPoints.ContainsKey(worldId)) @@ -172,29 +172,29 @@ internal static class SpawnPointManager UpdateMenuButtonState(false, worldId == currentWorldId); } - private static void UpdateCustomSpawnPointTransform(SpawnPointData spawnPoint) - { + private static void UpdateCustomSpawnPointTransform(SpawnPointData spawnPoint) + { customSpawnPointsArray[0].transform.SetPositionAndRotation(spawnPoint.Position, Quaternion.Euler(spawnPoint.Rotation)); } - private static void UpdateMenuButtonState(bool hasSpawnpoint, bool isInWorld) - { + private static void UpdateMenuButtonState(bool hasSpawnpoint, bool isInWorld) + { ViewManager.Instance.gameMenuView.View.TriggerEvent("NAKUpdateSpawnpointStatus", hasSpawnpoint.ToString(), isInWorld.ToString()); } - private static void ClearCurrentWorldState() - { + private static void ClearCurrentWorldState() + { currentWorldId = string.Empty; currentSpawnPoint = null; originalSpawnPointsArray = null; } - #endregion Spawnpoint Management + #endregion Spawnpoint Management - #region JSON Management + #region JSON Management - private static void LoadSpawnpoints() - { + private static void LoadSpawnpoints() + { if (File.Exists(jsonFilePath)) { string json = File.ReadAllText(jsonFilePath); @@ -206,18 +206,18 @@ internal static class SpawnPointManager } } - private static void SaveSpawnpoints() - { + private static void SaveSpawnpoints() + { File.WriteAllText(jsonFilePath, JsonConvert.SerializeObject(spawnPoints, Formatting.Indented, new JsonSerializerSettings { ReferenceLoopHandling = ReferenceLoopHandling.Ignore } // death )); } - #endregion JSON Management + #endregion JSON Management - #region Spawnpoint JS + #region Spawnpoint JS - private const string spawnpointJs = @" + private const string spawnpointJs = @" let hasSpawnpointForThisWorld = false; let spawnpointButton = null; @@ -249,16 +249,17 @@ engine.on('NAKUpdateSpawnpointStatus', function (hasSpawnpoint, isInWorld) { }); "; - #endregion Spawnpoint JS -} + #endregion Spawnpoint JS + } -#region Serializable + #region Serializable -[Serializable] -public struct SpawnPointData -{ - public Vector3 Position; - public Vector3 Rotation; -} + [Serializable] + public struct SpawnPointData + { + public Vector3 Position; + public Vector3 Rotation; + } -#endregion Serializable \ No newline at end of file + #endregion Serializable +} \ No newline at end of file diff --git a/CustomSpawnPoint/format.json b/CustomSpawnPoint/format.json index 98f22da..57d83fd 100644 --- a/CustomSpawnPoint/format.json +++ b/CustomSpawnPoint/format.json @@ -1,8 +1,8 @@ { "_id": 228, "name": "CustomSpawnPoint", - "modversion": "1.0.2", - "gameversion": "2025r179", + "modversion": "1.0.1", + "gameversion": "2024r175", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", @@ -17,8 +17,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/CustomSpawnPoint.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r40/CustomSpawnPoint.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/CustomSpawnPoint/", - "changelog": "- Recompiled for 2025r179", + "changelog": "- Removed unneeded logging when opening a World Details page.", "embedcolor": "#f61963" } \ No newline at end of file diff --git a/.Deprecated/DropPropTweak/DropPropTweak.csproj b/DropPropTweak/DropPropTweak.csproj similarity index 100% rename from .Deprecated/DropPropTweak/DropPropTweak.csproj rename to DropPropTweak/DropPropTweak.csproj diff --git a/.Deprecated/DropPropTweak/Main.cs b/DropPropTweak/Main.cs similarity index 99% rename from .Deprecated/DropPropTweak/Main.cs rename to DropPropTweak/Main.cs index b72f652..023ce21 100644 --- a/.Deprecated/DropPropTweak/Main.cs +++ b/DropPropTweak/Main.cs @@ -44,4 +44,6 @@ public class DropPropTweakMod : MelonMod __instance.CharacterController.gravity = ogGravity; // restore gravity return false; } + + } \ No newline at end of file diff --git a/.Deprecated/DropPropTweak/Properties/AssemblyInfo.cs b/DropPropTweak/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/DropPropTweak/Properties/AssemblyInfo.cs rename to DropPropTweak/Properties/AssemblyInfo.cs diff --git a/.Deprecated/DropPropTweak/README.md b/DropPropTweak/README.md similarity index 100% rename from .Deprecated/DropPropTweak/README.md rename to DropPropTweak/README.md diff --git a/.Deprecated/DropPropTweak/format.json b/DropPropTweak/format.json similarity index 100% rename from .Deprecated/DropPropTweak/format.json rename to DropPropTweak/format.json diff --git a/.Deprecated/FOVAdjustment/FOVAdjustment.csproj b/FOVAdjustment/FOVAdjustment.csproj similarity index 100% rename from .Deprecated/FOVAdjustment/FOVAdjustment.csproj rename to FOVAdjustment/FOVAdjustment.csproj diff --git a/.Deprecated/FOVAdjustment/Main.cs b/FOVAdjustment/Main.cs similarity index 94% rename from .Deprecated/FOVAdjustment/Main.cs rename to FOVAdjustment/Main.cs index bafb6ae..a593ab0 100644 --- a/.Deprecated/FOVAdjustment/Main.cs +++ b/FOVAdjustment/Main.cs @@ -55,10 +55,10 @@ public class FOVAdjustment : MelonMod private static void UpdateDesktopCameraControllerFov(float value) { - // if (CVRWorld.Instance != null && Mathf.Approximately(CVRWorld.Instance.fov, 60f)) - // { + if (CVRWorld.Instance != null && Mathf.Approximately(CVRWorld.Instance.fov, 60f)) + { CVR_DesktopCameraController.defaultFov = Mathf.Clamp(value, 60f, 120f); CVR_DesktopCameraController.zoomFov = CVR_DesktopCameraController.defaultFov * 0.5f; - //} + } } } \ No newline at end of file diff --git a/.Deprecated/FOVAdjustment/Properties/AssemblyInfo.cs b/FOVAdjustment/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/FOVAdjustment/Properties/AssemblyInfo.cs rename to FOVAdjustment/Properties/AssemblyInfo.cs diff --git a/.Deprecated/FOVAdjustment/README.md b/FOVAdjustment/README.md similarity index 100% rename from .Deprecated/FOVAdjustment/README.md rename to FOVAdjustment/README.md diff --git a/.Deprecated/FOVAdjustment/format.json b/FOVAdjustment/format.json similarity index 100% rename from .Deprecated/FOVAdjustment/format.json rename to FOVAdjustment/format.json diff --git a/.Deprecated/GestureLock/GestureLock.csproj b/GestureLock/GestureLock.csproj similarity index 100% rename from .Deprecated/GestureLock/GestureLock.csproj rename to GestureLock/GestureLock.csproj diff --git a/.Deprecated/GestureLock/HarmonyPatches.cs b/GestureLock/HarmonyPatches.cs similarity index 100% rename from .Deprecated/GestureLock/HarmonyPatches.cs rename to GestureLock/HarmonyPatches.cs diff --git a/.Deprecated/GestureLock/Main.cs b/GestureLock/Main.cs similarity index 100% rename from .Deprecated/GestureLock/Main.cs rename to GestureLock/Main.cs diff --git a/.Deprecated/GestureLock/Properties/AssemblyInfo.cs b/GestureLock/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/GestureLock/Properties/AssemblyInfo.cs rename to GestureLock/Properties/AssemblyInfo.cs diff --git a/.Deprecated/GestureLock/README.md b/GestureLock/README.md similarity index 100% rename from .Deprecated/GestureLock/README.md rename to GestureLock/README.md diff --git a/.Deprecated/GestureLock/format.json b/GestureLock/format.json similarity index 100% rename from .Deprecated/GestureLock/format.json rename to GestureLock/format.json diff --git a/.Deprecated/IKSimulatedRootAngleFix/IKSimulatedRootAngleFix.csproj b/IKSimulatedRootAngleFix/IKSimulatedRootAngleFix.csproj similarity index 100% rename from .Deprecated/IKSimulatedRootAngleFix/IKSimulatedRootAngleFix.csproj rename to IKSimulatedRootAngleFix/IKSimulatedRootAngleFix.csproj diff --git a/.Deprecated/IKSimulatedRootAngleFix/Main.cs b/IKSimulatedRootAngleFix/Main.cs similarity index 100% rename from .Deprecated/IKSimulatedRootAngleFix/Main.cs rename to IKSimulatedRootAngleFix/Main.cs diff --git a/.Deprecated/IKSimulatedRootAngleFix/Properties/AssemblyInfo.cs b/IKSimulatedRootAngleFix/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/IKSimulatedRootAngleFix/Properties/AssemblyInfo.cs rename to IKSimulatedRootAngleFix/Properties/AssemblyInfo.cs diff --git a/.Deprecated/FuckMagicaCloth2/README.md b/IKSimulatedRootAngleFix/README.md similarity index 100% rename from .Deprecated/FuckMagicaCloth2/README.md rename to IKSimulatedRootAngleFix/README.md diff --git a/.Deprecated/IKSimulatedRootAngleFix/format.json b/IKSimulatedRootAngleFix/format.json similarity index 100% rename from .Deprecated/IKSimulatedRootAngleFix/format.json rename to IKSimulatedRootAngleFix/format.json diff --git a/InteractionTest/Components/InteractionTracker.cs b/InteractionTest/Components/InteractionTracker.cs new file mode 100644 index 0000000..b5ea1b1 --- /dev/null +++ b/InteractionTest/Components/InteractionTracker.cs @@ -0,0 +1,213 @@ +using System.Collections; +using ABI_RC.Core; +using ABI_RC.Systems.GameEventSystem; +using ABI_RC.Systems.IK; +using ABI_RC.Systems.Movement; +using ABI.CCK.Components; +using RootMotion.FinalIK; +using UnityEngine; + +namespace NAK.InteractionTest.Components; + +public class InteractionTracker : MonoBehaviour +{ + #region Setup + + public static void Setup(GameObject parentObject, bool isLeft = true) + { + // LeapMotion: RotationTarget + + GameObject trackerObject = new("NAK.InteractionTracker"); + trackerObject.transform.SetParent(parentObject.transform); + trackerObject.transform.SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity); + + GameObject ikObject = new("NAK.InteractionTracker.IK"); + ikObject.transform.SetParent(trackerObject.transform); + ikObject.transform.SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity); + + SphereCollider sphereCol = trackerObject.AddComponent(); + sphereCol.radius = 0f; + sphereCol.isTrigger = true; + + BetterBetterCharacterController.QueueRemovePlayerCollision(sphereCol); + + InteractionTracker tracker = trackerObject.AddComponent(); + tracker.isLeft = isLeft; + tracker.Initialize(); + } + + #endregion Setup + + #region Actions + + public Action OnPenetrationDetected; // called on start of penetration + public Action OnPenetrationLost; // called on end of penetration + public Action OnPenetrationNormalChanged; // called when penetration normal changes after 2 degree threshold + + #endregion Actions + + public bool isLeft; + + public bool IsColliding => _isColliding; + public Vector3 ClosestPoint { get; private set; } + public Vector3 LastPenetrationNormal => _lastPenetrationNormal; + + private bool _isColliding; + private bool _wasPenetrating; + public Vector3 _lastPenetrationNormal = Vector3.forward; + private Collider _selfCollider; + private const float NormalChangeThreshold = 0.2f; + + #region Unity Events + + private void Initialize() + { + _selfCollider = GetComponent(); + CVRGameEventSystem.Avatar.OnLocalAvatarLoad.AddListener(OnLocalAvatarLoaded); + } + + private void OnDestroy() + { + CVRGameEventSystem.Avatar.OnLocalAvatarLoad.RemoveListener(OnLocalAvatarLoaded); + } + + private void OnLocalAvatarLoaded(CVRAvatar _) + { + StartCoroutine(FrameLateInit()); + } + + private IEnumerator FrameLateInit() + { + yield return null; + yield return null; + OnInitSolver(); + IKSystem.vrik.onPreSolverUpdate.AddListener(OnPreSolverUpdate); + IKSystem.vrik.onPostSolverUpdate.AddListener(OnPostSolverUpdate); + } + + private void OnTriggerStay(Collider other) + { + if (other.gameObject.layer == CVRLayers.PlayerLocal) + return; + + if (_selfCollider == null) + return; + + Transform selfTransform = transform; + Transform otherTransform = other.transform; + + bool isPenetrating = Physics.ComputePenetration( + _selfCollider, selfTransform.position, selfTransform.rotation, + other, otherTransform.position, otherTransform.rotation, + out Vector3 direction, out float distance); + + if (isPenetrating) + { + ClosestPoint = selfTransform.position + direction * distance; + Debug.DrawRay(ClosestPoint, direction * 10, Color.red); + + if (!_wasPenetrating) + { + OnPenetrationDetected?.Invoke(); + _wasPenetrating = true; + _lastPenetrationNormal = direction; + } + + float angleChange = Vector3.Angle(_lastPenetrationNormal, direction); + Debug.Log("Angle change: " + angleChange); + if (angleChange > NormalChangeThreshold) + { + _lastPenetrationNormal = direction; + OnPenetrationNormalChanged?.Invoke(); + } + } + else + { + if (_wasPenetrating) + { + OnPenetrationLost?.Invoke(); + _wasPenetrating = false; + } + } + } + + private void OnTriggerEnter(Collider other) + { + if (other.gameObject.layer == CVRLayers.PlayerLocal) + return; + + Debug.Log("Triggered with " + other.gameObject.name); + _isColliding = true; + } + + private void OnTriggerExit(Collider other) + { + if (other.gameObject.layer == CVRLayers.PlayerLocal) + return; + + Debug.Log("Exited trigger with " + other.gameObject.name); + _isColliding = false; + + if (_wasPenetrating) + { + OnPenetrationLost?.Invoke(); + _wasPenetrating = false; + } + } + + #endregion Unity Events + + private Transform _oldTarget; + + private Vector3 _initialPosOffset; + private Quaternion _initialRotOffset; + + private IKSolverVR.Arm _armSolver; + + private void OnInitSolver() + { + _armSolver = isLeft ? IKSystem.vrik.solver.arms[0] : IKSystem.vrik.solver.arms[1]; + + Transform target = _armSolver.target; + if (target == null) + target = transform.parent.Find("RotationTarget"); // LeapMotion: RotationTarget + + if (target == null) return; + + _initialPosOffset = target.localPosition; + _initialRotOffset = target.localRotation; + } + + private void OnPreSolverUpdate() + { + if (!IsColliding) + return; + + Transform selfTransform = transform; + + float dot = Vector3.Dot(_lastPenetrationNormal, selfTransform.forward); + if (dot > -0.45f) + return; + + _oldTarget = _armSolver.target; + _armSolver.target = selfTransform.GetChild(0); + + _armSolver.target.position = ClosestPoint + selfTransform.rotation * _initialPosOffset; + _armSolver.target.rotation = _initialRotOffset * Quaternion.LookRotation(-_lastPenetrationNormal, selfTransform.up); + + _armSolver.positionWeight = 1f; + _armSolver.rotationWeight = 1f; + } + + private void OnPostSolverUpdate() + { + if (!_oldTarget) + return; + + _armSolver.target = _oldTarget; + _oldTarget = null; + + _armSolver.positionWeight = 0f; + _armSolver.rotationWeight = 0f; + } +} \ No newline at end of file diff --git a/.Deprecated/SuperAwesomeMod/SuperAwesomeMod.csproj b/InteractionTest/InteractionTest.csproj similarity index 52% rename from .Deprecated/SuperAwesomeMod/SuperAwesomeMod.csproj rename to InteractionTest/InteractionTest.csproj index fa113da..1b7a95f 100644 --- a/.Deprecated/SuperAwesomeMod/SuperAwesomeMod.csproj +++ b/InteractionTest/InteractionTest.csproj @@ -1,12 +1,13 @@ - - ASTExtension - ..\.ManagedLibs\BTKUILib.dll - False + + + + + diff --git a/InteractionTest/Main.cs b/InteractionTest/Main.cs new file mode 100644 index 0000000..a88cbfd --- /dev/null +++ b/InteractionTest/Main.cs @@ -0,0 +1,36 @@ +using MelonLoader; + +namespace NAK.InteractionTest; + +public class InteractionTestMod : MelonMod +{ + internal static MelonLogger.Instance Logger; + + #region Melon Mod Overrides + + public override void OnInitializeMelon() + { + Logger = LoggerInstance; + + ApplyPatches(typeof(Patches.ControllerRayPatches)); + } + + #endregion Melon Mod Overrides + + #region Melon Mod Utilities + + private void ApplyPatches(Type type) + { + try + { + HarmonyInstance.PatchAll(type); + } + catch (Exception e) + { + LoggerInstance.Msg($"Failed while patching {type.Name}!"); + LoggerInstance.Error(e); + } + } + + #endregion Melon Mod Utilities +} diff --git a/InteractionTest/ModSettings.cs b/InteractionTest/ModSettings.cs new file mode 100644 index 0000000..010f81b --- /dev/null +++ b/InteractionTest/ModSettings.cs @@ -0,0 +1,7 @@ +using MelonLoader; + +namespace NAK.InteractionTest; + +internal static class ModSettings +{ +} \ No newline at end of file diff --git a/InteractionTest/Patches.cs b/InteractionTest/Patches.cs new file mode 100644 index 0000000..1fa65fd --- /dev/null +++ b/InteractionTest/Patches.cs @@ -0,0 +1,17 @@ + +using ABI_RC.Core; +using ABI_RC.Core.InteractionSystem; +using HarmonyLib; +using NAK.InteractionTest.Components; + +namespace NAK.InteractionTest.Patches; + +internal static class ControllerRayPatches +{ + [HarmonyPostfix] + [HarmonyPatch(typeof(ControllerRay), nameof(ControllerRay.Start))] + private static void Postfix_BetterCharacterController_Start(ref ControllerRay __instance) + { + InteractionTracker.Setup(__instance.gameObject, __instance.hand == CVRHand.Left); + } +} \ No newline at end of file diff --git a/CustomRichPresence/Properties/AssemblyInfo.cs b/InteractionTest/Properties/AssemblyInfo.cs similarity index 65% rename from CustomRichPresence/Properties/AssemblyInfo.cs rename to InteractionTest/Properties/AssemblyInfo.cs index 0e00c7b..ffc8f5e 100644 --- a/CustomRichPresence/Properties/AssemblyInfo.cs +++ b/InteractionTest/Properties/AssemblyInfo.cs @@ -1,30 +1,30 @@ -using NAK.CustomRichPresence.Properties; +using NAK.InteractionTest.Properties; using MelonLoader; using System.Reflection; [assembly: AssemblyVersion(AssemblyInfoParams.Version)] [assembly: AssemblyFileVersion(AssemblyInfoParams.Version)] [assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyTitle(nameof(NAK.CustomRichPresence))] +[assembly: AssemblyTitle(nameof(NAK.InteractionTest))] [assembly: AssemblyCompany(AssemblyInfoParams.Author)] -[assembly: AssemblyProduct(nameof(NAK.CustomRichPresence))] +[assembly: AssemblyProduct(nameof(NAK.InteractionTest))] [assembly: MelonInfo( - typeof(NAK.CustomRichPresence.CustomRichPresenceMod), - nameof(NAK.CustomRichPresence), + typeof(NAK.InteractionTest.InteractionTestMod), + nameof(NAK.InteractionTest), AssemblyInfoParams.Version, AssemblyInfoParams.Author, - downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/CustomRichPresence" + downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/InteractionTest" )] [assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] [assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] [assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] -[assembly: MelonColor(255, 246, 25, 99)] // red-pink -[assembly: MelonAuthorColor(255, 158, 21, 32)] // red +[assembly: MelonColor(255, 125, 126, 129)] +[assembly: MelonAuthorColor(255, 158, 21, 32)] [assembly: HarmonyDontPatchAll] -namespace NAK.CustomRichPresence.Properties; +namespace NAK.InteractionTest.Properties; internal static class AssemblyInfoParams { public const string Version = "1.0.0"; diff --git a/.Experimental/OriginShift/README.md b/InteractionTest/README.md similarity index 100% rename from .Experimental/OriginShift/README.md rename to InteractionTest/README.md diff --git a/.Experimental/OriginShift/format.json b/InteractionTest/format.json similarity index 100% rename from .Experimental/OriginShift/format.json rename to InteractionTest/format.json diff --git a/KeepVelocityOnExitFlight/Properties/AssemblyInfo.cs b/KeepVelocityOnExitFlight/Properties/AssemblyInfo.cs index e51a838..9ad16f8 100644 --- a/KeepVelocityOnExitFlight/Properties/AssemblyInfo.cs +++ b/KeepVelocityOnExitFlight/Properties/AssemblyInfo.cs @@ -27,6 +27,6 @@ using System.Reflection; namespace NAK.KeepVelocityOnExitFlight.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.1"; + public const string Version = "1.0.0"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/KeepVelocityOnExitFlight/format.json b/KeepVelocityOnExitFlight/format.json index 94d3b8a..ae56509 100644 --- a/KeepVelocityOnExitFlight/format.json +++ b/KeepVelocityOnExitFlight/format.json @@ -1,8 +1,8 @@ { - "_id": 222, + "_id": -1, "name": "KeepVelocityOnExitFlight", - "modversion": "1.0.1", - "gameversion": "2025r179", + "modversion": "1.0.0", + "gameversion": "2024r175", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", @@ -17,8 +17,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/KeepVelocityOnExitFlight.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r34/KeepVelocityOnExitFlight.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/KeepVelocityOnExitFlight/", - "changelog": "- Recompiled for 2025r179", + "changelog": "- Initial release", "embedcolor": "#f61963" } \ No newline at end of file diff --git a/LazyPrune/Properties/AssemblyInfo.cs b/LazyPrune/Properties/AssemblyInfo.cs index 169f34e..48fb1ee 100644 --- a/LazyPrune/Properties/AssemblyInfo.cs +++ b/LazyPrune/Properties/AssemblyInfo.cs @@ -20,13 +20,11 @@ using System.Reflection; [assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] [assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] [assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] -[assembly: MelonColor(255, 246, 25, 99)] // red-pink -[assembly: MelonAuthorColor(255, 158, 21, 32)] // red [assembly: HarmonyDontPatchAll] namespace NAK.LazyPrune.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.3"; + public const string Version = "1.0.2"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/LazyPrune/format.json b/LazyPrune/format.json index 5125073..d954f95 100644 --- a/LazyPrune/format.json +++ b/LazyPrune/format.json @@ -1,8 +1,8 @@ { "_id": 214, "name": "LazyPrune", - "modversion": "1.0.3", - "gameversion": "2025r179", + "modversion": "1.0.2", + "gameversion": "2024r175", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", @@ -17,8 +17,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/LazyPrune.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r32/LazyPrune.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/LazyPrune/", - "changelog": "- Recompiled for 2025r179", + "changelog": "- Fixed killtime check, would needlessly check known non-eligible objects for pruning.\n- Moved away from using GameEventSystem as it proved unreliable for tracking remote Avatar destruction, now patching Object Loader directly as loadedObject is not assigned when object wrappers are enabled.\n- Fixed scheduled prune job being nuked as it was created before initial scene load.\n- Patched two race conditions in the game that would cause the object loader to lock up.", "embedcolor": "#1c75f1" } \ No newline at end of file diff --git a/.Deprecated/LegacyContentMitigation/Components/CameraCallbackLogger.cs b/LegacyContentMitigation/Components/CameraCallbackLogger.cs similarity index 100% rename from .Deprecated/LegacyContentMitigation/Components/CameraCallbackLogger.cs rename to LegacyContentMitigation/Components/CameraCallbackLogger.cs diff --git a/.Deprecated/LegacyContentMitigation/Components/FakeMultiPassHack.cs b/LegacyContentMitigation/Components/FakeMultiPassHack.cs similarity index 100% rename from .Deprecated/LegacyContentMitigation/Components/FakeMultiPassHack.cs rename to LegacyContentMitigation/Components/FakeMultiPassHack.cs diff --git a/.Deprecated/LegacyContentMitigation/Integrations/BtkUiAddon.cs b/LegacyContentMitigation/Integrations/BtkUiAddon.cs similarity index 100% rename from .Deprecated/LegacyContentMitigation/Integrations/BtkUiAddon.cs rename to LegacyContentMitigation/Integrations/BtkUiAddon.cs diff --git a/.Deprecated/LegacyContentMitigation/LegacyContentMitigation.csproj b/LegacyContentMitigation/LegacyContentMitigation.csproj similarity index 100% rename from .Deprecated/LegacyContentMitigation/LegacyContentMitigation.csproj rename to LegacyContentMitigation/LegacyContentMitigation.csproj diff --git a/.Deprecated/LegacyContentMitigation/Main.cs b/LegacyContentMitigation/Main.cs similarity index 100% rename from .Deprecated/LegacyContentMitigation/Main.cs rename to LegacyContentMitigation/Main.cs diff --git a/LegacyContentMitigation/ModSettings.cs b/LegacyContentMitigation/ModSettings.cs new file mode 100644 index 0000000..0fdef02 --- /dev/null +++ b/LegacyContentMitigation/ModSettings.cs @@ -0,0 +1,24 @@ +using MelonLoader; + +namespace NAK.LegacyContentMitigation; + +internal static class ModSettings +{ + #region Constants + + internal const string ModName = nameof(LegacyContentMitigation); + internal const string LCM_SettingsCategory = "Legacy Content Mitigation"; + + #endregion Constants + + #region Melon Preferences + + private static readonly MelonPreferences_Category Category = + MelonPreferences.CreateCategory(ModName); + + internal static readonly MelonPreferences_Entry EntryAutoForLegacyWorlds = + Category.CreateEntry("auto_for_legacy_worlds", true, + "Auto For Legacy Worlds", description: "Should Legacy View be auto enabled for detected Legacy worlds?"); + + #endregion Melon Preferences +} \ No newline at end of file diff --git a/.Deprecated/LegacyContentMitigation/Patches.cs b/LegacyContentMitigation/Patches.cs similarity index 97% rename from .Deprecated/LegacyContentMitigation/Patches.cs rename to LegacyContentMitigation/Patches.cs index a389282..2b151e8 100644 --- a/.Deprecated/LegacyContentMitigation/Patches.cs +++ b/LegacyContentMitigation/Patches.cs @@ -9,7 +9,6 @@ using ABI.CCK.Components; using cohtml; using cohtml.Net; using HarmonyLib; -using LegacyContentMitigation.Components; using UnityEngine; using UnityEngine.Rendering.PostProcessing; using UnityEngine.SceneManagement; @@ -22,9 +21,6 @@ internal static class PlayerSetup_Patches [HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.Start))] private static void Postfix_PlayerSetup_Start(ref PlayerSetup __instance) { - __instance.vrCam.AddComponentIfMissing(); - __instance.desktopCam.AddComponentIfMissing(); - FakeMultiPassHack.Instance = __instance.vrCam.AddComponentIfMissing(); FakeMultiPassHack.Instance.enabled = ModSettings.EntryAutoForLegacyWorlds.Value; } diff --git a/.Deprecated/LegacyContentMitigation/Properties/AssemblyInfo.cs b/LegacyContentMitigation/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/LegacyContentMitigation/Properties/AssemblyInfo.cs rename to LegacyContentMitigation/Properties/AssemblyInfo.cs diff --git a/.Deprecated/LegacyContentMitigation/README.md b/LegacyContentMitigation/README.md similarity index 100% rename from .Deprecated/LegacyContentMitigation/README.md rename to LegacyContentMitigation/README.md diff --git a/.Deprecated/LegacyContentMitigation/format.json b/LegacyContentMitigation/format.json similarity index 96% rename from .Deprecated/LegacyContentMitigation/format.json rename to LegacyContentMitigation/format.json index e801124..480d0fb 100644 --- a/.Deprecated/LegacyContentMitigation/format.json +++ b/LegacyContentMitigation/format.json @@ -1,7 +1,7 @@ { - "_id": 247, + "_id": -1, "name": "LegacyContentMitigation", - "modversion": "1.0.2", + "modversion": "1.0.1", "gameversion": "2024r177", "loaderversion": "0.6.1", "modtype": "Mod", diff --git a/.Experimental/LuaNetworkVariables/LuaNetworkVariables.csproj b/LuaNetworkVariables/LuaNetworkVariables.csproj similarity index 100% rename from .Experimental/LuaNetworkVariables/LuaNetworkVariables.csproj rename to LuaNetworkVariables/LuaNetworkVariables.csproj diff --git a/.Experimental/LuaNetworkVariables/Main.cs b/LuaNetworkVariables/Main.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/Main.cs rename to LuaNetworkVariables/Main.cs diff --git a/.Experimental/LuaNetworkVariables/NetLuaModule.cs b/LuaNetworkVariables/NetLuaModule.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/NetLuaModule.cs rename to LuaNetworkVariables/NetLuaModule.cs diff --git a/.Experimental/LuaNetworkVariables/NetworkVariables/LuaEventContext.cs b/LuaNetworkVariables/NetworkVariables/LuaEventContext.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/NetworkVariables/LuaEventContext.cs rename to LuaNetworkVariables/NetworkVariables/LuaEventContext.cs diff --git a/.Experimental/LuaNetworkVariables/NetworkVariables/LuaEventTracker.cs b/LuaNetworkVariables/NetworkVariables/LuaEventTracker.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/NetworkVariables/LuaEventTracker.cs rename to LuaNetworkVariables/NetworkVariables/LuaEventTracker.cs diff --git a/.Experimental/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Base.cs b/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Base.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Base.cs rename to LuaNetworkVariables/NetworkVariables/LuaNetVarController.Base.cs diff --git a/.Experimental/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Networking.cs b/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Networking.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Networking.cs rename to LuaNetworkVariables/NetworkVariables/LuaNetVarController.Networking.cs diff --git a/.Experimental/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Registration.cs b/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Registration.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Registration.cs rename to LuaNetworkVariables/NetworkVariables/LuaNetVarController.Registration.cs diff --git a/.Experimental/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Serialization.cs b/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Serialization.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Serialization.cs rename to LuaNetworkVariables/NetworkVariables/LuaNetVarController.Serialization.cs diff --git a/.Experimental/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Utility.cs b/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Utility.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/NetworkVariables/LuaNetVarController.Utility.cs rename to LuaNetworkVariables/NetworkVariables/LuaNetVarController.Utility.cs diff --git a/.Experimental/LuaNetworkVariables/Patches.cs b/LuaNetworkVariables/Patches.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/Patches.cs rename to LuaNetworkVariables/Patches.cs diff --git a/.Experimental/LuaNetworkVariables/Properties/AssemblyInfo.cs b/LuaNetworkVariables/Properties/AssemblyInfo.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/Properties/AssemblyInfo.cs rename to LuaNetworkVariables/Properties/AssemblyInfo.cs diff --git a/.Deprecated/AutoSyncTransforms/README.md b/LuaNetworkVariables/README.md similarity index 100% rename from .Deprecated/AutoSyncTransforms/README.md rename to LuaNetworkVariables/README.md diff --git a/.Experimental/LuaNetworkVariables/SyncedBehaviour/MNSyncedBehaviour.cs b/LuaNetworkVariables/SyncedBehaviour/MNSyncedBehaviour.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/SyncedBehaviour/MNSyncedBehaviour.cs rename to LuaNetworkVariables/SyncedBehaviour/MNSyncedBehaviour.cs diff --git a/LuaNetworkVariables/SyncedBehaviour/PickupableBehaviour.cs b/LuaNetworkVariables/SyncedBehaviour/PickupableBehaviour.cs new file mode 100644 index 0000000..30fddc1 --- /dev/null +++ b/LuaNetworkVariables/SyncedBehaviour/PickupableBehaviour.cs @@ -0,0 +1,161 @@ +using UnityEngine; +using ABI_RC.Core.InteractionSystem; +using ABI_RC.Systems.ModNetwork; + +namespace NAK.LuaNetVars; + +public class PickupableBehaviour : MNSyncedBehaviour +{ + private enum PickupMessageType : byte + { + GrabState, + Transform + } + + private bool isHeld; + private string holderId; + private Vector3 lastPosition; + private Quaternion lastRotation; + + public PickupableObject Pickupable { get; private set; } + + public PickupableBehaviour(string networkId, PickupableObject pickupable) : base(networkId, autoAcceptTransfers: false) + { + Pickupable = pickupable; + isHeld = false; + holderId = string.Empty; + lastPosition = pickupable.transform.position; + lastRotation = pickupable.transform.rotation; + } + + public void OnGrabbed(InteractionContext context) + { + RequestOwnership(success => { + if (success) + { + isHeld = true; + holderId = LocalUserId; + SendNetworkedData(WriteGrabState); + } + else + { + // Ownership request failed, drop the object + Pickupable.ControllerRay = null; // Force drop + } + }); + } + + public void OnDropped() + { + if (!HasOwnership) return; + + isHeld = false; + holderId = string.Empty; + SendNetworkedData(WriteGrabState); + } + + public void UpdateTransform(Vector3 position, Quaternion rotation) + { + if (!HasOwnership || !isHeld) return; + + lastPosition = position; + lastRotation = rotation; + SendNetworkedData(WriteTransform); + } + + protected override OwnershipResponse OnOwnershipRequested(string requesterId) + { + // If the object is held by the current owner, reject the transfer + if (isHeld && holderId == LocalUserId) + return OwnershipResponse.Rejected; + + // If theft is disallowed and the object is held by someone, reject the transfer + if (Pickupable.DisallowTheft && !string.IsNullOrEmpty(holderId)) + return OwnershipResponse.Rejected; + + return OwnershipResponse.Accepted; + } + + protected override void WriteState(ModNetworkMessage message) + { + message.Write(isHeld); + message.Write(holderId); + message.Write(lastPosition); + message.Write(lastRotation); + } + + protected override void ReadState(ModNetworkMessage message) + { + message.Read(out isHeld); + message.Read(out holderId); + message.Read(out lastPosition); + message.Read(out lastRotation); + + UpdatePickupableState(); + } + + private void WriteGrabState(ModNetworkMessage message) + { + message.Write((byte)PickupMessageType.GrabState); + message.Write(isHeld); + message.Write(holderId); + } + + private void WriteTransform(ModNetworkMessage message) + { + message.Write((byte)PickupMessageType.Transform); + message.Write(lastPosition); + message.Write(lastRotation); + } + + protected override void ReadCustomData(ModNetworkMessage message) + { + message.Read(out byte messageType); + + switch ((PickupMessageType)messageType) + { + case PickupMessageType.GrabState: + message.Read(out isHeld); + message.Read(out holderId); + break; + + case PickupMessageType.Transform: + message.Read(out Vector3 position); + message.Read(out Quaternion rotation); + lastPosition = position; + lastRotation = rotation; + break; + } + + UpdatePickupableState(); + } + + private void UpdatePickupableState() + { + // Update transform if we're not the holder + if (!isHeld || holderId != LocalUserId) + { + Pickupable.transform.position = lastPosition; + Pickupable.transform.rotation = lastRotation; + } + + // Force drop if we were holding but someone else took ownership + if (isHeld && holderId != LocalUserId) + { + Pickupable.ControllerRay = null; // Force drop + } + } + + protected override void OnOwnershipChanged(string newOwnerId) + { + base.OnOwnershipChanged(newOwnerId); + + // If we lost ownership and were holding, force drop + if (!HasOwnership && holderId == LocalUserId) + { + isHeld = false; + holderId = string.Empty; + Pickupable.ControllerRay = null; // Force drop + } + } +} \ No newline at end of file diff --git a/LuaNetworkVariables/SyncedBehaviour/PickupableObject.cs b/LuaNetworkVariables/SyncedBehaviour/PickupableObject.cs new file mode 100644 index 0000000..76b495a --- /dev/null +++ b/LuaNetworkVariables/SyncedBehaviour/PickupableObject.cs @@ -0,0 +1,72 @@ +using ABI_RC.Core.InteractionSystem; +using ABI_RC.Core.InteractionSystem.Base; +using UnityEngine; + +namespace NAK.LuaNetVars; + +public class PickupableObject : Pickupable +{ + [SerializeField] private bool canPickup = true; + [SerializeField] private bool disallowTheft = false; + [SerializeField] private float maxGrabDistance = 2f; + [SerializeField] private float maxPushDistance = 2f; + [SerializeField] private bool isAutoHold = false; + [SerializeField] private bool allowRotation = true; + [SerializeField] private bool allowPushPull = true; + [SerializeField] private bool allowInteraction = true; + + private PickupableBehaviour behaviour; + private bool isInitialized; + + private void Awake() + { + // Generate a unique network ID based on the instance ID + string networkId = $"pickup_{gameObject.name}"; + behaviour = new PickupableBehaviour(networkId, this); + isInitialized = true; + } + + private void OnDestroy() + { + behaviour?.Dispose(); + } + + private void Update() + { + if (behaviour?.HasOwnership == true) + { + transform.SetPositionAndRotation(ControllerRay.pivotPoint.position, ControllerRay.pivotPoint.rotation); + behaviour.UpdateTransform(transform.position, transform.rotation); + } + } + + #region Pickupable Implementation + + public override void OnGrab(InteractionContext context, Vector3 grabPoint) + { + if (!isInitialized) return; + behaviour.OnGrabbed(context); + } + + public override void OnDrop(InteractionContext context) + { + if (!isInitialized) return; + behaviour.OnDropped(); + } + + public override void OnFlingTowardsTarget(Vector3 target) + { + // ignore + } + + public override bool CanPickup => canPickup; + public override bool DisallowTheft => disallowTheft; + public override float MaxGrabDistance => maxGrabDistance; + public override float MaxPushDistance => maxPushDistance; + public override bool IsAutoHold => isAutoHold; + public override bool IsObjectRotationAllowed => allowRotation; + public override bool IsObjectPushPullAllowed => allowPushPull; + public override bool IsObjectInteractionAllowed => allowInteraction; + + #endregion Pickupable Implementation +} \ No newline at end of file diff --git a/.Experimental/LuaNetworkVariables/SyncedBehaviour/TestSyncedBehaviour.cs b/LuaNetworkVariables/SyncedBehaviour/TestSyncedBehaviour.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/SyncedBehaviour/TestSyncedBehaviour.cs rename to LuaNetworkVariables/SyncedBehaviour/TestSyncedBehaviour.cs diff --git a/.Experimental/LuaNetworkVariables/SyncedBehaviour/TestSyncedObject.cs b/LuaNetworkVariables/SyncedBehaviour/TestSyncedObject.cs similarity index 100% rename from .Experimental/LuaNetworkVariables/SyncedBehaviour/TestSyncedObject.cs rename to LuaNetworkVariables/SyncedBehaviour/TestSyncedObject.cs diff --git a/.Deprecated/AutoSyncTransforms/format.json b/LuaNetworkVariables/format.json similarity index 100% rename from .Deprecated/AutoSyncTransforms/format.json rename to LuaNetworkVariables/format.json diff --git a/.Experimental/LuaTTS/LuaTTS.csproj b/LuaTTS/LuaTTS.csproj similarity index 100% rename from .Experimental/LuaTTS/LuaTTS.csproj rename to LuaTTS/LuaTTS.csproj diff --git a/LuaTTS/Main.cs b/LuaTTS/Main.cs new file mode 100644 index 0000000..2035bb9 --- /dev/null +++ b/LuaTTS/Main.cs @@ -0,0 +1,25 @@ +using MelonLoader; +using NAK.LuaTTS.Patches; + +namespace NAK.LuaTTS; + +public class LuaTTSMod : MelonMod +{ + public override void OnInitializeMelon() + { + ApplyPatches(typeof(LuaScriptFactoryPatches)); + } + + private void ApplyPatches(Type type) + { + try + { + HarmonyInstance.PatchAll(type); + } + catch (Exception e) + { + LoggerInstance.Msg($"Failed while patching {type.Name}!"); + LoggerInstance.Error(e); + } + } +} \ No newline at end of file diff --git a/.Experimental/LuaTTS/Patches.cs b/LuaTTS/Patches.cs similarity index 75% rename from .Experimental/LuaTTS/Patches.cs rename to LuaTTS/Patches.cs index c45cec1..07d4297 100644 --- a/.Experimental/LuaTTS/Patches.cs +++ b/LuaTTS/Patches.cs @@ -11,17 +11,17 @@ internal static class LuaScriptFactoryPatches [HarmonyPostfix] [HarmonyPatch(typeof(LuaScriptFactory.CVRRequireModule), nameof(LuaScriptFactory.CVRRequireModule.Require))] private static void Postfix_CVRRequireModule_require( - string moduleFriendlyName, + string modid, ref LuaScriptFactory.CVRRequireModule __instance, ref object __result, - ref Script ____script, - ref CVRLuaContext ____context) + ref Script ___script, + ref CVRLuaContext ___context) { const string TTSModuleID = "TextToSpeech"; - if (TTSModuleID != moduleFriendlyName) + if (TTSModuleID != modid) return; // not our module - __result = TTSLuaModule.RegisterUserData(____script, ____context); + __result = TTSLuaModule.RegisterUserData(___script, ___context); __instance.RegisteredModules[TTSModuleID] = __result; // add module to cache } } \ No newline at end of file diff --git a/.Experimental/LuaTTS/Properties/AssemblyInfo.cs b/LuaTTS/Properties/AssemblyInfo.cs similarity index 100% rename from .Experimental/LuaTTS/Properties/AssemblyInfo.cs rename to LuaTTS/Properties/AssemblyInfo.cs diff --git a/.Experimental/LuaTTS/README.md b/LuaTTS/README.md similarity index 100% rename from .Experimental/LuaTTS/README.md rename to LuaTTS/README.md diff --git a/.Experimental/LuaTTS/TTSLuaModule.cs b/LuaTTS/TTSLuaModule.cs similarity index 100% rename from .Experimental/LuaTTS/TTSLuaModule.cs rename to LuaTTS/TTSLuaModule.cs diff --git a/.Experimental/LuaTTS/format.json b/LuaTTS/format.json similarity index 100% rename from .Experimental/LuaTTS/format.json rename to LuaTTS/format.json diff --git a/.Deprecated/MuteSFX/AudioModuleManager.cs b/MuteSFX/AudioModuleManager.cs similarity index 100% rename from .Deprecated/MuteSFX/AudioModuleManager.cs rename to MuteSFX/AudioModuleManager.cs diff --git a/.Deprecated/MuteSFX/Main.cs b/MuteSFX/Main.cs similarity index 100% rename from .Deprecated/MuteSFX/Main.cs rename to MuteSFX/Main.cs diff --git a/.Deprecated/MuteSFX/MuteSFX.csproj b/MuteSFX/MuteSFX.csproj similarity index 67% rename from .Deprecated/MuteSFX/MuteSFX.csproj rename to MuteSFX/MuteSFX.csproj index 5eba218..21b218c 100644 --- a/.Deprecated/MuteSFX/MuteSFX.csproj +++ b/MuteSFX/MuteSFX.csproj @@ -5,7 +5,7 @@ - - + + diff --git a/.Deprecated/MuteSFX/Properties/AssemblyInfo.cs b/MuteSFX/Properties/AssemblyInfo.cs similarity index 96% rename from .Deprecated/MuteSFX/Properties/AssemblyInfo.cs rename to MuteSFX/Properties/AssemblyInfo.cs index 452c973..75cb9f3 100644 --- a/.Deprecated/MuteSFX/Properties/AssemblyInfo.cs +++ b/MuteSFX/Properties/AssemblyInfo.cs @@ -27,6 +27,6 @@ using System.Reflection; namespace NAK.MuteSFX.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.3"; + public const string Version = "1.0.2"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/.Deprecated/MuteSFX/README.md b/MuteSFX/README.md similarity index 100% rename from .Deprecated/MuteSFX/README.md rename to MuteSFX/README.md diff --git a/.Deprecated/MuteSFX/SFX/sfx_mute.wav b/MuteSFX/SFX/sfx_mute.wav similarity index 100% rename from .Deprecated/MuteSFX/SFX/sfx_mute.wav rename to MuteSFX/SFX/sfx_mute.wav diff --git a/.Deprecated/MuteSFX/SFX/sfx_unmute.wav b/MuteSFX/SFX/sfx_unmute.wav similarity index 100% rename from .Deprecated/MuteSFX/SFX/sfx_unmute.wav rename to MuteSFX/SFX/sfx_unmute.wav diff --git a/.Deprecated/MuteSFX/format.json b/MuteSFX/format.json similarity index 96% rename from .Deprecated/MuteSFX/format.json rename to MuteSFX/format.json index 877e3e0..3601dd3 100644 --- a/.Deprecated/MuteSFX/format.json +++ b/MuteSFX/format.json @@ -1,7 +1,7 @@ { "_id": 172, "name": "MuteSFX", - "modversion": "1.0.3", + "modversion": "1.0.2", "gameversion": "2023r171", "loaderversion": "0.6.1", "modtype": "Mod", diff --git a/.Deprecated/MutualMute/Main.cs b/MutualMute/Main.cs similarity index 100% rename from .Deprecated/MutualMute/Main.cs rename to MutualMute/Main.cs diff --git a/.Deprecated/MutualMute/MutualMute.csproj b/MutualMute/MutualMute.csproj similarity index 100% rename from .Deprecated/MutualMute/MutualMute.csproj rename to MutualMute/MutualMute.csproj diff --git a/.Deprecated/MutualMute/Properties/AssemblyInfo.cs b/MutualMute/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/MutualMute/Properties/AssemblyInfo.cs rename to MutualMute/Properties/AssemblyInfo.cs diff --git a/.Deprecated/MutualMute/README.md b/MutualMute/README.md similarity index 100% rename from .Deprecated/MutualMute/README.md rename to MutualMute/README.md diff --git a/.Deprecated/MutualMute/format.json b/MutualMute/format.json similarity index 100% rename from .Deprecated/MutualMute/format.json rename to MutualMute/format.json diff --git a/NAK_CVR_Mods.sln b/NAK_CVR_Mods.sln index 976736f..ce1db86 100644 --- a/NAK_CVR_Mods.sln +++ b/NAK_CVR_Mods.sln @@ -1,299 +1,271 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.2.32630.192 -MinimumVisualStudioVersion = 10.0.40219.1 -EndProject -EndProject -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PathCamDisabler", "PathCamDisabler\PathCamDisabler.csproj", "{98169FD2-5CEB-46D1-A320-D7E06F82C9E0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PortableCameraAdditions", "PortableCameraAdditions\PortableCameraAdditions.csproj", "{C4DAFE9D-C79B-4417-9B7D-B7327999DA4C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PropUndoButton", "PropUndoButton\PropUndoButton.csproj", "{FBFDB717-F81E-4C06-ACF9-A0F3FFDCDE00}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThirdPerson", "ThirdPerson\ThirdPerson.csproj", "{675CEC0E-3E8A-4970-98EA-9B79277A7252}" -EndProject -EndProject -EndProject -EndProject -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RelativeSync", "RelativeSync\RelativeSync.csproj", "{B48C8F19-9451-4EE2-999F-82C0033CDE2C}" -EndProject -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LazyPrune", "LazyPrune\LazyPrune.csproj", "{8FA6D481-5801-4E4C-822E-DE561155D22B}" -EndProject -EndProject -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScrollFlight", "ScrollFlight\ScrollFlight.csproj", "{1B5D7DCB-01A4-4988-8B25-211948AEED76}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PropLoadingHexagon", "PropLoadingHexagon\PropLoadingHexagon.csproj", "{642A2BC7-C027-4F8F-969C-EF0F867936FD}" -EndProject -EndProject -EndProject -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeepVelocityOnExitFlight", "KeepVelocityOnExitFlight\KeepVelocityOnExitFlight.csproj", "{0BB3D187-BBBA-4C58-B246-102342BE5E8C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ASTExtension", "ASTExtension\ASTExtension.csproj", "{6580AA87-6A95-438E-A5D3-70E583CCD77B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvatarQueueSystemTweaks", "AvatarQueueSystemTweaks\AvatarQueueSystemTweaks.csproj", "{D178E422-283B-4FB3-89A6-AA4FB9F87E2F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomSpawnPoint", "CustomSpawnPoint\CustomSpawnPoint.csproj", "{51CA34CA-7684-4819-AC9E-89DFAD63E9AB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stickers", "Stickers\Stickers.csproj", "{E5F54B3E-A676-4DD5-A6DB-73AFA54BEC5E}" -EndProject -EndProject -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmootherRay", "SmootherRay\SmootherRay.csproj", "{99F9D60D-9A2D-4DBE-AA52-13D8A0838696}" -EndProject -EndProject -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShareBubbles", "ShareBubbles\ShareBubbles.csproj", "{ADD6205B-67A4-4BA8-8BED-DF7D0E857A6A}" -EndProject -EndProject -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RCCVirtualSteeringWheel", "RCCVirtualSteeringWheel\RCCVirtualSteeringWheel.csproj", "{4A378F81-3805-41E8-9565-A8A89A8C00D6}" -EndProject -EndProject -EndProject -EndProject -EndProject -EndProject -EndProject -EndProject -EndProject -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CF9BC79E-4FB6-429A-8C19-DF31F040BD4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CF9BC79E-4FB6-429A-8C19-DF31F040BD4A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CF9BC79E-4FB6-429A-8C19-DF31F040BD4A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CF9BC79E-4FB6-429A-8C19-DF31F040BD4A}.Release|Any CPU.Build.0 = Release|Any CPU - {79B2A7C4-348D-4A8E-94D1-BA22FDD5FEED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {79B2A7C4-348D-4A8E-94D1-BA22FDD5FEED}.Debug|Any CPU.Build.0 = Debug|Any CPU - {79B2A7C4-348D-4A8E-94D1-BA22FDD5FEED}.Release|Any CPU.ActiveCfg = Release|Any CPU - {79B2A7C4-348D-4A8E-94D1-BA22FDD5FEED}.Release|Any CPU.Build.0 = Release|Any CPU - {45A65AEB-4BFC-4E47-B181-BBB43BD81283}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45A65AEB-4BFC-4E47-B181-BBB43BD81283}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45A65AEB-4BFC-4E47-B181-BBB43BD81283}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45A65AEB-4BFC-4E47-B181-BBB43BD81283}.Release|Any CPU.Build.0 = Release|Any CPU - {98169FD2-5CEB-46D1-A320-D7E06F82C9E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {98169FD2-5CEB-46D1-A320-D7E06F82C9E0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {98169FD2-5CEB-46D1-A320-D7E06F82C9E0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {98169FD2-5CEB-46D1-A320-D7E06F82C9E0}.Release|Any CPU.Build.0 = Release|Any CPU - {C4DAFE9D-C79B-4417-9B7D-B7327999DA4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C4DAFE9D-C79B-4417-9B7D-B7327999DA4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C4DAFE9D-C79B-4417-9B7D-B7327999DA4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C4DAFE9D-C79B-4417-9B7D-B7327999DA4C}.Release|Any CPU.Build.0 = Release|Any CPU - {FBFDB717-F81E-4C06-ACF9-A0F3FFDCDE00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FBFDB717-F81E-4C06-ACF9-A0F3FFDCDE00}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FBFDB717-F81E-4C06-ACF9-A0F3FFDCDE00}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FBFDB717-F81E-4C06-ACF9-A0F3FFDCDE00}.Release|Any CPU.Build.0 = Release|Any CPU - {675CEC0E-3E8A-4970-98EA-9B79277A7252}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {675CEC0E-3E8A-4970-98EA-9B79277A7252}.Debug|Any CPU.Build.0 = Debug|Any CPU - {675CEC0E-3E8A-4970-98EA-9B79277A7252}.Release|Any CPU.ActiveCfg = Release|Any CPU - {675CEC0E-3E8A-4970-98EA-9B79277A7252}.Release|Any CPU.Build.0 = Release|Any CPU - {EE552804-30B1-49CF-BBDE-3B312895AFF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EE552804-30B1-49CF-BBDE-3B312895AFF7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE552804-30B1-49CF-BBDE-3B312895AFF7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EE552804-30B1-49CF-BBDE-3B312895AFF7}.Release|Any CPU.Build.0 = Release|Any CPU - {0E1DD746-33A1-4179-AE70-8FB83AC40ABC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0E1DD746-33A1-4179-AE70-8FB83AC40ABC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0E1DD746-33A1-4179-AE70-8FB83AC40ABC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0E1DD746-33A1-4179-AE70-8FB83AC40ABC}.Release|Any CPU.Build.0 = Release|Any CPU - {F94DDB73-9041-4F5C-AD43-6960701E8417}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F94DDB73-9041-4F5C-AD43-6960701E8417}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F94DDB73-9041-4F5C-AD43-6960701E8417}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F94DDB73-9041-4F5C-AD43-6960701E8417}.Release|Any CPU.Build.0 = Release|Any CPU - {AC4857DD-F6D9-436D-A3EE-D148A518E642}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC4857DD-F6D9-436D-A3EE-D148A518E642}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC4857DD-F6D9-436D-A3EE-D148A518E642}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC4857DD-F6D9-436D-A3EE-D148A518E642}.Release|Any CPU.Build.0 = Release|Any CPU - {69AF3C10-1BB1-4746-B697-B5A81D78C8D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {69AF3C10-1BB1-4746-B697-B5A81D78C8D9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {69AF3C10-1BB1-4746-B697-B5A81D78C8D9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {69AF3C10-1BB1-4746-B697-B5A81D78C8D9}.Release|Any CPU.Build.0 = Release|Any CPU - {9FA83514-13F8-412C-9790-C2B750E0E7E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9FA83514-13F8-412C-9790-C2B750E0E7E7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9FA83514-13F8-412C-9790-C2B750E0E7E7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9FA83514-13F8-412C-9790-C2B750E0E7E7}.Release|Any CPU.Build.0 = Release|Any CPU - {B48C8F19-9451-4EE2-999F-82C0033CDE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B48C8F19-9451-4EE2-999F-82C0033CDE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B48C8F19-9451-4EE2-999F-82C0033CDE2C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B48C8F19-9451-4EE2-999F-82C0033CDE2C}.Release|Any CPU.Build.0 = Release|Any CPU - {6B4396C7-B451-4FFD-87B6-3ED8377AC308}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6B4396C7-B451-4FFD-87B6-3ED8377AC308}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6B4396C7-B451-4FFD-87B6-3ED8377AC308}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6B4396C7-B451-4FFD-87B6-3ED8377AC308}.Release|Any CPU.Build.0 = Release|Any CPU - {24A069F4-4D69-4ABD-AA16-77765469245B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24A069F4-4D69-4ABD-AA16-77765469245B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24A069F4-4D69-4ABD-AA16-77765469245B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24A069F4-4D69-4ABD-AA16-77765469245B}.Release|Any CPU.Build.0 = Release|Any CPU - {8FA6D481-5801-4E4C-822E-DE561155D22B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8FA6D481-5801-4E4C-822E-DE561155D22B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8FA6D481-5801-4E4C-822E-DE561155D22B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8FA6D481-5801-4E4C-822E-DE561155D22B}.Release|Any CPU.Build.0 = Release|Any CPU - {05C427DD-1261-4AAD-B316-A551FC126F2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05C427DD-1261-4AAD-B316-A551FC126F2C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05C427DD-1261-4AAD-B316-A551FC126F2C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05C427DD-1261-4AAD-B316-A551FC126F2C}.Release|Any CPU.Build.0 = Release|Any CPU - {C6794B18-E785-4F91-A517-3A2A8006E008}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C6794B18-E785-4F91-A517-3A2A8006E008}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C6794B18-E785-4F91-A517-3A2A8006E008}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C6794B18-E785-4F91-A517-3A2A8006E008}.Release|Any CPU.Build.0 = Release|Any CPU - {F381F604-9C16-4870-AD49-4BD7CA3F36DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F381F604-9C16-4870-AD49-4BD7CA3F36DC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F381F604-9C16-4870-AD49-4BD7CA3F36DC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F381F604-9C16-4870-AD49-4BD7CA3F36DC}.Release|Any CPU.Build.0 = Release|Any CPU - {1B5D7DCB-01A4-4988-8B25-211948AEED76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1B5D7DCB-01A4-4988-8B25-211948AEED76}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1B5D7DCB-01A4-4988-8B25-211948AEED76}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1B5D7DCB-01A4-4988-8B25-211948AEED76}.Release|Any CPU.Build.0 = Release|Any CPU - {BE9629C2-8461-481C-B267-1B8A1805DCD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BE9629C2-8461-481C-B267-1B8A1805DCD7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BE9629C2-8461-481C-B267-1B8A1805DCD7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BE9629C2-8461-481C-B267-1B8A1805DCD7}.Release|Any CPU.Build.0 = Release|Any CPU - {642A2BC7-C027-4F8F-969C-EF0F867936FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {642A2BC7-C027-4F8F-969C-EF0F867936FD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {642A2BC7-C027-4F8F-969C-EF0F867936FD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {642A2BC7-C027-4F8F-969C-EF0F867936FD}.Release|Any CPU.Build.0 = Release|Any CPU - {D11214B0-94FE-4008-8D1B-3DC8614466B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D11214B0-94FE-4008-8D1B-3DC8614466B3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D11214B0-94FE-4008-8D1B-3DC8614466B3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D11214B0-94FE-4008-8D1B-3DC8614466B3}.Release|Any CPU.Build.0 = Release|Any CPU - {2CC1F7C6-A953-4008-8C10-C7592EB401E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2CC1F7C6-A953-4008-8C10-C7592EB401E8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2CC1F7C6-A953-4008-8C10-C7592EB401E8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2CC1F7C6-A953-4008-8C10-C7592EB401E8}.Release|Any CPU.Build.0 = Release|Any CPU - {39915C4C-B555-4CB9-890F-26DE1388BC2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {39915C4C-B555-4CB9-890F-26DE1388BC2E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {39915C4C-B555-4CB9-890F-26DE1388BC2E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {39915C4C-B555-4CB9-890F-26DE1388BC2E}.Release|Any CPU.Build.0 = Release|Any CPU - {7C675E64-0A2D-4B34-B6D1-5D6AA369A520}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7C675E64-0A2D-4B34-B6D1-5D6AA369A520}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7C675E64-0A2D-4B34-B6D1-5D6AA369A520}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7C675E64-0A2D-4B34-B6D1-5D6AA369A520}.Release|Any CPU.Build.0 = Release|Any CPU - {0BB3D187-BBBA-4C58-B246-102342BE5E8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0BB3D187-BBBA-4C58-B246-102342BE5E8C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0BB3D187-BBBA-4C58-B246-102342BE5E8C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0BB3D187-BBBA-4C58-B246-102342BE5E8C}.Release|Any CPU.Build.0 = Release|Any CPU - {6580AA87-6A95-438E-A5D3-70E583CCD77B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6580AA87-6A95-438E-A5D3-70E583CCD77B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6580AA87-6A95-438E-A5D3-70E583CCD77B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6580AA87-6A95-438E-A5D3-70E583CCD77B}.Release|Any CPU.Build.0 = Release|Any CPU - {D178E422-283B-4FB3-89A6-AA4FB9F87E2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D178E422-283B-4FB3-89A6-AA4FB9F87E2F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D178E422-283B-4FB3-89A6-AA4FB9F87E2F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D178E422-283B-4FB3-89A6-AA4FB9F87E2F}.Release|Any CPU.Build.0 = Release|Any CPU - {51CA34CA-7684-4819-AC9E-89DFAD63E9AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {51CA34CA-7684-4819-AC9E-89DFAD63E9AB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {51CA34CA-7684-4819-AC9E-89DFAD63E9AB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {51CA34CA-7684-4819-AC9E-89DFAD63E9AB}.Release|Any CPU.Build.0 = Release|Any CPU - {FE6BA6EC-2C11-49E1-A2FB-13F2A1C9E7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FE6BA6EC-2C11-49E1-A2FB-13F2A1C9E7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FE6BA6EC-2C11-49E1-A2FB-13F2A1C9E7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FE6BA6EC-2C11-49E1-A2FB-13F2A1C9E7F9}.Release|Any CPU.Build.0 = Release|Any CPU - {E5F54B3E-A676-4DD5-A6DB-73AFA54BEC5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E5F54B3E-A676-4DD5-A6DB-73AFA54BEC5E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E5F54B3E-A676-4DD5-A6DB-73AFA54BEC5E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E5F54B3E-A676-4DD5-A6DB-73AFA54BEC5E}.Release|Any CPU.Build.0 = Release|Any CPU - {3C992D0C-9729-438E-800C-496B7EFFFB25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3C992D0C-9729-438E-800C-496B7EFFFB25}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3C992D0C-9729-438E-800C-496B7EFFFB25}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3C992D0C-9729-438E-800C-496B7EFFFB25}.Release|Any CPU.Build.0 = Release|Any CPU - {E285BCC9-D953-4066-8FA2-97EA28EB348E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E285BCC9-D953-4066-8FA2-97EA28EB348E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E285BCC9-D953-4066-8FA2-97EA28EB348E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E285BCC9-D953-4066-8FA2-97EA28EB348E}.Release|Any CPU.Build.0 = Release|Any CPU - {A38E687F-8B6B-499E-ABC9-BD95C53DD391}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A38E687F-8B6B-499E-ABC9-BD95C53DD391}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A38E687F-8B6B-499E-ABC9-BD95C53DD391}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A38E687F-8B6B-499E-ABC9-BD95C53DD391}.Release|Any CPU.Build.0 = Release|Any CPU - {99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Debug|Any CPU.Build.0 = Debug|Any CPU - {99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Release|Any CPU.Build.0 = Release|Any CPU - {A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}.Release|Any CPU.Build.0 = Release|Any CPU - {0640B2BF-1EF5-4FFE-A144-0368748FC48B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0640B2BF-1EF5-4FFE-A144-0368748FC48B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0640B2BF-1EF5-4FFE-A144-0368748FC48B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0640B2BF-1EF5-4FFE-A144-0368748FC48B}.Release|Any CPU.Build.0 = Release|Any CPU - {FC91FFFE-1E0A-4F59-8802-BFF99152AD07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FC91FFFE-1E0A-4F59-8802-BFF99152AD07}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FC91FFFE-1E0A-4F59-8802-BFF99152AD07}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FC91FFFE-1E0A-4F59-8802-BFF99152AD07}.Release|Any CPU.Build.0 = Release|Any CPU - {ADD6205B-67A4-4BA8-8BED-DF7D0E857A6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ADD6205B-67A4-4BA8-8BED-DF7D0E857A6A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ADD6205B-67A4-4BA8-8BED-DF7D0E857A6A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ADD6205B-67A4-4BA8-8BED-DF7D0E857A6A}.Release|Any CPU.Build.0 = Release|Any CPU - {6E315182-CC9F-4F62-8385-5E26EFA3B98A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6E315182-CC9F-4F62-8385-5E26EFA3B98A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6E315182-CC9F-4F62-8385-5E26EFA3B98A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6E315182-CC9F-4F62-8385-5E26EFA3B98A}.Release|Any CPU.Build.0 = Release|Any CPU - {09238300-4583-45C6-A997-025CBDC44C24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {09238300-4583-45C6-A997-025CBDC44C24}.Debug|Any CPU.Build.0 = Debug|Any CPU - {09238300-4583-45C6-A997-025CBDC44C24}.Release|Any CPU.ActiveCfg = Release|Any CPU - {09238300-4583-45C6-A997-025CBDC44C24}.Release|Any CPU.Build.0 = Release|Any CPU - {21FDAB94-5014-488D-86C7-A366F1902B24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {21FDAB94-5014-488D-86C7-A366F1902B24}.Debug|Any CPU.Build.0 = Debug|Any CPU - {21FDAB94-5014-488D-86C7-A366F1902B24}.Release|Any CPU.ActiveCfg = Release|Any CPU - {21FDAB94-5014-488D-86C7-A366F1902B24}.Release|Any CPU.Build.0 = Release|Any CPU - {4A378F81-3805-41E8-9565-A8A89A8C00D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A378F81-3805-41E8-9565-A8A89A8C00D6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A378F81-3805-41E8-9565-A8A89A8C00D6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A378F81-3805-41E8-9565-A8A89A8C00D6}.Release|Any CPU.Build.0 = Release|Any CPU - {FFCF6FA8-4F38-415E-AC2D-B576FFD5FED5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FFCF6FA8-4F38-415E-AC2D-B576FFD5FED5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FFCF6FA8-4F38-415E-AC2D-B576FFD5FED5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FFCF6FA8-4F38-415E-AC2D-B576FFD5FED5}.Release|Any CPU.Build.0 = Release|Any CPU - {71CBD7CC-C787-4796-B05E-4F3BC3C28B48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {71CBD7CC-C787-4796-B05E-4F3BC3C28B48}.Debug|Any CPU.Build.0 = Debug|Any CPU - {71CBD7CC-C787-4796-B05E-4F3BC3C28B48}.Release|Any CPU.ActiveCfg = Release|Any CPU - {71CBD7CC-C787-4796-B05E-4F3BC3C28B48}.Release|Any CPU.Build.0 = Release|Any CPU - {42E626F7-9A7E-4F55-B02C-16EB56E2B540}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {42E626F7-9A7E-4F55-B02C-16EB56E2B540}.Debug|Any CPU.Build.0 = Debug|Any CPU - {42E626F7-9A7E-4F55-B02C-16EB56E2B540}.Release|Any CPU.ActiveCfg = Release|Any CPU - {42E626F7-9A7E-4F55-B02C-16EB56E2B540}.Release|Any CPU.Build.0 = Release|Any CPU - {8BF2CBBF-6DAB-4D7A-87E0-AE643D6019AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8BF2CBBF-6DAB-4D7A-87E0-AE643D6019AB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8BF2CBBF-6DAB-4D7A-87E0-AE643D6019AB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8BF2CBBF-6DAB-4D7A-87E0-AE643D6019AB}.Release|Any CPU.Build.0 = Release|Any CPU - {262A8AE0-E610-405F-B4EC-DB714FB54C00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {262A8AE0-E610-405F-B4EC-DB714FB54C00}.Debug|Any CPU.Build.0 = Debug|Any CPU - {262A8AE0-E610-405F-B4EC-DB714FB54C00}.Release|Any CPU.ActiveCfg = Release|Any CPU - {262A8AE0-E610-405F-B4EC-DB714FB54C00}.Release|Any CPU.Build.0 = Release|Any CPU - {E5F07862-5715-470D-B324-19BDEBB2AA4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E5F07862-5715-470D-B324-19BDEBB2AA4D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E5F07862-5715-470D-B324-19BDEBB2AA4D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E5F07862-5715-470D-B324-19BDEBB2AA4D}.Release|Any CPU.Build.0 = Release|Any CPU - {21B591A0-F6E5-4645-BF2D-4E71F47394A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {21B591A0-F6E5-4645-BF2D-4E71F47394A7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {21B591A0-F6E5-4645-BF2D-4E71F47394A7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {21B591A0-F6E5-4645-BF2D-4E71F47394A7}.Release|Any CPU.Build.0 = Release|Any CPU - {F093BDE5-1824-459E-B86E-B9F79B548E58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F093BDE5-1824-459E-B86E-B9F79B548E58}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F093BDE5-1824-459E-B86E-B9F79B548E58}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F093BDE5-1824-459E-B86E-B9F79B548E58}.Release|Any CPU.Build.0 = Release|Any CPU - {EDA96974-0BEA-404B-8EED-F19CCA2C95A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EDA96974-0BEA-404B-8EED-F19CCA2C95A8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EDA96974-0BEA-404B-8EED-F19CCA2C95A8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EDA96974-0BEA-404B-8EED-F19CCA2C95A8}.Release|Any CPU.Build.0 = Release|Any CPU - {ED2CAA2D-4E49-4636-86C4-367D0CDC3572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ED2CAA2D-4E49-4636-86C4-367D0CDC3572}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ED2CAA2D-4E49-4636-86C4-367D0CDC3572}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ED2CAA2D-4E49-4636-86C4-367D0CDC3572}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {CD7DECEC-F4A0-4EEF-978B-72748414D52A} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32630.192 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CVRGizmos", "CVRGizmos\CVRGizmos.csproj", "{CF9BC79E-4FB6-429A-8C19-DF31F040BD4A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FuckToes", "FuckToes\FuckToes.csproj", "{79B2A7C4-348D-4A8E-94D1-BA22FDD5FEED}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GestureLock", "GestureLock\GestureLock.csproj", "{45A65AEB-4BFC-4E47-B181-BBB43BD81283}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PathCamDisabler", "PathCamDisabler\PathCamDisabler.csproj", "{98169FD2-5CEB-46D1-A320-D7E06F82C9E0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PortableCameraAdditions", "PortableCameraAdditions\PortableCameraAdditions.csproj", "{C4DAFE9D-C79B-4417-9B7D-B7327999DA4C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PropUndoButton", "PropUndoButton\PropUndoButton.csproj", "{FBFDB717-F81E-4C06-ACF9-A0F3FFDCDE00}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThirdPerson", "ThirdPerson\ThirdPerson.csproj", "{675CEC0E-3E8A-4970-98EA-9B79277A7252}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FOVAdjustment", "FOVAdjustment\FOVAdjustment.csproj", "{EE552804-30B1-49CF-BBDE-3B312895AFF7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MuteSFX", "MuteSFX\MuteSFX.csproj", "{77D222FC-4AEC-4672-A87A-B860B4C39E17}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatBoxExtensions", "ChatBoxExtensions\ChatBoxExtensions.csproj", "{0E1DD746-33A1-4179-AE70-8FB83AC40ABC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhysicsGunMod", "PhysicsGunMod\PhysicsGunMod.csproj", "{F94DDB73-9041-4F5C-AD43-6960701E8417}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nevermind", "Nevermind\Nevermind.csproj", "{AC4857DD-F6D9-436D-A3EE-D148A518E642}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShadowCloneFallback", "ShadowCloneFallback\ShadowCloneFallback.csproj", "{69AF3C10-1BB1-4746-B697-B5A81D78C8D9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StopClosingMyMenuOnWorldLoad", "StopClosingMyMenuOnWorldLoad\StopClosingMyMenuOnWorldLoad.csproj", "{9FA83514-13F8-412C-9790-C2B750E0E7E7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RelativeSync", "RelativeSync\RelativeSync.csproj", "{B48C8F19-9451-4EE2-999F-82C0033CDE2C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScriptingSpoofer", "ScriptingSpoofer\ScriptingSpoofer.csproj", "{6B4396C7-B451-4FFD-87B6-3ED8377AC308}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LuaTTS", "LuaTTS\LuaTTS.csproj", "{24A069F4-4D69-4ABD-AA16-77765469245B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LazyPrune", "LazyPrune\LazyPrune.csproj", "{8FA6D481-5801-4E4C-822E-DE561155D22B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReconnectionSystemFix", "ReconnectionSystemFix\ReconnectionSystemFix.csproj", "{05C427DD-1261-4AAD-B316-A551FC126F2C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AASDefaultProfileFix", "AASDefaultProfileFix\AASDefaultProfileFix.csproj", "{C6794B18-E785-4F91-A517-3A2A8006E008}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OriginShift", "OriginShift\OriginShift.csproj", "{F381F604-9C16-4870-AD49-4BD7CA3F36DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScrollFlight", "ScrollFlight\ScrollFlight.csproj", "{1B5D7DCB-01A4-4988-8B25-211948AEED76}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Portals", "Portals\Portals.csproj", "{BE9629C2-8461-481C-B267-1B8A1805DCD7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PropLoadingHexagon", "PropLoadingHexagon\PropLoadingHexagon.csproj", "{642A2BC7-C027-4F8F-969C-EF0F867936FD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IKSimulatedRootAngleFix", "IKSimulatedRootAngleFix\IKSimulatedRootAngleFix.csproj", "{D11214B0-94FE-4008-8D1B-3DC8614466B3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DropPropTweak", "DropPropTweak\DropPropTweak.csproj", "{2CC1F7C6-A953-4008-8C10-C7592EB401E8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisualCloneFix", "VisualCloneFix\VisualCloneFix.csproj", "{39915C4C-B555-4CB9-890F-26DE1388BC2E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteractionTest", "InteractionTest\InteractionTest.csproj", "{7C675E64-0A2D-4B34-B6D1-5D6AA369A520}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeepVelocityOnExitFlight", "KeepVelocityOnExitFlight\KeepVelocityOnExitFlight.csproj", "{0BB3D187-BBBA-4C58-B246-102342BE5E8C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ASTExtension", "ASTExtension\ASTExtension.csproj", "{6580AA87-6A95-438E-A5D3-70E583CCD77B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvatarQueueSystemTweaks", "AvatarQueueSystemTweaks\AvatarQueueSystemTweaks.csproj", "{D178E422-283B-4FB3-89A6-AA4FB9F87E2F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomSpawnPoint", "CustomSpawnPoint\CustomSpawnPoint.csproj", "{51CA34CA-7684-4819-AC9E-89DFAD63E9AB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CVRLuaToolsExtension", "CVRLuaToolsExtension\CVRLuaToolsExtension.csproj", "{FE6BA6EC-2C11-49E1-A2FB-13F2A1C9E7F9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stickers", "Stickers\Stickers.csproj", "{E5F54B3E-A676-4DD5-A6DB-73AFA54BEC5E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmartReticle", "SmartReticle\SmartReticle.csproj", "{3C992D0C-9729-438E-800C-496B7EFFFB25}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WhereAmIPointing", "WhereAmIPointing\WhereAmIPointing.csproj", "{E285BCC9-D953-4066-8FA2-97EA28EB348E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvatarScaleMod", "AvatarScaleMod\AvatarScaleMod.csproj", "{A38E687F-8B6B-499E-ABC9-BD95C53DD391}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmootherRay", "SmootherRay\SmootherRay.csproj", "{99F9D60D-9A2D-4DBE-AA52-13D8A0838696}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LuaNetworkVariables", "LuaNetworkVariables\LuaNetworkVariables.csproj", "{A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchWithSpacesFix", "SearchWithSpacesFix\SearchWithSpacesFix.csproj", "{0640B2BF-1EF5-4FFE-A144-0368748FC48B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentMonitor", "ComponentMonitor\ComponentMonitor.csproj", "{FC91FFFE-1E0A-4F59-8802-BFF99152AD07}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShareBubbles", "ShareBubbles\ShareBubbles.csproj", "{ADD6205B-67A4-4BA8-8BED-DF7D0E857A6A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CF9BC79E-4FB6-429A-8C19-DF31F040BD4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF9BC79E-4FB6-429A-8C19-DF31F040BD4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF9BC79E-4FB6-429A-8C19-DF31F040BD4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF9BC79E-4FB6-429A-8C19-DF31F040BD4A}.Release|Any CPU.Build.0 = Release|Any CPU + {79B2A7C4-348D-4A8E-94D1-BA22FDD5FEED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79B2A7C4-348D-4A8E-94D1-BA22FDD5FEED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79B2A7C4-348D-4A8E-94D1-BA22FDD5FEED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79B2A7C4-348D-4A8E-94D1-BA22FDD5FEED}.Release|Any CPU.Build.0 = Release|Any CPU + {45A65AEB-4BFC-4E47-B181-BBB43BD81283}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45A65AEB-4BFC-4E47-B181-BBB43BD81283}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45A65AEB-4BFC-4E47-B181-BBB43BD81283}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45A65AEB-4BFC-4E47-B181-BBB43BD81283}.Release|Any CPU.Build.0 = Release|Any CPU + {98169FD2-5CEB-46D1-A320-D7E06F82C9E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {98169FD2-5CEB-46D1-A320-D7E06F82C9E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {98169FD2-5CEB-46D1-A320-D7E06F82C9E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {98169FD2-5CEB-46D1-A320-D7E06F82C9E0}.Release|Any CPU.Build.0 = Release|Any CPU + {C4DAFE9D-C79B-4417-9B7D-B7327999DA4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4DAFE9D-C79B-4417-9B7D-B7327999DA4C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4DAFE9D-C79B-4417-9B7D-B7327999DA4C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4DAFE9D-C79B-4417-9B7D-B7327999DA4C}.Release|Any CPU.Build.0 = Release|Any CPU + {FBFDB717-F81E-4C06-ACF9-A0F3FFDCDE00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FBFDB717-F81E-4C06-ACF9-A0F3FFDCDE00}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FBFDB717-F81E-4C06-ACF9-A0F3FFDCDE00}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FBFDB717-F81E-4C06-ACF9-A0F3FFDCDE00}.Release|Any CPU.Build.0 = Release|Any CPU + {675CEC0E-3E8A-4970-98EA-9B79277A7252}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {675CEC0E-3E8A-4970-98EA-9B79277A7252}.Debug|Any CPU.Build.0 = Debug|Any CPU + {675CEC0E-3E8A-4970-98EA-9B79277A7252}.Release|Any CPU.ActiveCfg = Release|Any CPU + {675CEC0E-3E8A-4970-98EA-9B79277A7252}.Release|Any CPU.Build.0 = Release|Any CPU + {EE552804-30B1-49CF-BBDE-3B312895AFF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE552804-30B1-49CF-BBDE-3B312895AFF7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE552804-30B1-49CF-BBDE-3B312895AFF7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE552804-30B1-49CF-BBDE-3B312895AFF7}.Release|Any CPU.Build.0 = Release|Any CPU + {77D222FC-4AEC-4672-A87A-B860B4C39E17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77D222FC-4AEC-4672-A87A-B860B4C39E17}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77D222FC-4AEC-4672-A87A-B860B4C39E17}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77D222FC-4AEC-4672-A87A-B860B4C39E17}.Release|Any CPU.Build.0 = Release|Any CPU + {0E1DD746-33A1-4179-AE70-8FB83AC40ABC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E1DD746-33A1-4179-AE70-8FB83AC40ABC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E1DD746-33A1-4179-AE70-8FB83AC40ABC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E1DD746-33A1-4179-AE70-8FB83AC40ABC}.Release|Any CPU.Build.0 = Release|Any CPU + {F94DDB73-9041-4F5C-AD43-6960701E8417}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F94DDB73-9041-4F5C-AD43-6960701E8417}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F94DDB73-9041-4F5C-AD43-6960701E8417}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F94DDB73-9041-4F5C-AD43-6960701E8417}.Release|Any CPU.Build.0 = Release|Any CPU + {AC4857DD-F6D9-436D-A3EE-D148A518E642}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC4857DD-F6D9-436D-A3EE-D148A518E642}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC4857DD-F6D9-436D-A3EE-D148A518E642}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC4857DD-F6D9-436D-A3EE-D148A518E642}.Release|Any CPU.Build.0 = Release|Any CPU + {69AF3C10-1BB1-4746-B697-B5A81D78C8D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69AF3C10-1BB1-4746-B697-B5A81D78C8D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69AF3C10-1BB1-4746-B697-B5A81D78C8D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69AF3C10-1BB1-4746-B697-B5A81D78C8D9}.Release|Any CPU.Build.0 = Release|Any CPU + {9FA83514-13F8-412C-9790-C2B750E0E7E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9FA83514-13F8-412C-9790-C2B750E0E7E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9FA83514-13F8-412C-9790-C2B750E0E7E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9FA83514-13F8-412C-9790-C2B750E0E7E7}.Release|Any CPU.Build.0 = Release|Any CPU + {B48C8F19-9451-4EE2-999F-82C0033CDE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B48C8F19-9451-4EE2-999F-82C0033CDE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B48C8F19-9451-4EE2-999F-82C0033CDE2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B48C8F19-9451-4EE2-999F-82C0033CDE2C}.Release|Any CPU.Build.0 = Release|Any CPU + {6B4396C7-B451-4FFD-87B6-3ED8377AC308}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6B4396C7-B451-4FFD-87B6-3ED8377AC308}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6B4396C7-B451-4FFD-87B6-3ED8377AC308}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6B4396C7-B451-4FFD-87B6-3ED8377AC308}.Release|Any CPU.Build.0 = Release|Any CPU + {24A069F4-4D69-4ABD-AA16-77765469245B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {24A069F4-4D69-4ABD-AA16-77765469245B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {24A069F4-4D69-4ABD-AA16-77765469245B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {24A069F4-4D69-4ABD-AA16-77765469245B}.Release|Any CPU.Build.0 = Release|Any CPU + {8FA6D481-5801-4E4C-822E-DE561155D22B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8FA6D481-5801-4E4C-822E-DE561155D22B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8FA6D481-5801-4E4C-822E-DE561155D22B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8FA6D481-5801-4E4C-822E-DE561155D22B}.Release|Any CPU.Build.0 = Release|Any CPU + {05C427DD-1261-4AAD-B316-A551FC126F2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05C427DD-1261-4AAD-B316-A551FC126F2C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05C427DD-1261-4AAD-B316-A551FC126F2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05C427DD-1261-4AAD-B316-A551FC126F2C}.Release|Any CPU.Build.0 = Release|Any CPU + {C6794B18-E785-4F91-A517-3A2A8006E008}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C6794B18-E785-4F91-A517-3A2A8006E008}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C6794B18-E785-4F91-A517-3A2A8006E008}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C6794B18-E785-4F91-A517-3A2A8006E008}.Release|Any CPU.Build.0 = Release|Any CPU + {F381F604-9C16-4870-AD49-4BD7CA3F36DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F381F604-9C16-4870-AD49-4BD7CA3F36DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F381F604-9C16-4870-AD49-4BD7CA3F36DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F381F604-9C16-4870-AD49-4BD7CA3F36DC}.Release|Any CPU.Build.0 = Release|Any CPU + {1B5D7DCB-01A4-4988-8B25-211948AEED76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B5D7DCB-01A4-4988-8B25-211948AEED76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B5D7DCB-01A4-4988-8B25-211948AEED76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B5D7DCB-01A4-4988-8B25-211948AEED76}.Release|Any CPU.Build.0 = Release|Any CPU + {BE9629C2-8461-481C-B267-1B8A1805DCD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE9629C2-8461-481C-B267-1B8A1805DCD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE9629C2-8461-481C-B267-1B8A1805DCD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE9629C2-8461-481C-B267-1B8A1805DCD7}.Release|Any CPU.Build.0 = Release|Any CPU + {642A2BC7-C027-4F8F-969C-EF0F867936FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {642A2BC7-C027-4F8F-969C-EF0F867936FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {642A2BC7-C027-4F8F-969C-EF0F867936FD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {642A2BC7-C027-4F8F-969C-EF0F867936FD}.Release|Any CPU.Build.0 = Release|Any CPU + {D11214B0-94FE-4008-8D1B-3DC8614466B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D11214B0-94FE-4008-8D1B-3DC8614466B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D11214B0-94FE-4008-8D1B-3DC8614466B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D11214B0-94FE-4008-8D1B-3DC8614466B3}.Release|Any CPU.Build.0 = Release|Any CPU + {2CC1F7C6-A953-4008-8C10-C7592EB401E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2CC1F7C6-A953-4008-8C10-C7592EB401E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2CC1F7C6-A953-4008-8C10-C7592EB401E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2CC1F7C6-A953-4008-8C10-C7592EB401E8}.Release|Any CPU.Build.0 = Release|Any CPU + {39915C4C-B555-4CB9-890F-26DE1388BC2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39915C4C-B555-4CB9-890F-26DE1388BC2E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39915C4C-B555-4CB9-890F-26DE1388BC2E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39915C4C-B555-4CB9-890F-26DE1388BC2E}.Release|Any CPU.Build.0 = Release|Any CPU + {7C675E64-0A2D-4B34-B6D1-5D6AA369A520}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C675E64-0A2D-4B34-B6D1-5D6AA369A520}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C675E64-0A2D-4B34-B6D1-5D6AA369A520}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C675E64-0A2D-4B34-B6D1-5D6AA369A520}.Release|Any CPU.Build.0 = Release|Any CPU + {0BB3D187-BBBA-4C58-B246-102342BE5E8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0BB3D187-BBBA-4C58-B246-102342BE5E8C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0BB3D187-BBBA-4C58-B246-102342BE5E8C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0BB3D187-BBBA-4C58-B246-102342BE5E8C}.Release|Any CPU.Build.0 = Release|Any CPU + {6580AA87-6A95-438E-A5D3-70E583CCD77B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6580AA87-6A95-438E-A5D3-70E583CCD77B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6580AA87-6A95-438E-A5D3-70E583CCD77B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6580AA87-6A95-438E-A5D3-70E583CCD77B}.Release|Any CPU.Build.0 = Release|Any CPU + {D178E422-283B-4FB3-89A6-AA4FB9F87E2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D178E422-283B-4FB3-89A6-AA4FB9F87E2F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D178E422-283B-4FB3-89A6-AA4FB9F87E2F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D178E422-283B-4FB3-89A6-AA4FB9F87E2F}.Release|Any CPU.Build.0 = Release|Any CPU + {51CA34CA-7684-4819-AC9E-89DFAD63E9AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51CA34CA-7684-4819-AC9E-89DFAD63E9AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51CA34CA-7684-4819-AC9E-89DFAD63E9AB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51CA34CA-7684-4819-AC9E-89DFAD63E9AB}.Release|Any CPU.Build.0 = Release|Any CPU + {FE6BA6EC-2C11-49E1-A2FB-13F2A1C9E7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FE6BA6EC-2C11-49E1-A2FB-13F2A1C9E7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FE6BA6EC-2C11-49E1-A2FB-13F2A1C9E7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FE6BA6EC-2C11-49E1-A2FB-13F2A1C9E7F9}.Release|Any CPU.Build.0 = Release|Any CPU + {E5F54B3E-A676-4DD5-A6DB-73AFA54BEC5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5F54B3E-A676-4DD5-A6DB-73AFA54BEC5E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5F54B3E-A676-4DD5-A6DB-73AFA54BEC5E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5F54B3E-A676-4DD5-A6DB-73AFA54BEC5E}.Release|Any CPU.Build.0 = Release|Any CPU + {3C992D0C-9729-438E-800C-496B7EFFFB25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C992D0C-9729-438E-800C-496B7EFFFB25}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C992D0C-9729-438E-800C-496B7EFFFB25}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C992D0C-9729-438E-800C-496B7EFFFB25}.Release|Any CPU.Build.0 = Release|Any CPU + {E285BCC9-D953-4066-8FA2-97EA28EB348E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E285BCC9-D953-4066-8FA2-97EA28EB348E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E285BCC9-D953-4066-8FA2-97EA28EB348E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E285BCC9-D953-4066-8FA2-97EA28EB348E}.Release|Any CPU.Build.0 = Release|Any CPU + {A38E687F-8B6B-499E-ABC9-BD95C53DD391}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A38E687F-8B6B-499E-ABC9-BD95C53DD391}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A38E687F-8B6B-499E-ABC9-BD95C53DD391}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A38E687F-8B6B-499E-ABC9-BD95C53DD391}.Release|Any CPU.Build.0 = Release|Any CPU + {99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99F9D60D-9A2D-4DBE-AA52-13D8A0838696}.Release|Any CPU.Build.0 = Release|Any CPU + {A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3D97D1A-3099-49C5-85AD-D8C79CC5FDE3}.Release|Any CPU.Build.0 = Release|Any CPU + {0640B2BF-1EF5-4FFE-A144-0368748FC48B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0640B2BF-1EF5-4FFE-A144-0368748FC48B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0640B2BF-1EF5-4FFE-A144-0368748FC48B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0640B2BF-1EF5-4FFE-A144-0368748FC48B}.Release|Any CPU.Build.0 = Release|Any CPU + {FC91FFFE-1E0A-4F59-8802-BFF99152AD07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FC91FFFE-1E0A-4F59-8802-BFF99152AD07}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FC91FFFE-1E0A-4F59-8802-BFF99152AD07}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FC91FFFE-1E0A-4F59-8802-BFF99152AD07}.Release|Any CPU.Build.0 = Release|Any CPU + {ADD6205B-67A4-4BA8-8BED-DF7D0E857A6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADD6205B-67A4-4BA8-8BED-DF7D0E857A6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADD6205B-67A4-4BA8-8BED-DF7D0E857A6A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADD6205B-67A4-4BA8-8BED-DF7D0E857A6A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CD7DECEC-F4A0-4EEF-978B-72748414D52A} + EndGlobalSection +EndGlobal diff --git a/.Deprecated/Nevermind/Main.cs b/Nevermind/Main.cs similarity index 100% rename from .Deprecated/Nevermind/Main.cs rename to Nevermind/Main.cs diff --git a/.Deprecated/Nevermind/Nevermind.csproj b/Nevermind/Nevermind.csproj similarity index 100% rename from .Deprecated/Nevermind/Nevermind.csproj rename to Nevermind/Nevermind.csproj diff --git a/.Deprecated/Nevermind/Properties/AssemblyInfo.cs b/Nevermind/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/Nevermind/Properties/AssemblyInfo.cs rename to Nevermind/Properties/AssemblyInfo.cs diff --git a/.Deprecated/Nevermind/README.md b/Nevermind/README.md similarity index 100% rename from .Deprecated/Nevermind/README.md rename to Nevermind/README.md diff --git a/.Deprecated/Nevermind/format.json b/Nevermind/format.json similarity index 100% rename from .Deprecated/Nevermind/format.json rename to Nevermind/format.json diff --git a/.Experimental/OriginShift/Integrations/BTKUI/BtkUiAddon_CAT_OriginShiftMod.cs b/OriginShift/Integrations/BTKUI/BtkUiAddon_CAT_OriginShiftMod.cs similarity index 79% rename from .Experimental/OriginShift/Integrations/BTKUI/BtkUiAddon_CAT_OriginShiftMod.cs rename to OriginShift/Integrations/BTKUI/BtkUiAddon_CAT_OriginShiftMod.cs index cd32e4f..543ea43 100644 --- a/.Experimental/OriginShift/Integrations/BTKUI/BtkUiAddon_CAT_OriginShiftMod.cs +++ b/OriginShift/Integrations/BTKUI/BtkUiAddon_CAT_OriginShiftMod.cs @@ -4,19 +4,19 @@ using BTKUILib.UIObjects; using BTKUILib.UIObjects.Components; using NAK.OriginShift; -namespace NAK.OriginShiftMod.Integrations; - -public static partial class BtkUiAddon +namespace NAK.OriginShiftMod.Integrations { - private static Category _ourCategory; - - private static Button _ourMainButton; - private static bool _isForcedMode; - - private static ToggleButton _ourToggle; - - private static void Setup_OriginShiftModCategory(Page page) + public static partial class BtkUiAddon { + private static Category _ourCategory; + + private static Button _ourMainButton; + private static bool _isForcedMode; + + private static ToggleButton _ourToggle; + + private static void Setup_OriginShiftModCategory(Page page) + { // dear category _ourCategory = page.AddCategory(ModSettings.OSM_SettingsCategory, ModSettings.ModName, true, true, false); @@ -38,21 +38,21 @@ public static partial class BtkUiAddon debugToggle.OnValueUpdated += OnDebugToggle; } - #region Category Actions + #region Category Actions - private static void UpdateCategoryModUserCount() - { + private static void UpdateCategoryModUserCount() + { int modUsers = 1; // we are always here :3 int playerCount = CVRPlayerManager.Instance.NetworkPlayers.Count + 1; // +1 for us :3 _ourCategory.CategoryName = $"{ModSettings.OSM_SettingsCategory} ({modUsers}/{playerCount})"; } - #endregion Category Actions + #endregion Category Actions - #region Button Actions + #region Button Actions - private static void SetButtonState(OriginShiftManager.OriginShiftState state) - { + private static void SetButtonState(OriginShiftManager.OriginShiftState state) + { switch (state) { default: @@ -74,8 +74,8 @@ public static partial class BtkUiAddon } } - private static void OnMainButtonClick() - { + private static void OnMainButtonClick() + { // if active, return as world is using Origin Shift if (OriginShiftManager.Instance.CurrentState is OriginShiftManager.OriginShiftState.Active) @@ -97,19 +97,19 @@ public static partial class BtkUiAddon } } - private static void OnOriginShiftStateChanged(OriginShiftManager.OriginShiftState state) - { + private static void OnOriginShiftStateChanged(OriginShiftManager.OriginShiftState state) + { _isForcedMode = state == OriginShiftManager.OriginShiftState.Forced; SetButtonState(state); SetToggleLocked(_isForcedMode); } - #endregion Button Actions + #endregion Button Actions - #region Toggle Actions + #region Toggle Actions - private static void SetToggleLocked(bool value) - { + private static void SetToggleLocked(bool value) + { if (value) { // lock the toggle @@ -126,19 +126,20 @@ public static partial class BtkUiAddon } } - private static void OnCompatibilityModeToggle(bool value) - { + private static void OnCompatibilityModeToggle(bool value) + { ModSettings.EntryCompatibilityMode.Value = value; } - #endregion Toggle Actions + #endregion Toggle Actions - #region Debug Toggle Actions + #region Debug Toggle Actions - private static void OnDebugToggle(bool value) - { + private static void OnDebugToggle(bool value) + { OriginShiftManager.Instance.ToggleDebugOverlay(value); } - #endregion Debug Toggle Actions + #endregion Debug Toggle Actions + } } \ No newline at end of file diff --git a/.Experimental/OriginShift/Integrations/BTKUI/BtkuiAddon.cs b/OriginShift/Integrations/BTKUI/BtkuiAddon.cs similarity index 68% rename from .Experimental/OriginShift/Integrations/BTKUI/BtkuiAddon.cs rename to OriginShift/Integrations/BTKUI/BtkuiAddon.cs index f980330..aa64098 100644 --- a/.Experimental/OriginShift/Integrations/BTKUI/BtkuiAddon.cs +++ b/OriginShift/Integrations/BTKUI/BtkuiAddon.cs @@ -3,23 +3,23 @@ using BTKUILib; using BTKUILib.UIObjects; using NAK.OriginShift; -namespace NAK.OriginShiftMod.Integrations; - -public static partial class BtkUiAddon +namespace NAK.OriginShiftMod.Integrations { - private static Page _miscTabPage; - private static string _miscTabElementID; - - public static void Initialize() + public static partial class BtkUiAddon { + private static Page _miscTabPage; + private static string _miscTabElementID; + + public static void Initialize() + { Prepare_Icons(); Setup_OriginShiftTab(); } - #region Initialization + #region Initialization - private static void Prepare_Icons() - { + private static void Prepare_Icons() + { QuickMenuAPI.PrepareIcon(ModSettings.ModName, "OriginShift-Icon-Active", GetIconStream("OriginShift-Icon-Active.png")); @@ -30,8 +30,8 @@ public static partial class BtkUiAddon GetIconStream("OriginShift-Icon-Forced.png")); } - private static void Setup_OriginShiftTab() - { + private static void Setup_OriginShiftTab() + { _miscTabPage = QuickMenuAPI.MiscTabPage; _miscTabElementID = _miscTabPage.ElementID; QuickMenuAPI.UserJoin += OnUserJoinLeave; @@ -51,15 +51,16 @@ public static partial class BtkUiAddon // Setup_DebugOptionsCategory(_miscTabPage); } - #endregion + #endregion - #region Player Count Display + #region Player Count Display - private static void OnWorldLeave() - => UpdateCategoryModUserCount(); + private static void OnWorldLeave() + => UpdateCategoryModUserCount(); - private static void OnUserJoinLeave(CVRPlayerEntity _) - => UpdateCategoryModUserCount(); + private static void OnUserJoinLeave(CVRPlayerEntity _) + => UpdateCategoryModUserCount(); - #endregion -} \ No newline at end of file + #endregion + } +} diff --git a/.Experimental/OriginShift/Integrations/BTKUI/BtkuiAddon_Utils.cs b/OriginShift/Integrations/BTKUI/BtkuiAddon_Utils.cs similarity index 58% rename from .Experimental/OriginShift/Integrations/BTKUI/BtkuiAddon_Utils.cs rename to OriginShift/Integrations/BTKUI/BtkuiAddon_Utils.cs index 823d41f..a5cec73 100644 --- a/.Experimental/OriginShift/Integrations/BTKUI/BtkuiAddon_Utils.cs +++ b/OriginShift/Integrations/BTKUI/BtkuiAddon_Utils.cs @@ -5,59 +5,60 @@ using BTKUILib.UIObjects.Components; using MelonLoader; using UnityEngine; -namespace NAK.OriginShiftMod.Integrations; - -public static partial class BtkUiAddon +namespace NAK.OriginShiftMod.Integrations { - #region Melon Preference Helpers - - private static ToggleButton AddMelonToggle(ref Category category, MelonPreferences_Entry entry) + public static partial class BtkUiAddon { + #region Melon Preference Helpers + + private static ToggleButton AddMelonToggle(ref Category category, MelonPreferences_Entry entry) + { ToggleButton toggle = category.AddToggle(entry.DisplayName, entry.Description, entry.Value); toggle.OnValueUpdated += b => entry.Value = b; return toggle; } - private static SliderFloat AddMelonSlider(ref Category category, MelonPreferences_Entry entry, float min, - float max, int decimalPlaces = 2, bool allowReset = true) - { + private static SliderFloat AddMelonSlider(ref Category category, MelonPreferences_Entry entry, float min, + float max, int decimalPlaces = 2, bool allowReset = true) + { SliderFloat slider = category.AddSlider(entry.DisplayName, entry.Description, Mathf.Clamp(entry.Value, min, max), min, max, decimalPlaces, entry.DefaultValue, allowReset); slider.OnValueUpdated += f => entry.Value = f; return slider; } - private static Button AddMelonStringInput(ref Category category, MelonPreferences_Entry entry, string buttonIcon = "", ButtonStyle buttonStyle = ButtonStyle.TextOnly) - { + private static Button AddMelonStringInput(ref Category category, MelonPreferences_Entry entry, string buttonIcon = "", ButtonStyle buttonStyle = ButtonStyle.TextOnly) + { Button button = category.AddButton(entry.DisplayName, buttonIcon, entry.Description, buttonStyle); button.OnPress += () => QuickMenuAPI.OpenKeyboard(entry.Value, s => entry.Value = s); return button; } - private static Button AddMelonNumberInput(ref Category category, MelonPreferences_Entry entry, string buttonIcon = "", ButtonStyle buttonStyle = ButtonStyle.TextOnly) - { + private static Button AddMelonNumberInput(ref Category category, MelonPreferences_Entry entry, string buttonIcon = "", ButtonStyle buttonStyle = ButtonStyle.TextOnly) + { Button button = category.AddButton(entry.DisplayName, buttonIcon, entry.Description, buttonStyle); button.OnPress += () => QuickMenuAPI.OpenNumberInput(entry.DisplayName, entry.Value, f => entry.Value = f); return button; } - private static Category AddMelonCategory(ref Page page, MelonPreferences_Entry entry, bool showHeader = true) - { + private static Category AddMelonCategory(ref Page page, MelonPreferences_Entry entry, bool showHeader = true) + { Category category = page.AddCategory(entry.DisplayName, showHeader, true, entry.Value); category.OnCollapse += b => entry.Value = b; return category; } - #endregion Melon Preference Helpers + #endregion Melon Preference Helpers - #region Icon Utils + #region Icon Utils - private static Stream GetIconStream(string iconName) - { + private static Stream GetIconStream(string iconName) + { Assembly assembly = Assembly.GetExecutingAssembly(); string assemblyName = assembly.GetName().Name; return assembly.GetManifestResourceStream($"{assemblyName}.Resources.{iconName}"); } - #endregion Icon Utils + #endregion Icon Utils + } } \ No newline at end of file diff --git a/.Experimental/OriginShift/Integrations/Ragdoll/RagdollAddon.cs b/OriginShift/Integrations/Ragdoll/RagdollAddon.cs similarity index 100% rename from .Experimental/OriginShift/Integrations/Ragdoll/RagdollAddon.cs rename to OriginShift/Integrations/Ragdoll/RagdollAddon.cs diff --git a/.Experimental/OriginShift/Integrations/ThirdPerson/ThirdPersonAddon.cs b/OriginShift/Integrations/ThirdPerson/ThirdPersonAddon.cs similarity index 100% rename from .Experimental/OriginShift/Integrations/ThirdPerson/ThirdPersonAddon.cs rename to OriginShift/Integrations/ThirdPerson/ThirdPersonAddon.cs diff --git a/.Experimental/OriginShift/Main.cs b/OriginShift/Main.cs similarity index 100% rename from .Experimental/OriginShift/Main.cs rename to OriginShift/Main.cs diff --git a/.Experimental/OriginShift/ModSettings.cs b/OriginShift/ModSettings.cs similarity index 100% rename from .Experimental/OriginShift/ModSettings.cs rename to OriginShift/ModSettings.cs diff --git a/.Experimental/OriginShift/Networking/ModNetwork.cs b/OriginShift/Networking/ModNetwork.cs similarity index 100% rename from .Experimental/OriginShift/Networking/ModNetwork.cs rename to OriginShift/Networking/ModNetwork.cs diff --git a/.Experimental/OriginShift/OriginShift.csproj b/OriginShift/OriginShift.csproj similarity index 100% rename from .Experimental/OriginShift/OriginShift.csproj rename to OriginShift/OriginShift.csproj diff --git a/.Experimental/OriginShift/OriginShift/Components/Chunk/ChunkController.cs b/OriginShift/OriginShift/Components/Chunk/ChunkController.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/Components/Chunk/ChunkController.cs rename to OriginShift/OriginShift/Components/Chunk/ChunkController.cs diff --git a/.Experimental/OriginShift/OriginShift/Components/Chunk/ChunkCreator.cs b/OriginShift/OriginShift/Components/Chunk/ChunkCreator.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/Components/Chunk/ChunkCreator.cs rename to OriginShift/OriginShift/Components/Chunk/ChunkCreator.cs diff --git a/.Experimental/OriginShift/OriginShift/Components/Chunk/ChunkListener.cs b/OriginShift/OriginShift/Components/Chunk/ChunkListener.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/Components/Chunk/ChunkListener.cs rename to OriginShift/OriginShift/Components/Chunk/ChunkListener.cs diff --git a/.Experimental/OriginShift/OriginShift/Components/OriginShiftController.cs b/OriginShift/OriginShift/Components/OriginShiftController.cs similarity index 65% rename from .Experimental/OriginShift/OriginShift/Components/OriginShiftController.cs rename to OriginShift/OriginShift/Components/OriginShiftController.cs index 568409a..70784f3 100644 --- a/.Experimental/OriginShift/OriginShift/Components/OriginShiftController.cs +++ b/OriginShift/OriginShift/Components/OriginShiftController.cs @@ -7,45 +7,45 @@ using NAK.OriginShift.Utility; // Creator Exposed component -namespace NAK.OriginShift.Components; - -public class OriginShiftController : MonoBehaviour +namespace NAK.OriginShift.Components { - public static OriginShiftController Instance { get; private set; } + public class OriginShiftController : MonoBehaviour + { + public static OriginShiftController Instance { get; private set; } - #region Serialized Fields + #region Serialized Fields - [Header("Config / Shift Params")] + [Header("Config / Shift Params")] - [SerializeField] private bool _shiftVertical = true; - [SerializeField] [Range(10, 2500)] private int _shiftThreshold = 15; + [SerializeField] private bool _shiftVertical = true; + [SerializeField] [Range(10, 2500)] private int _shiftThreshold = 15; - [Header("Config / Scene Objects")] + [Header("Config / Scene Objects")] - [SerializeField] private bool _autoMoveSceneRoots = true; - [SerializeField] private Transform[] _toShiftTransforms = Array.Empty(); + [SerializeField] private bool _autoMoveSceneRoots = true; + [SerializeField] private Transform[] _toShiftTransforms = Array.Empty(); - [Header("Config / Additive Objects")] + [Header("Config / Additive Objects")] - [SerializeField] private bool _shiftRemotePlayers = true; - [SerializeField] private bool _shiftSpawnedObjects = true; + [SerializeField] private bool _shiftRemotePlayers = true; + [SerializeField] private bool _shiftSpawnedObjects = true; - #endregion Serialized Fields + #endregion Serialized Fields - #region Internal Fields + #region Internal Fields - internal bool IsForced { get; set; } + internal bool IsForced { get; set; } - #endregion Internal Fields + #endregion Internal Fields #if !UNITY_EDITOR - public static int ORIGIN_SHIFT_THRESHOLD = 15; + public static int ORIGIN_SHIFT_THRESHOLD = 15; - #region Unity Events + #region Unity Events - private void Awake() - { + private void Awake() + { if (Instance != null && Instance != this) { @@ -56,8 +56,8 @@ public class OriginShiftController : MonoBehaviour Instance = this; } - private void Start() - { + private void Start() + { // set threshold (we can not support dynamic threshold change) ORIGIN_SHIFT_THRESHOLD = IsForced ? 1000 : _shiftThreshold; @@ -73,26 +73,26 @@ public class OriginShiftController : MonoBehaviour AnchorAllStaticRenderers(); } - private void OnDestroy() - { + private void OnDestroy() + { OriginShiftManager.OnOriginShifted -= OnOriginShifted; OriginShiftManager.Instance.ResetManager(); } - #endregion Unity Events + #endregion Unity Events - #region Private Methods + #region Private Methods - private void GetAllSceneRootTransforms() - { + private void GetAllSceneRootTransforms() + { Scene scene = gameObject.scene; var sceneRoots = scene.GetRootGameObjects(); _toShiftTransforms = new Transform[sceneRoots.Length + 1]; // +1 for the static batch anchor for (var i = 0; i < sceneRoots.Length; i++) _toShiftTransforms[i] = sceneRoots[i].transform; } - private void AnchorAllStaticRenderers() - { + private void AnchorAllStaticRenderers() + { // create an anchor object at 0,0,0 Transform anchor = new GameObject("NAK.StaticBatchAnchor").transform; anchor.SetPositionAndRotation(Vector3.zero, Quaternion.identity); @@ -113,12 +113,12 @@ public class OriginShiftController : MonoBehaviour } } - #endregion Private Methods + #endregion Private Methods - #region Origin Shift Events + #region Origin Shift Events - private void OnOriginShifted(Vector3 shift) - { + private void OnOriginShifted(Vector3 shift) + { foreach (Transform toShiftTransform in _toShiftTransforms) { if (toShiftTransform == null) continue; // skip nulls @@ -126,7 +126,8 @@ public class OriginShiftController : MonoBehaviour } } - #endregion Origin Shift Events + #endregion Origin Shift Events #endif + } } \ No newline at end of file diff --git a/OriginShift/OriginShift/Components/Receivers/OriginShiftEventReceiver.cs b/OriginShift/OriginShift/Components/Receivers/OriginShiftEventReceiver.cs new file mode 100644 index 0000000..fd329bf --- /dev/null +++ b/OriginShift/OriginShift/Components/Receivers/OriginShiftEventReceiver.cs @@ -0,0 +1,79 @@ +using JetBrains.Annotations; +using UnityEngine; +using UnityEngine.Events; + +#if !UNITY_EDITOR +using ABI_RC.Core.Util.AssetFiltering; +#endif + +namespace NAK.OriginShift.Components +{ + public class OriginShiftEventReceiver : MonoBehaviour + { + #region Serialized Fields + + [SerializeField] private UnityEvent _onOriginShifted = new(); + [SerializeField] private bool _filterChunkBoundary; + [SerializeField] private Vector3 _chunkBoundaryMin = Vector3.zero; + [SerializeField] private Vector3 _chunkBoundaryMax = Vector3.one; + + #endregion Serialized Fields + +#if !UNITY_EDITOR + + #region Private Fields + + private bool _isInitialized; + + #endregion Private Fields + + #region Unity Events + + private void OnEnable() + { + if (!_isInitialized) + { + SharedFilter.SanitizeUnityEvents("OriginShiftEventReceiver", _onOriginShifted); + _isInitialized = true; + } + + OriginShiftManager.OnOriginShifted += HandleOriginShifted; + } + + private void OnDisable() + { + OriginShiftManager.OnOriginShifted -= HandleOriginShifted; + } + + #endregion Unity Events + + #region Origin Shift Events + + private void HandleOriginShifted(Vector3 shift) + { + if (_filterChunkBoundary && !IsWithinChunkBoundary(shift)) + return; + + // wrap user-defined event because the user can't be trusted + try + { + _onOriginShifted.Invoke(); + } + catch (Exception e) + { + OriginShiftMod.Logger.Error("OriginShiftEventReceiver: Exception invoking OnOriginShifted event: " + e, this); + } + } + + private bool IsWithinChunkBoundary(Vector3 shift) + { + return shift.x >= _chunkBoundaryMin.x && shift.x <= _chunkBoundaryMax.x && + shift.y >= _chunkBoundaryMin.y && shift.y <= _chunkBoundaryMax.y && + shift.z >= _chunkBoundaryMin.z && shift.z <= _chunkBoundaryMax.z; + } + + #endregion Origin Shift Events + +#endif + } +} \ No newline at end of file diff --git a/.Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftParticleSystemReceiver.cs b/OriginShift/OriginShift/Components/Receivers/OriginShiftParticleSystemReceiver.cs similarity index 56% rename from .Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftParticleSystemReceiver.cs rename to OriginShift/OriginShift/Components/Receivers/OriginShiftParticleSystemReceiver.cs index c5f4c52..819b351 100644 --- a/.Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftParticleSystemReceiver.cs +++ b/OriginShift/OriginShift/Components/Receivers/OriginShiftParticleSystemReceiver.cs @@ -1,20 +1,20 @@ using UnityEngine; -namespace NAK.OriginShift.Components; - -public class OriginShiftParticleSystemReceiver : MonoBehaviour +namespace NAK.OriginShift.Components { + public class OriginShiftParticleSystemReceiver : MonoBehaviour + { #if !UNITY_EDITOR - // max particles count cause i said so 2 - private static readonly ParticleSystem.Particle[] _tempParticles = new ParticleSystem.Particle[10000]; + // max particles count cause i said so 2 + private static readonly ParticleSystem.Particle[] _tempParticles = new ParticleSystem.Particle[10000]; - private ParticleSystem[] _particleSystems; + private ParticleSystem[] _particleSystems; - #region Unity Events + #region Unity Events - private void Start() - { + private void Start() + { _particleSystems = GetComponentsInChildren(true); if (_particleSystems.Length == 0) { @@ -23,34 +23,35 @@ public class OriginShiftParticleSystemReceiver : MonoBehaviour } } - private void OnEnable() - { + private void OnEnable() + { OriginShiftManager.OnOriginShifted += OnOriginShifted; } - private void OnDisable() - { + private void OnDisable() + { OriginShiftManager.OnOriginShifted -= OnOriginShifted; } - #endregion Unity Events + #endregion Unity Events - #region Origin Shift Events + #region Origin Shift Events - private void OnOriginShifted(Vector3 offset) - { + private void OnOriginShifted(Vector3 offset) + { foreach (ParticleSystem particleSystem in _particleSystems) ShiftParticleSystem(particleSystem, offset); } - private static void ShiftParticleSystem(ParticleSystem particleSystem, Vector3 offset) - { + private static void ShiftParticleSystem(ParticleSystem particleSystem, Vector3 offset) + { int particleCount = particleSystem.GetParticles(_tempParticles); for (int i = 0; i < particleCount; i++) _tempParticles[i].position += offset; particleSystem.SetParticles(_tempParticles, particleCount); } - #endregion Origin Shift Events + #endregion Origin Shift Events #endif + } } \ No newline at end of file diff --git a/.Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftRigidbodyReceiver.cs b/OriginShift/OriginShift/Components/Receivers/OriginShiftRigidbodyReceiver.cs similarity index 56% rename from .Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftRigidbodyReceiver.cs rename to OriginShift/OriginShift/Components/Receivers/OriginShiftRigidbodyReceiver.cs index 7fdc939..ae2ca54 100644 --- a/.Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftRigidbodyReceiver.cs +++ b/OriginShift/OriginShift/Components/Receivers/OriginShiftRigidbodyReceiver.cs @@ -1,17 +1,17 @@ using UnityEngine; -namespace NAK.OriginShift.Components; - -public class OriginShiftRigidbodyReceiver : MonoBehaviour +namespace NAK.OriginShift.Components { + public class OriginShiftRigidbodyReceiver : MonoBehaviour + { #if !UNITY_EDITOR - private Rigidbody _rigidbody; + private Rigidbody _rigidbody; - #region Unity Events + #region Unity Events - private void Start() - { + private void Start() + { _rigidbody = GetComponentInChildren(); if (_rigidbody == null) { @@ -20,26 +20,27 @@ public class OriginShiftRigidbodyReceiver : MonoBehaviour } } - private void OnEnable() - { + private void OnEnable() + { OriginShiftManager.OnOriginShifted += OnOriginShifted; } - private void OnDisable() - { + private void OnDisable() + { OriginShiftManager.OnOriginShifted -= OnOriginShifted; } - #endregion Unity Events + #endregion Unity Events - #region Origin Shift Events + #region Origin Shift Events - private void OnOriginShifted(Vector3 shift) - { + private void OnOriginShifted(Vector3 shift) + { _rigidbody.position += shift; } - #endregion Origin Shift Events + #endregion Origin Shift Events #endif + } } \ No newline at end of file diff --git a/.Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftTrailRendererReceiver.cs b/OriginShift/OriginShift/Components/Receivers/OriginShiftTrailRendererReceiver.cs similarity index 57% rename from .Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftTrailRendererReceiver.cs rename to OriginShift/OriginShift/Components/Receivers/OriginShiftTrailRendererReceiver.cs index 4c3b34d..da1140c 100644 --- a/.Experimental/OriginShift/OriginShift/Components/Receivers/OriginShiftTrailRendererReceiver.cs +++ b/OriginShift/OriginShift/Components/Receivers/OriginShiftTrailRendererReceiver.cs @@ -1,20 +1,20 @@ using UnityEngine; -namespace NAK.OriginShift.Components; - -public class OriginShiftTrailRendererReceiver : MonoBehaviour +namespace NAK.OriginShift.Components { + public class OriginShiftTrailRendererReceiver : MonoBehaviour + { #if !UNITY_EDITOR - // max positions count cause i said so - private static readonly Vector3[] _tempPositions = new Vector3[10000]; + // max positions count cause i said so + private static readonly Vector3[] _tempPositions = new Vector3[10000]; - private TrailRenderer[] _trailRenderers; + private TrailRenderer[] _trailRenderers; - #region Unity Events + #region Unity Events - private void Start() - { + private void Start() + { _trailRenderers = GetComponentsInChildren(true); if (_trailRenderers.Length == 0) { @@ -23,34 +23,35 @@ public class OriginShiftTrailRendererReceiver : MonoBehaviour } } - private void OnEnable() - { + private void OnEnable() + { OriginShiftManager.OnOriginShifted += OnOriginShifted; } - private void OnDisable() - { + private void OnDisable() + { OriginShiftManager.OnOriginShifted -= OnOriginShifted; } - #endregion Unity Events + #endregion Unity Events - #region Origin Shift Events + #region Origin Shift Events - private void OnOriginShifted(Vector3 offset) - { + private void OnOriginShifted(Vector3 offset) + { foreach (TrailRenderer trailRenderer in _trailRenderers) ShiftTrailRenderer(trailRenderer, offset); } - private static void ShiftTrailRenderer(TrailRenderer trailRenderer, Vector3 offset) - { + private static void ShiftTrailRenderer(TrailRenderer trailRenderer, Vector3 offset) + { trailRenderer.GetPositions(_tempPositions); for (var i = 0; i < _tempPositions.Length; i++) _tempPositions[i] += offset; trailRenderer.SetPositions(_tempPositions); } - #endregion Origin Shift Events + #endregion Origin Shift Events #endif + } } \ No newline at end of file diff --git a/OriginShift/OriginShift/Components/Receivers/OriginShiftTransformReceiver.cs b/OriginShift/OriginShift/Components/Receivers/OriginShiftTransformReceiver.cs new file mode 100644 index 0000000..1370e34 --- /dev/null +++ b/OriginShift/OriginShift/Components/Receivers/OriginShiftTransformReceiver.cs @@ -0,0 +1,34 @@ +using UnityEngine; + +namespace NAK.OriginShift.Components +{ + public class OriginShiftTransformReceiver : MonoBehaviour + { +#if !UNITY_EDITOR + + #region Unity Events + + private void OnEnable() + { + OriginShiftManager.OnOriginShifted += OnOriginShifted; + } + + private void OnDisable() + { + OriginShiftManager.OnOriginShifted -= OnOriginShifted; + } + + #endregion Unity Events + + #region Origin Shift Events + + private void OnOriginShifted(Vector3 shift) + { + transform.position += shift; + } + + #endregion Origin Shift Events + +#endif + } +} \ No newline at end of file diff --git a/.Experimental/OriginShift/OriginShift/Extensions/BetterBetterCharacterControllerExtensions.cs b/OriginShift/OriginShift/Extensions/BetterBetterCharacterControllerExtensions.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/Extensions/BetterBetterCharacterControllerExtensions.cs rename to OriginShift/OriginShift/Extensions/BetterBetterCharacterControllerExtensions.cs diff --git a/.Experimental/OriginShift/OriginShift/Extensions/PlayerSetupExtensions.cs b/OriginShift/OriginShift/Extensions/PlayerSetupExtensions.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/Extensions/PlayerSetupExtensions.cs rename to OriginShift/OriginShift/Extensions/PlayerSetupExtensions.cs diff --git a/.Experimental/OriginShift/OriginShift/Hacks/OcclusionCullingHack.cs b/OriginShift/OriginShift/Hacks/OcclusionCullingHack.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/Hacks/OcclusionCullingHack.cs rename to OriginShift/OriginShift/Hacks/OcclusionCullingHack.cs diff --git a/.Experimental/OriginShift/OriginShift/Hacks/OriginShiftOcclusionCullingDisabler.cs b/OriginShift/OriginShift/Hacks/OriginShiftOcclusionCullingDisabler.cs similarity index 54% rename from .Experimental/OriginShift/OriginShift/Hacks/OriginShiftOcclusionCullingDisabler.cs rename to OriginShift/OriginShift/Hacks/OriginShiftOcclusionCullingDisabler.cs index 3fb90f1..2e78a6c 100644 --- a/.Experimental/OriginShift/OriginShift/Hacks/OriginShiftOcclusionCullingDisabler.cs +++ b/OriginShift/OriginShift/Hacks/OriginShiftOcclusionCullingDisabler.cs @@ -1,16 +1,16 @@ using UnityEngine; -namespace NAK.OriginShift.Hacks; - -public class OriginShiftOcclusionCullingDisabler : MonoBehaviour +namespace NAK.OriginShift.Hacks { - private Camera _camera; - private bool _originalCullingState; - - #region Unity Events - - private void Start() + public class OriginShiftOcclusionCullingDisabler : MonoBehaviour { + private Camera _camera; + private bool _originalCullingState; + + #region Unity Events + + private void Start() + { _camera = GetComponent(); if (_camera == null) { @@ -21,24 +21,25 @@ public class OriginShiftOcclusionCullingDisabler : MonoBehaviour _originalCullingState = _camera.useOcclusionCulling; } - private void Awake() // we want to execute even if the component is disabled - { + private void Awake() // we want to execute even if the component is disabled + { OriginShiftManager.OnStateChanged += OnOriginShiftStateChanged; } - private void OnDestroy() - { + private void OnDestroy() + { OriginShiftManager.OnStateChanged -= OnOriginShiftStateChanged; } - #endregion Unity Events + #endregion Unity Events - #region Origin Shift Events + #region Origin Shift Events - private void OnOriginShiftStateChanged(OriginShiftManager.OriginShiftState state) - { + private void OnOriginShiftStateChanged(OriginShiftManager.OriginShiftState state) + { _camera.useOcclusionCulling = state != OriginShiftManager.OriginShiftState.Forced && _originalCullingState; } - #endregion Origin Shift Events + #endregion Origin Shift Events + } } \ No newline at end of file diff --git a/.Experimental/OriginShift/OriginShift/OriginShiftManager.cs b/OriginShift/OriginShift/OriginShiftManager.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/OriginShiftManager.cs rename to OriginShift/OriginShift/OriginShiftManager.cs diff --git a/.Experimental/OriginShift/OriginShift/Player/Dynamics/OriginShiftDbAvatarReceiver.cs b/OriginShift/OriginShift/Player/Dynamics/OriginShiftDbAvatarReceiver.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/Player/Dynamics/OriginShiftDbAvatarReceiver.cs rename to OriginShift/OriginShift/Player/Dynamics/OriginShiftDbAvatarReceiver.cs diff --git a/.Experimental/OriginShift/OriginShift/Player/OriginShiftMonitor.cs b/OriginShift/OriginShift/Player/OriginShiftMonitor.cs similarity index 61% rename from .Experimental/OriginShift/OriginShift/Player/OriginShiftMonitor.cs rename to OriginShift/OriginShift/Player/OriginShiftMonitor.cs index f2157a0..a812e08 100644 --- a/.Experimental/OriginShift/OriginShift/Player/OriginShiftMonitor.cs +++ b/OriginShift/OriginShift/Player/OriginShiftMonitor.cs @@ -9,35 +9,35 @@ using UnityEngine; using ABI_RC.Systems.Movement; #endif -namespace NAK.OriginShift; - -[DefaultExecutionOrder(int.MaxValue)] -public class OriginShiftMonitor : MonoBehaviour +namespace NAK.OriginShift { + [DefaultExecutionOrder(int.MaxValue)] + public class OriginShiftMonitor : MonoBehaviour + { #if !UNITY_EDITOR - private PlayerSetup _playerSetup; - private BetterBetterCharacterController _characterController; + private PlayerSetup _playerSetup; + private BetterBetterCharacterController _characterController; #endif - #region Unity Events + #region Unity Events - private void Start() - { + private void Start() + { #if !UNITY_EDITOR - _playerSetup = GetComponent(); - _characterController = GetComponent(); + _playerSetup = GetComponent(); + _characterController = GetComponent(); #endif - OriginShiftManager.OnPostOriginShifted += OnPostOriginShifted; - } + OriginShiftManager.OnPostOriginShifted += OnPostOriginShifted; + } - private void OnDestroy() - { + private void OnDestroy() + { OriginShiftManager.OnPostOriginShifted -= OnPostOriginShifted; StopAllCoroutines(); } - private void Update() - { + private void Update() + { // in CVR use GetPlayerPosition to account for VR offset Vector3 position = PlayerSetup.Instance.GetPlayerPosition(); @@ -56,20 +56,21 @@ public class OriginShiftMonitor : MonoBehaviour OriginShiftManager.Instance.ShiftOrigin(position); } - #endregion Unity Events + #endregion Unity Events - #region Origin Shift Events + #region Origin Shift Events - private void OnPostOriginShifted(Vector3 shift) - { + private void OnPostOriginShifted(Vector3 shift) + { #if UNITY_EDITOR // shift our transform back transform.position += shift; #else - _characterController.OffsetBy(shift); - _playerSetup.OffsetAvatarMovementData(shift); + _characterController.OffsetBy(shift); + _playerSetup.OffsetAvatarMovementData(shift); #endif - } + } - #endregion Origin Shift Events + #endregion Origin Shift Events + } } \ No newline at end of file diff --git a/.Experimental/OriginShift/OriginShift/Player/OriginShiftNetIkReceiver.cs b/OriginShift/OriginShift/Player/OriginShiftNetIkReceiver.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/Player/OriginShiftNetIkReceiver.cs rename to OriginShift/OriginShift/Player/OriginShiftNetIkReceiver.cs diff --git a/.Experimental/OriginShift/OriginShift/Player/OriginShiftObjectSyncReceiver.cs b/OriginShift/OriginShift/Player/OriginShiftObjectSyncReceiver.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/Player/OriginShiftObjectSyncReceiver.cs rename to OriginShift/OriginShift/Player/OriginShiftObjectSyncReceiver.cs diff --git a/.Experimental/OriginShift/OriginShift/Player/OriginShiftPickupObjectReceiver.cs b/OriginShift/OriginShift/Player/OriginShiftPickupObjectReceiver.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/Player/OriginShiftPickupObjectReceiver.cs rename to OriginShift/OriginShift/Player/OriginShiftPickupObjectReceiver.cs diff --git a/.Experimental/OriginShift/OriginShift/Player/OriginShiftSpawnableReceiver.cs b/OriginShift/OriginShift/Player/OriginShiftSpawnableReceiver.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/Player/OriginShiftSpawnableReceiver.cs rename to OriginShift/OriginShift/Player/OriginShiftSpawnableReceiver.cs diff --git a/.Experimental/OriginShift/OriginShift/Utility/DebugTextDisplay.cs b/OriginShift/OriginShift/Utility/DebugTextDisplay.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/Utility/DebugTextDisplay.cs rename to OriginShift/OriginShift/Utility/DebugTextDisplay.cs diff --git a/.Experimental/OriginShift/OriginShift/Utility/RendererReflectionUtility.cs b/OriginShift/OriginShift/Utility/RendererReflectionUtility.cs similarity index 100% rename from .Experimental/OriginShift/OriginShift/Utility/RendererReflectionUtility.cs rename to OriginShift/OriginShift/Utility/RendererReflectionUtility.cs diff --git a/.Experimental/OriginShift/Patches.cs b/OriginShift/Patches.cs similarity index 99% rename from .Experimental/OriginShift/Patches.cs rename to OriginShift/Patches.cs index cd61791..8e17cb0 100644 --- a/.Experimental/OriginShift/Patches.cs +++ b/OriginShift/Patches.cs @@ -10,7 +10,6 @@ using ABI_RC.Systems.GameEventSystem; using ABI_RC.Systems.Movement; using ABI.CCK.Components; using DarkRift; -using ECM2; using HarmonyLib; using NAK.OriginShift.Components; using NAK.OriginShift.Hacks; diff --git a/.Experimental/OriginShift/Properties/AssemblyInfo.cs b/OriginShift/Properties/AssemblyInfo.cs similarity index 100% rename from .Experimental/OriginShift/Properties/AssemblyInfo.cs rename to OriginShift/Properties/AssemblyInfo.cs diff --git a/OriginShift/README.md b/OriginShift/README.md new file mode 100644 index 0000000..35bb285 --- /dev/null +++ b/OriginShift/README.md @@ -0,0 +1,52 @@ +# OriginShift + +Experimental mod that allows world origin to be shifted to prevent floating point precision issues. + +## Compromises +- Steam Audio data cannot be shifted. +- NavMesh data cannot be shifted. +- Light Probe data cannot be shifted (until [unity 2022](https://docs.unity3d.com/2022.3/Documentation/Manual/LightProbes-Moving.html)). +- Occlusion Culling data cannot be shifted. + - When using "Forced" mode, occlusion culling is disabled. +- Only 10k trail positions can be shifted per Trail Renderer (artificial limit). +- Only 10k particle positions can be shifted per Particle System (artificial limit). + - Potentially can fix by changing Particle System to Custom Simulation Space ? (untested) +- World Constraints are not shifted. + +## Known Issues +- Mod Network is not yet implemented, so Compatibility Mode is required to play with others. +- Portable Camera drone mode is not yet offset by the world origin shift. +- Chunk threshold past 10 units will break Voice Chat with remote players in some cases (without Compatibility Mode). + - This is because the voice server dictates who can hear who based on distance from each other and the world origin shift messes with that. +- Teleports past 50k units will not work. + - BetterBetterCharacterController prevents teleports past 50k units. +- Magica Cloth. + +## Mod Incompatibilities +- PlayerRagdollMod will freak out when you ragdoll between chunk boundaries. + +## Provided Components +- `OriginShiftController` - World script to configure origin shift. +- `OriginShiftEventReceiver` - Event receiver for OriginShift events. +- `OriginShiftTransformReceiver` - Shifts the transform of the GameObject it is attached to. +- `OriginShiftRigidbodyReceiver` - Shifts the rigidbody of the GameObject it is attached to. +- `OriginShiftTrailRendererReceiver` - Shifts the positions of the Trail Renderer of the GameObject it is attached to. +- `OriginShiftParticleSystemReceiver` - Shifts the positions of the Particle System of the GameObject it is attached to. + +The provided receiver components are automatically added to Props, Players, and Object Syncs. + +## Provided Shader Globals +- `_OriginShiftChunkOffset` - The current amount of chunks offset from the origin. +- `_OriginShiftChunkThreshold` - The size of a chunk in world units. +- `_OriginShiftChunkPosition` - The chunk offset multiplied by the chunk threshold. + +--- + +Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI. +https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games + +> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive. + +> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use. + +> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive. diff --git a/.Experimental/OriginShift/Resources/OriginShift-Icon-Active.png b/OriginShift/Resources/OriginShift-Icon-Active.png similarity index 100% rename from .Experimental/OriginShift/Resources/OriginShift-Icon-Active.png rename to OriginShift/Resources/OriginShift-Icon-Active.png diff --git a/.Experimental/OriginShift/Resources/OriginShift-Icon-Forced.png b/OriginShift/Resources/OriginShift-Icon-Forced.png similarity index 100% rename from .Experimental/OriginShift/Resources/OriginShift-Icon-Forced.png rename to OriginShift/Resources/OriginShift-Icon-Forced.png diff --git a/.Experimental/OriginShift/Resources/OriginShift-Icon-Inactive.png b/OriginShift/Resources/OriginShift-Icon-Inactive.png similarity index 100% rename from .Experimental/OriginShift/Resources/OriginShift-Icon-Inactive.png rename to OriginShift/Resources/OriginShift-Icon-Inactive.png diff --git a/OriginShift/format.json b/OriginShift/format.json new file mode 100644 index 0000000..39d8c48 --- /dev/null +++ b/OriginShift/format.json @@ -0,0 +1,23 @@ +{ + "_id": 211, + "name": "RelativeSync", + "modversion": "1.0.3", + "gameversion": "2024r175", + "loaderversion": "0.6.1", + "modtype": "Mod", + "author": "NotAKidoS", + "description": "Relative sync for Movement Parent & Chairs. Requires both users to have the mod installed. Synced over Mod Network.\n\nProvides some Experimental settings to also fix local jitter on movement parents.", + "searchtags": [ + "relative", + "sync", + "movement", + "chair" + ], + "requirements": [ + "None" + ], + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r29/RelativeSync.dll", + "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/RelativeSync/", + "changelog": "- Enabled the Experimental settings to fix **local** jitter on Movement Parents by default\n- Adjusted BBCC No Interpolation fix to account for potential native fix (now respects initial value)", + "embedcolor": "#507e64" +} \ No newline at end of file diff --git a/PathCamDisabler/Properties/AssemblyInfo.cs b/PathCamDisabler/Properties/AssemblyInfo.cs index 8e01437..75cb1f5 100644 --- a/PathCamDisabler/Properties/AssemblyInfo.cs +++ b/PathCamDisabler/Properties/AssemblyInfo.cs @@ -20,13 +20,13 @@ using System.Reflection; [assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] [assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] [assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] -[assembly: MelonColor(255, 246, 25, 99)] // red-pink -[assembly: MelonAuthorColor(255, 158, 21, 32)] // red +[assembly: MelonColor(255, 155, 89, 182)] +[assembly: MelonAuthorColor(255, 158, 21, 32)] [assembly: HarmonyDontPatchAll] namespace NAK.PathCamDisabler.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.3"; + public const string Version = "1.0.2"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/PathCamDisabler/format.json b/PathCamDisabler/format.json index 6a8d8df..0be5676 100644 --- a/PathCamDisabler/format.json +++ b/PathCamDisabler/format.json @@ -1,8 +1,8 @@ { "_id": 110, "name": "PathCamDisabler", - "modversion": "1.0.3", - "gameversion": "2025r179", + "modversion": "1.0.2", + "gameversion": "2023r171", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", @@ -16,8 +16,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/PathCamDisabler.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r16/PathCamDisabler.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/PathCamDisabler/", - "changelog": "- Recompiled for 2025r179", - "embedcolor": "#f61963" + "changelog": "- Fixes for 2023r171.", + "embedcolor": "#9b59b6" } \ No newline at end of file diff --git a/PhysicsGunMod/Components/ObjectSyncBridge.cs b/PhysicsGunMod/Components/ObjectSyncBridge.cs new file mode 100644 index 0000000..fe3c563 --- /dev/null +++ b/PhysicsGunMod/Components/ObjectSyncBridge.cs @@ -0,0 +1,92 @@ +using ABI_RC.Core.Savior; +using ABI_RC.Core.Util; +using ABI.CCK.Components; +using UnityEngine; + +namespace NAK.PhysicsGunMod.Components; + +public class ObjectSyncBridge : MonoBehaviour +{ + private PhysicsGunInteractionBehavior _physicsGun; + + private void Start() + { + // find physics gun + if (!TryGetComponent(out _physicsGun)) + { + PhysicsGunMod.Logger.Msg("Failed to find physics gun!"); + Destroy(this); + return; + } + + // listen for events + _physicsGun.OnPreGrabbedObject = o => + { + bool canTakeOwnership = false; + + // + CVRObjectSync objectSync = o.GetComponentInParent(); + // if (objectSync != null + // && (objectSync.SyncType == 0 // check if physics synced or synced by us + // || objectSync.SyncedByMe)) + // canTakeOwnership = true; + // + CVRSpawnable spawnable = o.GetComponentInParent(); + // if (spawnable != null) + // { + // CVRSyncHelper.PropData propData = CVRSyncHelper.Props.Find(match => match.InstanceId == spawnable.instanceId); + // if (propData != null + // && (propData.syncType == 0 // check if physics synced or synced by us + // || propData.syncedBy == MetaPort.Instance.ownerId)) + // canTakeOwnership = true; + // } + // + CVRPickupObject pickup = o.GetComponentInParent(); + // if (pickup != null + // && (pickup.grabbedBy == MetaPort.Instance.ownerId // check if already grabbed by us + // || pickup.grabbedBy == "" || !pickup.disallowTheft)) // check if not grabbed or allows theft + // canTakeOwnership = true; + // + // if (!canTakeOwnership // if we can't take ownership, don't grab, unless there is no syncing at all (local object) + // && (objectSync || spawnable || pickup )) + // return false; + + if (pickup) + { + pickup.GrabbedBy = MetaPort.Instance.ownerId; + pickup._grabStartTime = Time.time; + } + if (spawnable) spawnable.isPhysicsSynced = true; + if (objectSync) objectSync.isPhysicsSynced = true; + + return true; + }; + + _physicsGun.OnObjectReleased = o => + { + // CVRObjectSync objectSync = o.GetComponentInParent(); + // if (objectSync != null && objectSync.SyncType == 0) + // objectSync.isPhysicsSynced = false; + // + // CVRSpawnable spawnable = o.GetComponentInParent(); + // if (spawnable != null) + // { + // CVRSyncHelper.PropData propData = CVRSyncHelper.Props.Find(match => match.InstanceId == spawnable.instanceId); + // if (propData != null && (propData.syncType == 0 || propData.syncedBy == MetaPort.Instance.ownerId)) + // spawnable.isPhysicsSynced = false; + // } + + // CVRPickupObject pickup = o.GetComponentInParent(); + // if (pickup != null && pickup.grabbedBy == MetaPort.Instance.ownerId) + // pickup.grabbedBy = ""; + + return false; + }; + } + + private void OnDestroy() + { + // stop listening for events + _physicsGun.OnObjectGrabbed = null; + } +} \ No newline at end of file diff --git a/PhysicsGunMod/Components/PhysicsGunInteractionBehavior.cs b/PhysicsGunMod/Components/PhysicsGunInteractionBehavior.cs new file mode 100644 index 0000000..bce3321 --- /dev/null +++ b/PhysicsGunMod/Components/PhysicsGunInteractionBehavior.cs @@ -0,0 +1,572 @@ +using ABI_RC.Core.Player; +using ABI_RC.Systems.InputManagement; +using ABI.CCK.Attributes; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.Scripting.APIUpdating; + +/* + * Physics Gun script from repository - https://github.com/Laumania/Unity3d-PhysicsGun + * Created by: + * Mads Laumann, https://github.com/laumania + * WarmedxMints, https://github.com/WarmedxMints + * + * Original/initial script "Gravity Gun": https://pastebin.com/w1G8m3dH + * Original author: Jake Perry, reddit.com/user/nandos13 +*/ + +namespace NAK.PhysicsGunMod.Components; + +[CCKWhitelistComponent(spawnable: true)] +public class PhysicsGunInteractionBehavior : MonoBehaviour +{ + public static PhysicsGunInteractionBehavior Instance; + + [Header("LayerMask")] [Tooltip("The layer which the gun can grab objects from")] [SerializeField] + private LayerMask _grabLayer; + + [SerializeField] private Camera _camera; + + [Header("Input Setting")] [Space(10)] public KeyCode Rotate = KeyCode.R; + public KeyCode SnapRotation = KeyCode.LeftShift; + public KeyCode SwitchAxis = KeyCode.Tab; + public KeyCode RotateZ = KeyCode.Space; + public KeyCode RotationSpeedIncrease = KeyCode.LeftControl; + public KeyCode ResetRotation = KeyCode.LeftAlt; + + /// The rigidbody we are currently holding + private Rigidbody _grabbedRigidbody; + + /// The offset vector from the object's position to hit point, in local space + private Vector3 _hitOffsetLocal; + + /// The distance we are holding the object at + private float _currentGrabDistance; + + /// The interpolation state when first grabbed + private RigidbodyInterpolation _initialInterpolationSetting; + + /// The difference between player & object rotation, updated when picked up or when rotated by the player + private Quaternion _rotationDifference; + + /// The start point for the Laser. This will typically be on the end of the gun + [SerializeField] private Transform _laserStartPoint; + + /// Tracks player input to rotate current object. Used and reset every fixedupdate call + private Vector3 _rotationInput = Vector3.zero; + + [Header("Rotation Settings")] [Tooltip("Transform of the player, that rotations should be relative to")] + public Transform PlayerTransform; + + [SerializeField] private float _rotationSenstivity = 10f; + + public float SnapRotationDegrees = 45f; + [SerializeField] private float _snappedRotationSens = 25f; + [SerializeField] private float _rotationSpeed = 10f; + + private Quaternion _desiredRotation = Quaternion.identity; + + [SerializeField] [Tooltip("Input values above this will be considered and intentional change in rotation")] + private float _rotationTollerance = 0.8f; + + private bool m_UserRotation; + + public bool UserRotation + { + get => m_UserRotation; + private set + { + if (m_UserRotation == value) + return; + + m_UserRotation = value; + OnRotation?.Invoke(value); + } + } + + private bool m_SnapRotation; + + private bool _snapRotation + { + get => m_SnapRotation; + set + { + if (m_SnapRotation == value) + return; + + m_SnapRotation = value; + OnRotationSnapped?.Invoke(value); + } + } + + private bool m_RotationAxis; + + private bool _rotationAxis + { + get => m_RotationAxis; + set + { + if (m_RotationAxis == value) + return; + + m_RotationAxis = value; + OnAxisChanged?.Invoke(value); + } + } + + private Vector3 _lockedRot; + + private Vector3 _forward; + private Vector3 _up; + private Vector3 _right; + + //ScrollWheel ObjectMovement + private Vector3 _scrollWheelInput = Vector3.zero; + + [Header("Scroll Wheel Object Movement")] [Space(5)] [SerializeField] + private float _scrollWheelSensitivity = 5f; + + [SerializeField] [Tooltip("The min distance the object can be from the player")] + private float _minObjectDistance = 2.5f; + + /// The maximum distance at which a new object can be picked up + [SerializeField] [Tooltip("The maximum distance at which a new object can be picked up")] + private float _maxGrabDistance = 50f; + + private bool _distanceChanged; + + //Vector3.Zero and Vector2.zero create a new Vector3 each time they are called so these simply save that process and a small amount of cpu runtime. + private readonly Vector3 _zeroVector3 = Vector3.zero; + private readonly Vector3 _oneVector3 = Vector3.one; + private readonly Vector3 _zeroVector2 = Vector2.zero; + + private bool _justReleased; + private bool _wasKinematic; + + [Serializable] + public class BoolEvent : UnityEvent {} + + [Serializable] + public class GrabEvent : UnityEvent {} + + [Header("Events")] [Space(10)] + public BoolEvent OnRotation; + public BoolEvent OnRotationSnapped; + public BoolEvent OnAxisChanged; + + public GrabEvent OnObjectGrabbed; + public Func OnObjectReleased; + + // pre event for OnPreGrabbedObject, return false to cancel grab + public Func OnPreGrabbedObject; + // public Action OnGrabbedObject; + + //public properties for the Axis Arrows. These are optional and can be safely removed + // public Vector3 CurrentForward => _forward; + // public Vector3 CurrentUp => _up; + // public Vector3 CurrentRight => _right; + + /// The transfor of the rigidbody we are holding + public Transform CurrentGrabbedTransform { get; private set; } + + //public properties for the Line Renderer + public Vector3 StartPoint { get; private set; } + public Vector3 MidPoint { get; private set; } + public Vector3 EndPoint { get; private set; } + + private void Start() + { + if (Instance != null + && Instance != this) + { + Destroy(this); + return; + } + Instance = this; + gameObject.AddComponent(); + + _camera = PlayerSetup.Instance.GetActiveCamera().GetComponent(); + PlayerTransform = PlayerSetup.Instance.transform; // TODO: this might be fucked in VR + } + + private void OnDestroy() + { + if (Instance == this) + Instance = null; + } + + private void Update() + { + if (!Input.GetMouseButton(0)) + { + // We are not holding the mouse button. Release the object and return before checking for a new one + if (_grabbedRigidbody != null) ReleaseObject(); + + _justReleased = false; + return; + } + + if (_grabbedRigidbody == null && !_justReleased) + { + // We are not holding an object, look for one to pick up + Ray ray = CenterRay(); + RaycastHit hit; + + //Just so These aren't included in a build +#if UNITY_EDITOR + Debug.DrawRay(ray.origin, ray.direction * _maxGrabDistance, Color.blue, 0.01f); +#endif + if (Physics.Raycast(ray, out hit, _maxGrabDistance, _grabLayer)) + // Don't pick up kinematic rigidbodies (they can't move) + if (hit.rigidbody != null /*&& !hit.rigidbody.isKinematic*/) + { + // Check if we are allowed to pick up this object + if (OnPreGrabbedObject != null + && !OnPreGrabbedObject(hit.rigidbody.gameObject)) + return; + + // Track rigidbody's initial information + _grabbedRigidbody = hit.rigidbody; + _wasKinematic = _grabbedRigidbody.isKinematic; + _grabbedRigidbody.isKinematic = false; + _grabbedRigidbody.freezeRotation = true; + _initialInterpolationSetting = _grabbedRigidbody.interpolation; + _rotationDifference = Quaternion.Inverse(PlayerTransform.rotation) * _grabbedRigidbody.rotation; + _hitOffsetLocal = hit.transform.InverseTransformVector(hit.point - hit.transform.position); + _currentGrabDistance = hit.distance; // Vector3.Distance(ray.origin, hit.point); + CurrentGrabbedTransform = _grabbedRigidbody.transform; + // Set rigidbody's interpolation for proper collision detection when being moved by the player + _grabbedRigidbody.interpolation = RigidbodyInterpolation.Interpolate; + + OnObjectGrabbed?.Invoke(_grabbedRigidbody.gameObject); + +#if UNITY_EDITOR + Debug.DrawRay(hit.point, hit.normal * 10f, Color.red, 10f); +#endif + } + } + else if (_grabbedRigidbody != null) + { + UserRotation = Input.GetKey(Rotate); + + if (Input.GetKeyDown(Rotate)) + _desiredRotation = _grabbedRigidbody.rotation; + + if (Input.GetKey(ResetRotation)) + { + _desiredRotation = Quaternion.identity; + } + + // We are already holding an object, listen for rotation input + if (Input.GetKey(Rotate)) + { + var rotateZ = Input.GetKey(RotateZ); + + var increaseSens = Input.GetKey(RotationSpeedIncrease) ? 2.5f : 1f; + + if (Input.GetKeyDown(SwitchAxis)) + { + _rotationAxis = !_rotationAxis; + + OnAxisChanged?.Invoke(_rotationAxis); + } + + //Snap Object nearest _snapRotationDegrees + if (Input.GetKeyDown(SnapRotation)) + { + _snapRotation = true; + + Vector3 newRot = _grabbedRigidbody.transform.rotation.eulerAngles; + + newRot.x = Mathf.Round(newRot.x / SnapRotationDegrees) * SnapRotationDegrees; + newRot.y = Mathf.Round(newRot.y / SnapRotationDegrees) * SnapRotationDegrees; + newRot.z = Mathf.Round(newRot.z / SnapRotationDegrees) * SnapRotationDegrees; + + Quaternion rot = Quaternion.Euler(newRot); + + _desiredRotation = rot; + //_grabbedRigidbody.MoveRotation(rot); + } + else if (Input.GetKeyUp(SnapRotation)) + { + _snapRotation = false; + } + + var x = Input.GetAxisRaw("Mouse X"); + var y = Input.GetAxisRaw("Mouse Y"); + + if (Mathf.Abs(x) > _rotationTollerance) + { + _rotationInput.x = rotateZ ? 0f : x * _rotationSenstivity * increaseSens; + _rotationInput.z = rotateZ ? x * _rotationSenstivity * increaseSens : 0f; + } + + if (Mathf.Abs(y) > _rotationTollerance) _rotationInput.y = y * _rotationSenstivity * increaseSens; + } + else + { + _snapRotation = false; + } + + var direction = Input.GetAxis("Mouse ScrollWheel"); + + //Optional Keyboard inputs + if (Input.GetKeyDown(KeyCode.T)) + direction = -0.1f; + else if (Input.GetKeyDown(KeyCode.G)) + direction = 0.1f; + + if (Mathf.Abs(direction) > 0 && CheckObjectDistance(direction)) + { + _distanceChanged = true; + _scrollWheelInput = PlayerTransform.forward * (_scrollWheelSensitivity * direction); + } + else + { + _scrollWheelInput = _zeroVector3; + } + + if (Input.GetMouseButtonDown(1)) + { + //To prevent warnings in the inpector + _grabbedRigidbody.collisionDetectionMode = !_wasKinematic + ? CollisionDetectionMode.ContinuousSpeculative + : CollisionDetectionMode.Continuous; + _grabbedRigidbody.isKinematic = _wasKinematic = !_wasKinematic; + + _justReleased = true; + ReleaseObject(); + } + } + } + + private void FixedUpdate() + { + if (_grabbedRigidbody) + { + // We are holding an object, time to rotate & move it + Ray ray = CenterRay(); + + UpdateRotationAxis(); + +#if UNITY_EDITOR + Debug.DrawRay(_grabbedTransform.position, _up * 5f , Color.green); + Debug.DrawRay(_grabbedTransform.position, _right * 5f , Color.red); + Debug.DrawRay(_grabbedTransform.position, _forward * 5f , Color.blue); +#endif + // Apply any intentional rotation input made by the player & clear tracked input + Quaternion intentionalRotation = Quaternion.AngleAxis(_rotationInput.z, _forward) * + Quaternion.AngleAxis(_rotationInput.y, _right) * + Quaternion.AngleAxis(-_rotationInput.x, _up) * _desiredRotation; + Quaternion relativeToPlayerRotation = PlayerTransform.rotation * _rotationDifference; + + if (UserRotation && _snapRotation) + { + //Add mouse movement to vector so we can measure the amount of movement + _lockedRot += _rotationInput; + + //If the mouse has moved far enough to rotate the snapped object + if (Mathf.Abs(_lockedRot.x) > _snappedRotationSens || Mathf.Abs(_lockedRot.y) > _snappedRotationSens || + Mathf.Abs(_lockedRot.z) > _snappedRotationSens) + { + for (var i = 0; i < 3; i++) + if (_lockedRot[i] > _snappedRotationSens) + _lockedRot[i] += SnapRotationDegrees; + else if (_lockedRot[i] < -_snappedRotationSens) + _lockedRot[i] += -SnapRotationDegrees; + else + _lockedRot[i] = 0; + + Quaternion q = Quaternion.AngleAxis(-_lockedRot.x, _up) * + Quaternion.AngleAxis(_lockedRot.y, _right) * + Quaternion.AngleAxis(_lockedRot.z, _forward) * _desiredRotation; + + Vector3 newRot = q.eulerAngles; + + newRot.x = Mathf.Round(newRot.x / SnapRotationDegrees) * SnapRotationDegrees; + newRot.y = Mathf.Round(newRot.y / SnapRotationDegrees) * SnapRotationDegrees; + newRot.z = Mathf.Round(newRot.z / SnapRotationDegrees) * SnapRotationDegrees; + + _desiredRotation = Quaternion.Euler(newRot); + + _lockedRot = _zeroVector2; + } + } + else + { + //Rotate the object to remain consistent with any changes in player's rotation + _desiredRotation = UserRotation ? intentionalRotation : relativeToPlayerRotation; + } + + // Remove all torque, reset rotation input & store the rotation difference for next FixedUpdate call + _grabbedRigidbody.angularVelocity = _zeroVector3; + _rotationInput = _zeroVector2; + _rotationDifference = Quaternion.Inverse(PlayerTransform.rotation) * _desiredRotation; + + // Calculate object's center position based on the offset we stored + // NOTE: We need to convert the local-space point back to world coordinates + // Get the destination point for the point on the object we grabbed + Vector3 holdPoint = ray.GetPoint(_currentGrabDistance) + _scrollWheelInput; + Vector3 centerDestination = holdPoint - CurrentGrabbedTransform.TransformVector(_hitOffsetLocal); + +#if UNITY_EDITOR + Debug.DrawLine(ray.origin, holdPoint, Color.blue, Time.fixedDeltaTime); +#endif + // Find vector from current position to destination + Vector3 toDestination = centerDestination - CurrentGrabbedTransform.position; + + // Calculate force + Vector3 force = toDestination / Time.fixedDeltaTime * 0.3f/* / _grabbedRigidbody.mass*/; + + //force += _scrollWheelInput; + // Remove any existing velocity and add force to move to final position + _grabbedRigidbody.velocity = _zeroVector3; + _grabbedRigidbody.AddForce(force, ForceMode.VelocityChange); + + //Rotate object + RotateGrabbedObject(); + + //We need to recalculte the grabbed distance as the object distance from the player has been changed + if (_distanceChanged) + { + _distanceChanged = false; + _currentGrabDistance = Vector3.Distance(ray.origin, holdPoint); + } + + //Update public properties + StartPoint = _laserStartPoint.transform.position; + MidPoint = holdPoint; + EndPoint = CurrentGrabbedTransform.TransformPoint(_hitOffsetLocal); + } + } + + private void RotateGrabbedObject() + { + if (_grabbedRigidbody == null) + return; + + // lerp to desired rotation + _grabbedRigidbody.MoveRotation(Quaternion.Lerp(_grabbedRigidbody.rotation, _desiredRotation, + Time.fixedDeltaTime * _rotationSpeed)); + } + + //Update Rotation axis based on movement + private void UpdateRotationAxis() + { + if (!_snapRotation) + { + _forward = PlayerTransform.forward; + _right = PlayerTransform.right; + _up = PlayerTransform.up; + + return; + } + + if (_rotationAxis) + { + _forward = CurrentGrabbedTransform.forward; + _right = CurrentGrabbedTransform.right; + _up = CurrentGrabbedTransform.up; + + return; + } + + NearestTranformDirection(CurrentGrabbedTransform, PlayerTransform, ref _up, ref _forward, ref _right); + } + + private void NearestTranformDirection(Transform transformToCheck, Transform referenceTransform, ref Vector3 up, + ref Vector3 forward, ref Vector3 right) + { + var directions = new List + { + transformToCheck.forward, + -transformToCheck.forward, + transformToCheck.up, + -transformToCheck.up, + transformToCheck.right, + -transformToCheck.right + }; + + //Find the up Vector + up = GetDirectionVector(directions, referenceTransform.up); + //Remove Vectors from list to prevent duplicates and the opposite vector being found in case where the player is at around a 45 degree angle to the object + directions.Remove(up); + directions.Remove(-up); + //Find the Forward Vector + forward = GetDirectionVector(directions, referenceTransform.forward); + //Remove used directions + directions.Remove(forward); + directions.Remove(-forward); + + right = GetDirectionVector(directions, referenceTransform.right); + } + + private Vector3 GetDirectionVector(List directions, Vector3 direction) + { + var maxDot = -Mathf.Infinity; + Vector3 ret = Vector3.zero; + + for (var i = 0; i < directions.Count; i++) + { + var dot = Vector3.Dot(direction, directions[i]); + + if (dot > maxDot) + { + ret = directions[i]; + maxDot = dot; + } + } + + return ret; + } + + /// Ray from center of the main camera's viewport forward + private Ray CenterRay() + { + return _camera.ViewportPointToRay(_oneVector3 * 0.5f); + } + + //Check distance is within range when moving object with the scroll wheel + private bool CheckObjectDistance(float direction) + { + Vector3 pointA = PlayerTransform.position; + Vector3 pointB = _grabbedRigidbody.position; + + var distance = Vector3.Distance(pointA, pointB); + + if (direction > 0) + return distance <= _maxGrabDistance; + + if (direction < 0) + return distance >= _minObjectDistance; + + return false; + } + + private void ReleaseObject() + { + if (OnObjectReleased != null) + OnObjectReleased(_grabbedRigidbody.gameObject); + + if (_grabbedRigidbody) + { + //Move rotation to desired rotation in case the lerp hasn't finished + //_grabbedRigidbody.MoveRotation(_desiredRotation); + // Reset the rigidbody to how it was before we grabbed it + _grabbedRigidbody.isKinematic = _wasKinematic; + _grabbedRigidbody.interpolation = _initialInterpolationSetting; + _grabbedRigidbody.freezeRotation = false; + _grabbedRigidbody = null; + } + + _scrollWheelInput = _zeroVector3; + CurrentGrabbedTransform = null; + UserRotation = false; + _snapRotation = false; + StartPoint = _zeroVector3; + MidPoint = _zeroVector3; + EndPoint = _zeroVector3; + + OnObjectGrabbed?.Invoke(null); + } +} \ No newline at end of file diff --git a/PhysicsGunMod/HarmonyPatches.cs b/PhysicsGunMod/HarmonyPatches.cs new file mode 100644 index 0000000..73a618c --- /dev/null +++ b/PhysicsGunMod/HarmonyPatches.cs @@ -0,0 +1,20 @@ +using ABI_RC.Systems.InputManagement; +using HarmonyLib; +using NAK.PhysicsGunMod.Components; +using UnityEngine; + +namespace NAK.PhysicsGunMod.HarmonyPatches; + +internal static class CVRInputManagerPatches +{ + [HarmonyPostfix] + [HarmonyPatch(typeof(CVRInputManager), nameof(CVRInputManager.Update))] + private static void Postfix_CVRInputManager_Update(ref CVRInputManager __instance) + { + if (PhysicsGunInteractionBehavior.Instance == null) + return; + + if (PhysicsGunInteractionBehavior.Instance.UserRotation) + __instance.lookVector = Vector2.zero; + } +} diff --git a/PhysicsGunMod/Main.cs b/PhysicsGunMod/Main.cs new file mode 100644 index 0000000..b431ca1 --- /dev/null +++ b/PhysicsGunMod/Main.cs @@ -0,0 +1,43 @@ +using ABI_RC.Core.Util.AssetFiltering; +using MelonLoader; +using NAK.PhysicsGunMod.Components; +using NAK.PhysicsGunMod.HarmonyPatches; + +namespace NAK.PhysicsGunMod; + +public class PhysicsGunMod : MelonMod +{ + internal static MelonLogger.Instance Logger; + + public override void OnInitializeMelon() + { + Logger = LoggerInstance; + + // // add to prop whitelist + // //SharedFilter._spawnableWhitelist.Add(typeof(PhysicsGunInteractionBehavior)); + // + // // add to event whitelist + // SharedFilter._allowedEventComponents.Add(typeof(PhysicsGunInteractionBehavior)); + // SharedFilter._allowedEventFunctions.Add(typeof(PhysicsGunInteractionBehavior), new List + // { + // "set_enabled", + // // TODO: expose more methods like release ? + // }); + + // apply patches + ApplyPatches(typeof(CVRInputManagerPatches)); + } + + private void ApplyPatches(Type type) + { + try + { + HarmonyInstance.PatchAll(type); + } + catch (Exception e) + { + LoggerInstance.Msg($"Failed while patching {type.Name}!"); + LoggerInstance.Error(e); + } + } +} \ No newline at end of file diff --git a/PhysicsGunMod/ModSettings.cs b/PhysicsGunMod/ModSettings.cs new file mode 100644 index 0000000..86e4b48 --- /dev/null +++ b/PhysicsGunMod/ModSettings.cs @@ -0,0 +1,12 @@ +using MelonLoader; + +namespace NAK.PhysicsGunMod; + +internal static class ModSettings +{ + internal const string ModName = nameof(PhysicsGunMod); + internal const string ASM_SettingsCategory = "Physics Gun Mod"; + + private static readonly MelonPreferences_Category Category = + MelonPreferences.CreateCategory(ModName); +} \ No newline at end of file diff --git a/PhysicsGunMod/PhysicsGunMod.csproj b/PhysicsGunMod/PhysicsGunMod.csproj new file mode 100644 index 0000000..22588f8 --- /dev/null +++ b/PhysicsGunMod/PhysicsGunMod.csproj @@ -0,0 +1,37 @@ + + + + + netstandard2.1 + + + + + + + + + + + + + + + + + + + + + + + $(MsBuildThisFileDirectory)\..\.ManagedLibs\BTKUILib.dll + False + + + $(MsBuildThisFileDirectory)\..\.ManagedLibs\ActionMenu.dll + False + + + + \ No newline at end of file diff --git a/.Deprecated/SuperAwesomeMod/Properties/AssemblyInfo.cs b/PhysicsGunMod/Properties/AssemblyInfo.cs similarity index 67% rename from .Deprecated/SuperAwesomeMod/Properties/AssemblyInfo.cs rename to PhysicsGunMod/Properties/AssemblyInfo.cs index f1590e2..df4ffd2 100644 --- a/.Deprecated/SuperAwesomeMod/Properties/AssemblyInfo.cs +++ b/PhysicsGunMod/Properties/AssemblyInfo.cs @@ -1,30 +1,30 @@ using MelonLoader; -using NAK.SuperAwesomeMod.Properties; +using NAK.PhysicsGunMod.Properties; using System.Reflection; [assembly: AssemblyVersion(AssemblyInfoParams.Version)] [assembly: AssemblyFileVersion(AssemblyInfoParams.Version)] [assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyTitle(nameof(NAK.SuperAwesomeMod))] +[assembly: AssemblyTitle(nameof(NAK.PhysicsGunMod))] [assembly: AssemblyCompany(AssemblyInfoParams.Author)] -[assembly: AssemblyProduct(nameof(NAK.SuperAwesomeMod))] +[assembly: AssemblyProduct(nameof(NAK.PhysicsGunMod))] [assembly: MelonInfo( - typeof(NAK.SuperAwesomeMod.SuperAwesomeModMod), - nameof(NAK.SuperAwesomeMod), + typeof(NAK.PhysicsGunMod.PhysicsGunMod), + nameof(NAK.PhysicsGunMod), AssemblyInfoParams.Version, AssemblyInfoParams.Author, - downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/SuperAwesomeMod" + downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/PhysicsGunMod" )] [assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] [assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] [assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] -[assembly: MelonColor(255, 246, 25, 99)] // red-pink -[assembly: MelonAuthorColor(255, 158, 21, 32)] // red +[assembly: MelonColor(255, 241, 200, 82)] +[assembly: MelonAuthorColor(255, 114, 17, 25)] [assembly: HarmonyDontPatchAll] -namespace NAK.SuperAwesomeMod.Properties; +namespace NAK.PhysicsGunMod.Properties; internal static class AssemblyInfoParams { public const string Version = "1.0.0"; diff --git a/PhysicsGunMod/README.md b/PhysicsGunMod/README.md new file mode 100644 index 0000000..eca47c9 --- /dev/null +++ b/PhysicsGunMod/README.md @@ -0,0 +1,28 @@ +# AvatarScaleMod + +Proof of concept mod to add Avatar Scaling to any avatar. This is local-only, but I may toy with using Mod Network. + +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/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/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. + +## Relevant Feedback Posts: +https://feedback.abinteractive.net/p/built-in-avatar-scaling-system + +This mod is me creating the system I wanted when I wrote the above feedback post. + +--- + +Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI. +https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games + +> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive. + +> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use. + +> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive. diff --git a/PhysicsGunMod/format.json b/PhysicsGunMod/format.json new file mode 100644 index 0000000..b1de45e --- /dev/null +++ b/PhysicsGunMod/format.json @@ -0,0 +1,23 @@ +{ + "_id": 126, + "name": "BetterCalibration", + "modversion": "1.0.0", + "gameversion": "2022r173", + "loaderversion": "0.6.1", + "modtype": "Mod", + "author": "NotAKidoS", + "description": "Mod to improve the calibration process for FBT.", + "searchtags": [ + "IK", + "FBT", + "VRIK", + "calibration", + ], + "requirements": [ + "None" + ], + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r3/BetterCalibration.dll", + "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/BetterCalibration/", + "changelog": "", + "embedcolor": "9b59b6" +} \ No newline at end of file diff --git a/PortableCameraAdditions/Properties/AssemblyInfo.cs b/PortableCameraAdditions/Properties/AssemblyInfo.cs index 841c286..44b24ae 100644 --- a/PortableCameraAdditions/Properties/AssemblyInfo.cs +++ b/PortableCameraAdditions/Properties/AssemblyInfo.cs @@ -20,13 +20,13 @@ using System.Reflection; [assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] [assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] [assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] -[assembly: MelonColor(255, 246, 25, 99)] // red-pink -[assembly: MelonAuthorColor(255, 158, 21, 32)] // red +[assembly: MelonColor(255, 255, 217, 106)] +[assembly: MelonAuthorColor(255, 158, 21, 32)] [assembly: HarmonyDontPatchAll] namespace NAK.PortableCameraAdditions.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.6"; + public const string Version = "1.0.5"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/PortableCameraAdditions/format.json b/PortableCameraAdditions/format.json index 957110c..b9b8f25 100644 --- a/PortableCameraAdditions/format.json +++ b/PortableCameraAdditions/format.json @@ -1,8 +1,8 @@ { "_id": 123, "name": "PortableCameraAdditions", - "modversion": "1.0.6", - "gameversion": "2025r179", + "modversion": "1.0.5", + "gameversion": "2023r173", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", @@ -18,8 +18,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/PortableCameraAdditions.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r22/PortableCameraAdditions.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/PortableCameraAdditions/", - "changelog": "- Recompiled for 2025r179", + "changelog": "- Fixes for 2023r173.", "embedcolor": "#ffd96a" } \ No newline at end of file diff --git a/Portals/format.json b/Portals/format.json new file mode 100644 index 0000000..d3c7457 --- /dev/null +++ b/Portals/format.json @@ -0,0 +1 @@ + "None" diff --git a/PropLoadingHexagon/Main.cs b/PropLoadingHexagon/Main.cs index eac818f..aecb7df 100644 --- a/PropLoadingHexagon/Main.cs +++ b/PropLoadingHexagon/Main.cs @@ -50,9 +50,9 @@ public class PropLoadingHexagonMod : MelonMod ); HarmonyInstance.Patch( // delete mode on prop placeholder - typeof(ControllerRay).GetMethod(nameof(ControllerRay.HandleSpawnableClicked), + typeof(ControllerRay).GetMethod(nameof(ControllerRay.DeleteSpawnable), BindingFlags.NonPublic | BindingFlags.Instance), - prefix: new HarmonyMethod(typeof(PropLoadingHexagonMod).GetMethod(nameof(OnHandleSpawnableClicked), + prefix: new HarmonyMethod(typeof(PropLoadingHexagonMod).GetMethod(nameof(OnDeleteSpawnableCheck), BindingFlags.NonPublic | BindingFlags.Static)) ); @@ -185,7 +185,7 @@ public class PropLoadingHexagonMod : MelonMod Loading_Hex_List.Add(loadingHex); } - private static void OnHandleSpawnableClicked(ref ControllerRay __instance) + private static void OnDeleteSpawnableCheck(ref ControllerRay __instance) { if (!__instance._interactDown) return; // not interacted, no need to check diff --git a/PropLoadingHexagon/Properties/AssemblyInfo.cs b/PropLoadingHexagon/Properties/AssemblyInfo.cs index 35e50f1..a423d48 100644 --- a/PropLoadingHexagon/Properties/AssemblyInfo.cs +++ b/PropLoadingHexagon/Properties/AssemblyInfo.cs @@ -22,11 +22,12 @@ using System.Reflection; [assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] [assembly: MelonColor(255, 246, 25, 99)] // red-pink [assembly: MelonAuthorColor(255, 158, 21, 32)] // red +[assembly: MelonOptionalDependencies("TheClapper")] [assembly: HarmonyDontPatchAll] namespace NAK.PropLoadingHexagon.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.1"; + public const string Version = "1.0.0"; public const string Author = "Exterrata & NotAKidoS"; } \ No newline at end of file diff --git a/PropLoadingHexagon/format.json b/PropLoadingHexagon/format.json index 4d12613..541cd73 100644 --- a/PropLoadingHexagon/format.json +++ b/PropLoadingHexagon/format.json @@ -1,8 +1,8 @@ { "_id": 220, "name": "PropLoadingHexagon", - "modversion": "1.0.1", - "gameversion": "2025r179", + "modversion": "1.0.0", + "gameversion": "2024r175", "loaderversion": "0.6.1", "modtype": "Mod", "author": "Exterrata & NotAKidoS", @@ -16,8 +16,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/PropLoadingHexagon.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r34/PropLoadingHexagon.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/PropLoadingHexagon/", - "changelog": "- Fixes for 2025r179", + "changelog": "- Initial release", "embedcolor": "#f61963" } \ No newline at end of file diff --git a/PropUndoButton/Properties/AssemblyInfo.cs b/PropUndoButton/Properties/AssemblyInfo.cs index ca45627..424a9d7 100644 --- a/PropUndoButton/Properties/AssemblyInfo.cs +++ b/PropUndoButton/Properties/AssemblyInfo.cs @@ -20,13 +20,11 @@ using System.Reflection; [assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] [assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] [assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] -[assembly: MelonColor(255, 246, 25, 99)] // red-pink -[assembly: MelonAuthorColor(255, 158, 21, 32)] // red [assembly: HarmonyDontPatchAll] namespace NAK.PropUndoButton.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.3"; + public const string Version = "1.0.2"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/PropUndoButton/format.json b/PropUndoButton/format.json index 32227a9..9f6f07a 100644 --- a/PropUndoButton/format.json +++ b/PropUndoButton/format.json @@ -1,8 +1,8 @@ { "_id": 147, "name": "PropUndoButton", - "modversion": "1.0.3", - "gameversion": "2025r179", + "modversion": "1.0.2", + "gameversion": "2024r175", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", @@ -16,8 +16,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/PropUndoButton.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r25/PropUndoButton.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/PropUndoButton/", - "changelog": "- Recompiled for 2025r179", + "changelog": "- Recompiled for 2024r175", "embedcolor": "#00FFFF" } \ No newline at end of file diff --git a/RCCVirtualSteeringWheel/Patches.cs b/RCCVirtualSteeringWheel/Patches.cs index 1ef3064..b9745d9 100644 --- a/RCCVirtualSteeringWheel/Patches.cs +++ b/RCCVirtualSteeringWheel/Patches.cs @@ -1,5 +1,4 @@ -using ABI_RC.Core.InteractionSystem; -using ABI_RC.Systems.InputManagement; +using ABI_RC.Systems.InputManagement; using ABI_RC.Systems.Movement; using HarmonyLib; using NAK.RCCVirtualSteeringWheel.Util; @@ -40,20 +39,12 @@ internal static class CVRInputManager_Patches [HarmonyPatch(typeof(CVRInputManager), nameof(CVRInputManager.UpdateInput))] private static void Postfix_CVRInputManager_UpdateInput(ref CVRInputManager __instance) { - BetterBetterCharacterController characterController = BetterBetterCharacterController.Instance; - if (!characterController._isSitting) - return; // Must be sitting - - CVRSeat cvrSeat = characterController._lastCvrSeat; - if (!cvrSeat - || !cvrSeat.lockControls) - return; // Must be a driver seat - - RCC_CarControllerV3 carController = characterController._lastCvrSeat._carController; - if (!carController) - return; // Specific to RCC - - if (SteeringWheelRoot.TryGetWheelInput(carController, out float steeringValue)) + // Steering input is clamped in RCC component + if (BetterBetterCharacterController.Instance.IsSittingOnControlSeat() + && SteeringWheelRoot.TryGetWheelInput( + BetterBetterCharacterController.Instance._lastCvrSeat._carController, out float steeringValue)) + { __instance.steering = steeringValue; + } } } \ No newline at end of file diff --git a/RCCVirtualSteeringWheel/Properties/AssemblyInfo.cs b/RCCVirtualSteeringWheel/Properties/AssemblyInfo.cs index 38d7ecc..616aa81 100644 --- a/RCCVirtualSteeringWheel/Properties/AssemblyInfo.cs +++ b/RCCVirtualSteeringWheel/Properties/AssemblyInfo.cs @@ -28,6 +28,6 @@ using NAK.RCCVirtualSteeringWheel.Properties; namespace NAK.RCCVirtualSteeringWheel.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.4"; + public const string Version = "1.0.3"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/RCCVirtualSteeringWheel/RCCVirtualSteeringWheel/Components/SteeringWheelRoot.cs b/RCCVirtualSteeringWheel/RCCVirtualSteeringWheel/Components/SteeringWheelRoot.cs index 088752d..0154bd5 100644 --- a/RCCVirtualSteeringWheel/RCCVirtualSteeringWheel/Components/SteeringWheelRoot.cs +++ b/RCCVirtualSteeringWheel/RCCVirtualSteeringWheel/Components/SteeringWheelRoot.cs @@ -53,7 +53,6 @@ public class SteeringWheelRoot : MonoBehaviour BoxCollider collider = pickup.AddComponent(); collider.size = steeringWheelBounds.size; collider.center = steeringWheelBounds.center; - collider.isTrigger = true; wheelPickup = pickup.AddComponent(); wheelPickup.root = wheel; diff --git a/RCCVirtualSteeringWheel/format.json b/RCCVirtualSteeringWheel/format.json index c1c44c8..438f31f 100644 --- a/RCCVirtualSteeringWheel/format.json +++ b/RCCVirtualSteeringWheel/format.json @@ -1,8 +1,8 @@ { "_id": 248, "name": "RCCVirtualSteeringWheel", - "modversion": "1.0.4", - "gameversion": "2025r179", + "modversion": "1.0.3", + "gameversion": "2025r178", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", @@ -16,8 +16,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/RCCVirtualSteeringWheel.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r45/RCCVirtualSteeringWheel.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/RCCVirtualSteeringWheel/", - "changelog": "- Recompiled for 2025r179\n- Fixed generated steering wheel pickup collider not being marked isTrigger\n- Fixed error spam when sitting in a CVRSeat with lockControls, but no RCC component in parent", + "changelog": "- Fixes for 2025r178", "embedcolor": "#f61963" } \ No newline at end of file diff --git a/.Deprecated/ReconnectionSystemFix/Main.cs b/ReconnectionSystemFix/Main.cs similarity index 100% rename from .Deprecated/ReconnectionSystemFix/Main.cs rename to ReconnectionSystemFix/Main.cs diff --git a/.Deprecated/ReconnectionSystemFix/Patches.cs b/ReconnectionSystemFix/Patches.cs similarity index 100% rename from .Deprecated/ReconnectionSystemFix/Patches.cs rename to ReconnectionSystemFix/Patches.cs diff --git a/.Deprecated/ReconnectionSystemFix/Properties/AssemblyInfo.cs b/ReconnectionSystemFix/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/ReconnectionSystemFix/Properties/AssemblyInfo.cs rename to ReconnectionSystemFix/Properties/AssemblyInfo.cs diff --git a/.Deprecated/ReconnectionSystemFix/README.md b/ReconnectionSystemFix/README.md similarity index 100% rename from .Deprecated/ReconnectionSystemFix/README.md rename to ReconnectionSystemFix/README.md diff --git a/.Deprecated/ReconnectionSystemFix/ReconnectionSystemFix.csproj b/ReconnectionSystemFix/ReconnectionSystemFix.csproj similarity index 100% rename from .Deprecated/ReconnectionSystemFix/ReconnectionSystemFix.csproj rename to ReconnectionSystemFix/ReconnectionSystemFix.csproj diff --git a/.Deprecated/ReconnectionSystemFix/format.json b/ReconnectionSystemFix/format.json similarity index 100% rename from .Deprecated/ReconnectionSystemFix/format.json rename to ReconnectionSystemFix/format.json diff --git a/References.Items.props b/References.Items.props index 69164f3..b618151 100644 --- a/References.Items.props +++ b/References.Items.props @@ -52,10 +52,6 @@ $(MsBuildThisFileDirectory)\.ManagedLibs\Bhaptics.Tact.dll False - - $(MsBuildThisFileDirectory)\.ManagedLibs\BouncyCastle.Crypto.dll - False - $(MsBuildThisFileDirectory)\.ManagedLibs\Boxophobic.TheVehetationEngine.Runtime.dll False @@ -100,10 +96,6 @@ $(MsBuildThisFileDirectory)\.ManagedLibs\DarkRift.dll False - - $(MsBuildThisFileDirectory)\.ManagedLibs\DTLS.Net.dll - False - $(MsBuildThisFileDirectory)\.ManagedLibs\ECM2.dll False @@ -204,18 +196,6 @@ $(MsBuildThisFileDirectory)\.ManagedLibs\PICO.Platform.dll False - - $(MsBuildThisFileDirectory)\.ManagedLibs\Pico.Spatializer.dll - False - - - $(MsBuildThisFileDirectory)\.ManagedLibs\Pico.Spatializer.Example.dll - False - - - $(MsBuildThisFileDirectory)\.ManagedLibs\PICO.TobSupport.dll - False - $(MsBuildThisFileDirectory)\.ManagedLibs\PWCommon3DLL.dll False @@ -312,10 +292,6 @@ $(MsBuildThisFileDirectory)\.ManagedLibs\System.Runtime.Serialization.dll False - - $(MsBuildThisFileDirectory)\.ManagedLibs\System.Security.Cryptography.Cng.dll - False - $(MsBuildThisFileDirectory)\.ManagedLibs\System.Security.dll False @@ -376,10 +352,6 @@ $(MsBuildThisFileDirectory)\.ManagedLibs\UniTask.TextMeshPro.dll False - - $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.2D.Common.Runtime.dll - False - $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.AI.Navigation.dll False @@ -424,14 +396,6 @@ $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.InputSystem.dll False - - $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.InputSystem.ForUI.dll - False - - - $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.InternalAPIEngineBridge.001.dll - False - $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.InternalAPIEngineBridge.002.dll False @@ -620,10 +584,6 @@ $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.Hands.Samples.VisualizerSample.dll False - - $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.Interaction.Toolkit.dll - False - $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.Management.dll False @@ -656,12 +616,16 @@ $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.OpenXR.Features.OculusQuestSupport.dll False + + $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.OpenXR.Features.PICOSupport.dll + False + $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.OpenXR.Features.RuntimeDebugger.dll False - - $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.PICO.dll + + $(MsBuildThisFileDirectory)\.ManagedLibs\Unity.XR.OpenXRPico.dll False diff --git a/RelativeSync/Main.cs b/RelativeSync/Main.cs index 0a50472..83ec331 100644 --- a/RelativeSync/Main.cs +++ b/RelativeSync/Main.cs @@ -17,7 +17,10 @@ public class RelativeSyncMod : MelonMod // Experimental sync hack ApplyPatches(typeof(CVRSpawnablePatches)); - + + // Experimental no interpolation on Better Better Character Controller + ApplyPatches(typeof(BetterBetterCharacterControllerPatches)); + // Send relative sync update after network root data update ApplyPatches(typeof(NetworkRootDataUpdatePatches)); @@ -28,9 +31,6 @@ public class RelativeSyncMod : MelonMod // Add components if missing (for relative sync markers) ApplyPatches(typeof(CVRSeatPatches)); ApplyPatches(typeof(CVRMovementParentPatches)); - - // So we run after the client moves the remote player - ApplyPatches(typeof(NetIKController_Patches)); } private void ApplyPatches(Type type) diff --git a/RelativeSync/ModSettings.cs b/RelativeSync/ModSettings.cs index f8567ad..91a60a7 100644 --- a/RelativeSync/ModSettings.cs +++ b/RelativeSync/ModSettings.cs @@ -23,7 +23,11 @@ internal static class ModSettings private static readonly MelonPreferences_Entry ExpSyncedObjectHack = Category.CreateEntry("ExpSyncedObjectHack", true, "Exp Spawnable Sync Fix", description: "Forces CVRSpawnable to update position in FixedUpdate. May help reduce local jitter on synced movement parents."); - + + private static readonly MelonPreferences_Entry ExpNoInterpolationOnBBCC = + Category.CreateEntry("ExpNoInterpolationOnBBCC", true, + "Exp Disable Interpolation on BBCC", description: "Disable interpolation on Better Better Character Controller. May help reduce local jitter on synced movement parents."); + #endregion Melon Preferences internal static void Initialize() @@ -39,5 +43,6 @@ internal static class ModSettings ModNetwork.Debug_NetworkInbound = DebugLogInbound.Value; ModNetwork.Debug_NetworkOutbound = DebugLogOutbound.Value; Patches.CVRSpawnablePatches.UseHack = ExpSyncedObjectHack.Value; + Patches.BetterBetterCharacterControllerPatches.NoInterpolation = ExpNoInterpolationOnBBCC.Value; } } \ No newline at end of file diff --git a/RelativeSync/Patches.cs b/RelativeSync/Patches.cs index 43937dd..71d4ec8 100644 --- a/RelativeSync/Patches.cs +++ b/RelativeSync/Patches.cs @@ -2,10 +2,12 @@ using ABI_RC.Core.InteractionSystem; using ABI_RC.Core.Networking.Jobs; using ABI_RC.Core.Player; +using ABI_RC.Systems.Movement; using ABI.CCK.Components; using HarmonyLib; using NAK.RelativeSync.Components; using NAK.RelativeSync.Networking; +using UnityEngine; namespace NAK.RelativeSync.Patches; @@ -17,6 +19,7 @@ internal static class PlayerSetupPatches { __instance.AddComponentIfMissing(); } + } internal static class PuppetMasterPatches @@ -27,20 +30,6 @@ internal static class PuppetMasterPatches { __instance.AddComponentIfMissing(); } - - private static bool ShouldProcessAvatarVisibility { get; set; } - - [HarmonyPrefix] - [HarmonyPatch(typeof(PuppetMaster), nameof(PuppetMaster.ProcessAvatarVisibility))] - private static bool Prefix_PuppetMaster_ProcessAvatarVisibility() - => ShouldProcessAvatarVisibility; - - public static void ForceProcessAvatarVisibility(PuppetMaster puppetMaster) - { - ShouldProcessAvatarVisibility = true; - puppetMaster.ProcessAvatarVisibility(); - ShouldProcessAvatarVisibility = false; - } } internal static class CVRSeatPatches @@ -96,24 +85,29 @@ internal static class CVRSpawnablePatches } } -internal static class NetIKController_Patches +internal static class BetterBetterCharacterControllerPatches { - [HarmonyPostfix] - [HarmonyPatch(typeof(NetIKController), nameof(NetIKController.LateUpdate))] - private static void Postfix_NetIKController_LateUpdate(ref NetIKController __instance) + private static bool _noInterpolation; + internal static bool NoInterpolation { - if (!RelativeSyncManager.NetIkControllersToRelativeSyncControllers.TryGetValue(__instance, - out RelativeSyncController syncController)) + get => _noInterpolation; + set { - // Process visibility only after applying network IK - PuppetMasterPatches.ForceProcessAvatarVisibility(__instance._puppetMaster); - return; + _noInterpolation = value; + if (_rigidbody == null) return; + _rigidbody.interpolation = value ? RigidbodyInterpolation.None : _initialInterpolation; } - - // Apply relative sync after the network IK has been applied - syncController.OnPostNetIkControllerLateUpdate(); - - // Process visibility after we have moved the remote player - PuppetMasterPatches.ForceProcessAvatarVisibility(__instance._puppetMaster); + } + + private static Rigidbody _rigidbody; + private static RigidbodyInterpolation _initialInterpolation; + + [HarmonyPostfix] + [HarmonyPatch(typeof(BetterBetterCharacterController), nameof(BetterBetterCharacterController.Start))] + private static void Postfix_BetterBetterCharacterController_Update(ref BetterBetterCharacterController __instance) + { + _rigidbody = __instance.GetComponent(); + _initialInterpolation = _rigidbody.interpolation; + NoInterpolation = _noInterpolation; // get initial value as patch runs later than settings init } } \ No newline at end of file diff --git a/RelativeSync/Properties/AssemblyInfo.cs b/RelativeSync/Properties/AssemblyInfo.cs index ef60248..f014b61 100644 --- a/RelativeSync/Properties/AssemblyInfo.cs +++ b/RelativeSync/Properties/AssemblyInfo.cs @@ -27,6 +27,6 @@ using System.Reflection; namespace NAK.RelativeSync.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.5"; + public const string Version = "1.0.4"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/RelativeSync/RelativeSync/Components/RelativeSyncController.cs b/RelativeSync/RelativeSync/Components/RelativeSyncController.cs index 66af2c7..2e11301 100644 --- a/RelativeSync/RelativeSync/Components/RelativeSyncController.cs +++ b/RelativeSync/RelativeSync/Components/RelativeSyncController.cs @@ -26,29 +26,14 @@ public class RelativeSyncController : MonoBehaviour _userId = puppetMaster._playerDescriptor.ownerId; RelativeSyncManager.RelativeSyncControllers.Add(_userId, this); - RelativeSyncManager.NetIkControllersToRelativeSyncControllers.Add(puppetMaster.netIkController, this); } private void OnDestroy() { RelativeSyncManager.RelativeSyncControllers.Remove(_userId); - - if (puppetMaster == null - || puppetMaster.netIkController == null) - { - // remove by value ? - foreach (var kvp in RelativeSyncManager.NetIkControllersToRelativeSyncControllers) - { - if (kvp.Value != this) continue; - RelativeSyncManager.NetIkControllersToRelativeSyncControllers.Remove(kvp.Key); - break; - } - return; - } - RelativeSyncManager.NetIkControllersToRelativeSyncControllers.Remove(puppetMaster.netIkController); } - internal void OnPostNetIkControllerLateUpdate() + private void LateUpdate() { // if (puppetMaster._isHidden) // return; diff --git a/RelativeSync/RelativeSync/RelativeSyncManager.cs b/RelativeSync/RelativeSync/RelativeSyncManager.cs index 052ca3c..9a532f4 100644 --- a/RelativeSync/RelativeSync/RelativeSyncManager.cs +++ b/RelativeSync/RelativeSync/RelativeSyncManager.cs @@ -11,7 +11,6 @@ public static class RelativeSyncManager public static readonly Dictionary RelativeSyncTransforms = new(); public static readonly Dictionary RelativeSyncControllers = new(); - public static readonly Dictionary NetIkControllersToRelativeSyncControllers = new(); public static void ApplyRelativeSync(string userId, int target, Vector3 position, Vector3 rotation) { diff --git a/RelativeSync/format.json b/RelativeSync/format.json index b917a7d..7b5c456 100644 --- a/RelativeSync/format.json +++ b/RelativeSync/format.json @@ -1,8 +1,8 @@ { "_id": 211, "name": "RelativeSync", - "modversion": "1.0.5", - "gameversion": "2025r179", + "modversion": "1.0.4", + "gameversion": "2024r175", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", @@ -16,8 +16,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/RelativeSync.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r34/RelativeSync.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/RelativeSync/", - "changelog": "- Recompiled for 2025r179\n- Fixed execution order of RelativeSyncController & PuppetMaster.ProcessAvatarVisibility, so moving at high speeds with passengers does not disrupt voice or avatar distance hider", + "changelog": "- Fixed log spam when receiving relative sync data from a blocked user (thanks Mod Network for still forwarding that data -_-)\n- Adjusted execution order to apply relative sync before Totally Wholesomes LineController\n- Adjusted Relative Sync to still apply to avatar distance-hidden users\n- Adjusted Relative Sync to not apply if the CVRSeat or Movement Parent is disabled on receiving client", "embedcolor": "#f61963" } \ No newline at end of file diff --git a/.Experimental/ScriptingSpoofer/Main.cs b/ScriptingSpoofer/Main.cs similarity index 100% rename from .Experimental/ScriptingSpoofer/Main.cs rename to ScriptingSpoofer/Main.cs diff --git a/.Experimental/ScriptingSpoofer/Properties/AssemblyInfo.cs b/ScriptingSpoofer/Properties/AssemblyInfo.cs similarity index 100% rename from .Experimental/ScriptingSpoofer/Properties/AssemblyInfo.cs rename to ScriptingSpoofer/Properties/AssemblyInfo.cs diff --git a/.Experimental/ScriptingSpoofer/README.md b/ScriptingSpoofer/README.md similarity index 100% rename from .Experimental/ScriptingSpoofer/README.md rename to ScriptingSpoofer/README.md diff --git a/.Experimental/ScriptingSpoofer/ScriptingSpoofer.csproj b/ScriptingSpoofer/ScriptingSpoofer.csproj similarity index 100% rename from .Experimental/ScriptingSpoofer/ScriptingSpoofer.csproj rename to ScriptingSpoofer/ScriptingSpoofer.csproj diff --git a/.Experimental/ScriptingSpoofer/format.json b/ScriptingSpoofer/format.json similarity index 100% rename from .Experimental/ScriptingSpoofer/format.json rename to ScriptingSpoofer/format.json diff --git a/ScrollFlight/Main.cs b/ScrollFlight/Main.cs index f2180b8..98fdabd 100644 --- a/ScrollFlight/Main.cs +++ b/ScrollFlight/Main.cs @@ -42,8 +42,8 @@ public class ScrollFlightMod : MelonMod { CVRWorld.GameRulesUpdated += OnApplyMovementSettings; // thank you kafe for using actions } - - private bool wasFlying; + + bool wasFlying = false; // stole from LucMod :3 public override void OnUpdate() @@ -66,7 +66,7 @@ public class ScrollFlightMod : MelonMod wasFlying = isFlying; if (!isFlying - || Input.GetKey(KeyCode.Mouse2) // scroll zoom (TODO: Use CVRInputManager.zoom, but requires fixing zoom toggle mode on client) + || Input.GetKey(KeyCode.Mouse2) // scroll zoom || Input.GetKey(KeyCode.LeftControl) // third person / better interact desktop || Cursor.lockState != CursorLockMode.Locked) // unity explorer / in menu return; diff --git a/ScrollFlight/Properties/AssemblyInfo.cs b/ScrollFlight/Properties/AssemblyInfo.cs index 64e0133..3aeb6cb 100644 --- a/ScrollFlight/Properties/AssemblyInfo.cs +++ b/ScrollFlight/Properties/AssemblyInfo.cs @@ -27,6 +27,6 @@ using System.Reflection; namespace NAK.ScrollFlight.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.3"; + public const string Version = "1.0.1"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/ScrollFlight/format.json b/ScrollFlight/format.json index 3cc60bd..3981ee1 100644 --- a/ScrollFlight/format.json +++ b/ScrollFlight/format.json @@ -1,8 +1,8 @@ { - "_id": 219, + "_id": -1, "name": "ScrollFlight", - "modversion": "1.0.3", - "gameversion": "2025r179", + "modversion": "1.0.0", + "gameversion": "2024r175", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", @@ -16,8 +16,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/ScrollFlight.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r34/ScrollFlight.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/ScrollFlight/", - "changelog": "- Recompiled for 2025r179\n- Added an option to reset flight speed to default on exit flight", + "changelog": "- Initial release", "embedcolor": "#f61963" } \ No newline at end of file diff --git a/.Deprecated/SearchWithSpacesFix/Main.cs b/SearchWithSpacesFix/Main.cs similarity index 100% rename from .Deprecated/SearchWithSpacesFix/Main.cs rename to SearchWithSpacesFix/Main.cs diff --git a/.Deprecated/SearchWithSpacesFix/Properties/AssemblyInfo.cs b/SearchWithSpacesFix/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/SearchWithSpacesFix/Properties/AssemblyInfo.cs rename to SearchWithSpacesFix/Properties/AssemblyInfo.cs diff --git a/.Deprecated/ControlToUnlockMouse/README.md b/SearchWithSpacesFix/README.md similarity index 100% rename from .Deprecated/ControlToUnlockMouse/README.md rename to SearchWithSpacesFix/README.md diff --git a/.Deprecated/SearchWithSpacesFix/SearchWithSpacesFix.csproj b/SearchWithSpacesFix/SearchWithSpacesFix.csproj similarity index 100% rename from .Deprecated/SearchWithSpacesFix/SearchWithSpacesFix.csproj rename to SearchWithSpacesFix/SearchWithSpacesFix.csproj diff --git a/.Deprecated/ControlToUnlockMouse/format.json b/SearchWithSpacesFix/format.json similarity index 100% rename from .Deprecated/ControlToUnlockMouse/format.json rename to SearchWithSpacesFix/format.json diff --git a/.Deprecated/ShadowCloneFallback/Main.cs b/ShadowCloneFallback/Main.cs similarity index 100% rename from .Deprecated/ShadowCloneFallback/Main.cs rename to ShadowCloneFallback/Main.cs diff --git a/.Deprecated/ShadowCloneFallback/Properties/AssemblyInfo.cs b/ShadowCloneFallback/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/ShadowCloneFallback/Properties/AssemblyInfo.cs rename to ShadowCloneFallback/Properties/AssemblyInfo.cs diff --git a/.Deprecated/ShadowCloneFallback/README.md b/ShadowCloneFallback/README.md similarity index 100% rename from .Deprecated/ShadowCloneFallback/README.md rename to ShadowCloneFallback/README.md diff --git a/.Deprecated/ShadowCloneFallback/ShadowCloneFallback.csproj b/ShadowCloneFallback/ShadowCloneFallback.csproj similarity index 100% rename from .Deprecated/ShadowCloneFallback/ShadowCloneFallback.csproj rename to ShadowCloneFallback/ShadowCloneFallback.csproj diff --git a/.Deprecated/ShadowCloneFallback/format.json b/ShadowCloneFallback/format.json similarity index 100% rename from .Deprecated/ShadowCloneFallback/format.json rename to ShadowCloneFallback/format.json diff --git a/ShareBubbles/Patches.cs b/ShareBubbles/Patches.cs index 5f95231..162c75b 100644 --- a/ShareBubbles/Patches.cs +++ b/ShareBubbles/Patches.cs @@ -35,7 +35,7 @@ internal static class PlayerSetup_Patches internal static class ControllerRay_Patches { [HarmonyPostfix] - [HarmonyPatch(typeof(ControllerRay), nameof(ControllerRay.HandleSpawnableClicked))] + [HarmonyPatch(typeof(ControllerRay), nameof(ControllerRay.DeleteSpawnable))] public static void Postfix_ControllerRay_DeleteSpawnable(ref ControllerRay __instance) { if (!__instance._interactDown) diff --git a/ShareBubbles/Properties/AssemblyInfo.cs b/ShareBubbles/Properties/AssemblyInfo.cs index ce8f183..07120d8 100644 --- a/ShareBubbles/Properties/AssemblyInfo.cs +++ b/ShareBubbles/Properties/AssemblyInfo.cs @@ -27,6 +27,6 @@ using NAK.ShareBubbles.Properties; namespace NAK.ShareBubbles.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.5"; + public const string Version = "1.0.4"; public const string Author = "NotAKidoS, Exterrata, Noachi, RaidShadowLily, Tejler"; } \ No newline at end of file diff --git a/ShareBubbles/ShareBubbles/API/PedestalInfoBatchProcessor.cs b/ShareBubbles/ShareBubbles/API/PedestalInfoBatchProcessor.cs index 967734b..00b9f41 100644 --- a/ShareBubbles/ShareBubbles/API/PedestalInfoBatchProcessor.cs +++ b/ShareBubbles/ShareBubbles/API/PedestalInfoBatchProcessor.cs @@ -1,5 +1,4 @@ using ABI_RC.Core.Networking.API; -using ABI_RC.Core.Networking.API.Responses; using NAK.ShareBubbles.API.Responses; namespace NAK.ShareBubbles.API; @@ -20,11 +19,11 @@ public enum PedestalType /// public static class PedestalInfoBatchProcessor { - private static readonly Dictionary>> _pendingRequests + private static readonly Dictionary>> _pendingRequests = new() { - { PedestalType.Avatar, new Dictionary>() }, - { PedestalType.Prop, new Dictionary>() } + { PedestalType.Avatar, new Dictionary>() }, + { PedestalType.Prop, new Dictionary>() } }; private static readonly Dictionary _isBatchProcessing @@ -37,9 +36,9 @@ public static class PedestalInfoBatchProcessor private static readonly object _lock = new(); private const float BATCH_DELAY = 2f; - public static Task QueuePedestalInfoRequest(PedestalType type, string contentId) + public static Task QueuePedestalInfoRequest(PedestalType type, string contentId) { - var tcs = new TaskCompletionSource(); + var tcs = new TaskCompletionSource(); lock (_lock) { @@ -63,12 +62,12 @@ public static class PedestalInfoBatchProcessor await Task.Delay(TimeSpan.FromSeconds(BATCH_DELAY)); List contentIds; - Dictionary> requestBatch; + Dictionary> requestBatch; lock (_lock) { contentIds = _pendingRequests[type].Keys.ToList(); - requestBatch = new Dictionary>(_pendingRequests[type]); + requestBatch = new Dictionary>(_pendingRequests[type]); _pendingRequests[type].Clear(); _isBatchProcessing[type] = false; //ShareBubblesMod.Logger.Msg($"Processing {type} pedestal info batch with {contentIds.Count} items"); @@ -83,7 +82,7 @@ public static class PedestalInfoBatchProcessor _ => throw new ArgumentException($"Unsupported pedestal type: {type}") }; - var response = await ApiConnection.MakeRequest>(operation, contentIds); + var response = await ApiConnection.MakeRequest>(operation, contentIds); if (response?.Data != null) { diff --git a/ShareBubbles/ShareBubbles/API/Responses/PedestalInfoResponse_ButCorrect.cs b/ShareBubbles/ShareBubbles/API/Responses/PedestalInfoResponse_ButCorrect.cs new file mode 100644 index 0000000..4741a34 --- /dev/null +++ b/ShareBubbles/ShareBubbles/API/Responses/PedestalInfoResponse_ButCorrect.cs @@ -0,0 +1,10 @@ +using ABI_RC.Core.Networking.API.Responses; + +namespace NAK.ShareBubbles.API.Responses; + +[Serializable] +public class PedestalInfoResponse_ButCorrect : UgcResponse +{ + public UserDetails User { get; set; } + public bool Published { get; set; } // Client mislabelled this as Permitted, but it's actually Published +} \ No newline at end of file diff --git a/ShareBubbles/ShareBubbles/DataTypes/BubblePedestalInfo.cs b/ShareBubbles/ShareBubbles/DataTypes/BubblePedestalInfo.cs index 87699e4..932fa6c 100644 --- a/ShareBubbles/ShareBubbles/DataTypes/BubblePedestalInfo.cs +++ b/ShareBubbles/ShareBubbles/DataTypes/BubblePedestalInfo.cs @@ -5,6 +5,6 @@ public class BubblePedestalInfo public string Name; public string ImageUrl; public string AuthorId; - public bool IsPermitted; - public bool IsPublic; + public bool IsPermitted; // TODO: awaiting luc to fix not being true for private shared (only true for public) + public bool IsPublic; // TODO: awaiting luc to add } \ No newline at end of file diff --git a/ShareBubbles/ShareBubbles/Implementation/AvatarBubbleImpl.cs b/ShareBubbles/ShareBubbles/Implementation/AvatarBubbleImpl.cs index b79f0c8..60dc79d 100644 --- a/ShareBubbles/ShareBubbles/Implementation/AvatarBubbleImpl.cs +++ b/ShareBubbles/ShareBubbles/Implementation/AvatarBubbleImpl.cs @@ -39,8 +39,10 @@ namespace NAK.ShareBubbles.Impl Name = infoResponse.Name, ImageUrl = infoResponse.ImageUrl, AuthorId = infoResponse.User.Id, - IsPublic = infoResponse.IsPublished, - IsPermitted = infoResponse.Permitted, + IsPublic = infoResponse.Published, + + // Permit access if Public, Owned, or (CANNOT DO PRIVATE & SHARED CAUSE API DOESNT GIVE) + IsPermitted = infoResponse.Published || infoResponse.User.Id == MetaPort.Instance.ownerId, }; downloadedTexture = await ImageCache.GetImageAsync(details.ImageUrl); diff --git a/ShareBubbles/ShareBubbles/Implementation/SpawnableBubbleImpl.cs b/ShareBubbles/ShareBubbles/Implementation/SpawnableBubbleImpl.cs index 813222c..fc29336 100644 --- a/ShareBubbles/ShareBubbles/Implementation/SpawnableBubbleImpl.cs +++ b/ShareBubbles/ShareBubbles/Implementation/SpawnableBubbleImpl.cs @@ -39,8 +39,10 @@ namespace NAK.ShareBubbles.Impl Name = infoResponse.Name, ImageUrl = infoResponse.ImageUrl, AuthorId = infoResponse.User.Id, - IsPublic = infoResponse.IsPublished, - IsPermitted = infoResponse.Permitted, + IsPublic = infoResponse.Published, + + // Permit access if Public, Owned, or (CANNOT DO PRIVATE & SHARED CAUSE API DOESNT GIVE) + IsPermitted = infoResponse.Published || infoResponse.User.Id == MetaPort.Instance.ownerId, }; downloadedTexture = await ImageCache.GetImageAsync(details.ImageUrl); diff --git a/ShareBubbles/format.json b/ShareBubbles/format.json index d2028d6..be28ae9 100644 --- a/ShareBubbles/format.json +++ b/ShareBubbles/format.json @@ -1,8 +1,8 @@ { "_id": 244, "name": "ShareBubbles", - "modversion": "1.0.5", - "gameversion": "2025r179", + "modversion": "1.0.4", + "gameversion": "2025r178", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS, Exterrata, Noachi, RaidShadowLily, Tejler, Luc", @@ -17,8 +17,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/ShareBubbles.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r45/ShareBubbles.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/ShareBubbles/", - "changelog": "- Fixes for 2025r179\n- Fixed Public/Private text on bubble not being correct\n- Fixed bubble displaying as locked or not claimed despite being shared the content if it was private and not owned by you", + "changelog": "- Fixes for 2025r178", "embedcolor": "#f61963" } \ No newline at end of file diff --git a/.Deprecated/SmartReticle/Main.cs b/SmartReticle/Main.cs similarity index 100% rename from .Deprecated/SmartReticle/Main.cs rename to SmartReticle/Main.cs diff --git a/.Deprecated/SmartReticle/Properties/AssemblyInfo.cs b/SmartReticle/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/SmartReticle/Properties/AssemblyInfo.cs rename to SmartReticle/Properties/AssemblyInfo.cs diff --git a/.Deprecated/SmartReticle/README.md b/SmartReticle/README.md similarity index 100% rename from .Deprecated/SmartReticle/README.md rename to SmartReticle/README.md diff --git a/.Deprecated/SmartReticle/SmartReticle.csproj b/SmartReticle/SmartReticle.csproj similarity index 100% rename from .Deprecated/SmartReticle/SmartReticle.csproj rename to SmartReticle/SmartReticle.csproj diff --git a/.Deprecated/SmartReticle/format.json b/SmartReticle/format.json similarity index 100% rename from .Deprecated/SmartReticle/format.json rename to SmartReticle/format.json diff --git a/SmootherRay/Main.cs b/SmootherRay/Main.cs index 1d6d3f4..b1b1056 100644 --- a/SmootherRay/Main.cs +++ b/SmootherRay/Main.cs @@ -39,10 +39,6 @@ public class SmootherRayMod : MelonMod Category.CreateEntry("Small Angle Threshold (6f)", 6f, description: "Angle difference to consider a 'small' movement. The less shaky your hands are, the lower you probably want to set this. This is probably the primary value you want to tweak. Use the slider to adjust the threshold angle. Range: 4 to 15."); - public static readonly MelonPreferences_Entry EntrySmoothWhenHoldingPickup = - Category.CreateEntry("Smooth When Holding Pickup", false, - description: "Enable or disable smoothing when holding a pickup."); - #endregion Melon Preferences #region Melon Events @@ -51,7 +47,7 @@ public class SmootherRayMod : MelonMod { Logger = LoggerInstance; ApplyPatches(typeof(PlayerSetup_Patches)); - ApplyPatches(typeof(ControllerSmoothing_Patches)); + ApplyPatches(typeof(ControllerRay_Patches)); } private void ApplyPatches(Type type) @@ -82,12 +78,12 @@ public class SmootherRayMod : MelonMod } } - internal static class ControllerSmoothing_Patches + internal static class ControllerRay_Patches { // SmootherRay [HarmonyPrefix] - [HarmonyPatch(typeof(ControllerSmoothing), nameof(ControllerSmoothing.OnAppliedPoses))] - private static bool Prefix_ControllerSmoothing_OnAppliedPoses(ref ControllerSmoothing __instance) + [HarmonyPatch(typeof(ControllerRay), nameof(ControllerRay.SmoothRay))] + private static bool Prefix_ControllerRay_SmoothRay(ref ControllerRay __instance) => !EntryEnabled.Value; // SmootherRay method enforces identity local pos when disabled, so we skip it } diff --git a/SmootherRay/Properties/AssemblyInfo.cs b/SmootherRay/Properties/AssemblyInfo.cs index c47196d..57dbe09 100644 --- a/SmootherRay/Properties/AssemblyInfo.cs +++ b/SmootherRay/Properties/AssemblyInfo.cs @@ -25,8 +25,9 @@ using System.Reflection; [assembly: HarmonyDontPatchAll] namespace NAK.SmootherRay.Properties; + internal static class AssemblyInfoParams { - public const string Version = "1.0.7"; + public const string Version = "1.0.5"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/SmootherRay/SmootherRayer.cs b/SmootherRay/SmootherRayer.cs index 6262824..44ef320 100644 --- a/SmootherRay/SmootherRayer.cs +++ b/SmootherRay/SmootherRayer.cs @@ -227,10 +227,6 @@ public class SmootherRayer : MonoBehaviour } } - if (SmootherRayMod.EntrySmoothWhenHoldingPickup.Value - && ray.grabbedObject) - canSmoothRay = true; - return canSmoothRay; } diff --git a/SmootherRay/format.json b/SmootherRay/format.json index 5e49dd0..a627013 100644 --- a/SmootherRay/format.json +++ b/SmootherRay/format.json @@ -1,12 +1,12 @@ { "_id": 162, "name": "SmootherRay", - "modversion": "1.0.6", - "gameversion": "2025r177", + "modversion": "1.0.5", + "gameversion": "2024r176", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", - "description": "Smoothes your controller while the raycast lines are visible.\nThis is a CVR adaptation of a Beat Saber mod: [BeatSaber_SmoothedController](https://github.com/kinsi55/BeatSaber_SmoothedController)\n\n- An option is provided to only smooth when aiming at menus.\n- Smoothing characteristics are completely configurable, but the defaults are basically perfect.\n\n**Only supports OpenVR, not OpenXR.**\n\n-# NOTE: This disables the shitty built-in Smooth Ray setting when the mod is enabled. Compare both & you'll see why.", + "description": "Smoothes your controller while the raycast lines are visible.\nThis is a CVR adaptation of a Beat Saber mod: [BeatSaber_SmoothedController](https://github.com/kinsi55/BeatSaber_SmoothedController)\n\n- An option is provided to only smooth when aiming at menus.\n- Smoothing characteristics are completely configurable, but the defaults are basically perfect.\n- Pairs well with the [WhereAmIPointing](https://discord.com/channels/1001388809184870441/1002058238545641542/1282798820073406556) mod.\n\n**Only supports OpenVR, not OpenXR.**\n\n-# NOTE: This disables the shitty built-in Smooth Ray setting when the mod is enabled. Compare both & you'll see why.", "searchtags": [ "vr", "ray", @@ -16,8 +16,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/SmootherRay.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r40/SmootherRay.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/SmootherRay/", - "changelog": "- Fixes for 2025r179", + "changelog": "- Fixed for 2024r176.\n- Rebranded to SmootherRayer due to native implementation now existing and sucking.", "embedcolor": "#f61963" } \ No newline at end of file diff --git a/Stickers/Main.cs b/Stickers/Main.cs index 1234f10..80ebd6b 100644 --- a/Stickers/Main.cs +++ b/Stickers/Main.cs @@ -1,5 +1,4 @@ using ABI_RC.Core; -using ABI_RC.Core.InteractionSystem; using ABI_RC.Core.Player; using ABI_RC.Core.Savior; using ABI_RC.Systems.InputManagement; @@ -39,15 +38,12 @@ public class StickerMod : MelonMod if (StickerSystem.Instance == null) return; - if (StickerSystem.Instance.IsInStickerMode) - { - if (Input.mouseScrollDelta.y != 0f - && Cursor.lockState == CursorLockMode.Locked // prevent scrolling while in menus - && !CVRInputManager.Instance.zoom) // prevent scrolling while using scroll zoom - StickerSystem.Instance.SelectedStickerSlot += (int)Input.mouseScrollDelta.y; + if (Input.mouseScrollDelta.y != 0f + && Cursor.lockState == CursorLockMode.Locked // prevent scrolling while in menus + && !CVRInputManager.Instance.zoom) // prevent scrolling while using scroll zoom + StickerSystem.Instance.SelectedStickerSlot += (int)Input.mouseScrollDelta.y; - StickerSystem.Instance.UpdateStickerPreview(); // flashy flash - } + StickerSystem.Instance.UpdateStickerPreview(); // flashy flash if (!ModSettings.Entry_UsePlaceBinding.Value) return; @@ -55,8 +51,7 @@ public class StickerMod : MelonMod if (!Input.GetKeyDown((KeyCode)ModSettings.Entry_PlaceBinding.Value)) return; - if (CVRInputManager.Instance.textInputFocused - || ViewManager.Instance.textInputFocused) // BRUH + if (CVRInputManager.Instance.textInputFocused) return; // prevent placing stickers while typing StickerSystem.Instance.PlaceStickerFromControllerRay(PlayerSetup.Instance.activeCam.transform); diff --git a/Stickers/Properties/AssemblyInfo.cs b/Stickers/Properties/AssemblyInfo.cs index db9f15b..5107aed 100644 --- a/Stickers/Properties/AssemblyInfo.cs +++ b/Stickers/Properties/AssemblyInfo.cs @@ -27,6 +27,6 @@ using System.Reflection; namespace NAK.Stickers.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.9"; + public const string Version = "1.0.8"; public const string Author = "NotAKidoS, SketchFoxsky"; } \ No newline at end of file diff --git a/Stickers/Stickers/Networking/ModNetwork.Inbound.cs b/Stickers/Stickers/Networking/ModNetwork.Inbound.cs index 57b355c..e769006 100644 --- a/Stickers/Stickers/Networking/ModNetwork.Inbound.cs +++ b/Stickers/Stickers/Networking/ModNetwork.Inbound.cs @@ -1,5 +1,4 @@ using ABI_RC.Core.Networking.IO.Social; -using ABI_RC.Core.Player; using ABI_RC.Core.Savior; using ABI_RC.Systems.ModNetwork; using NAK.Stickers.Utilities; @@ -48,9 +47,6 @@ public static partial class ModNetwork if (StickerSystem.Instance.IsRestrictedInstance) // ignore messages from users when the world is restricted. This also includes older or modified version of Stickers mod. return false; - if (!CVRPlayerManager.Instance.GetPlayerPuppetMaster(sender, out PuppetMaster _)) - return false; // ignore messages from players that don't exist - return true; } @@ -112,10 +108,7 @@ public static partial class ModNetwork msg.Read(out Vector3 up); if (!StickerSystem.Instance.HasTextureHash(msg.Sender, textureHash)) - { SendRequestTexture(stickerSlot, textureHash); - StickerSystem.Instance.ClearStickersForPlayer(msg.Sender, stickerSlot); // Ensure no exploit - } StickerSystem.Instance.OnStickerPlaceReceived(msg.Sender, stickerSlot, position, forward, up); } @@ -165,7 +158,7 @@ public static partial class ModNetwork LoggerInbound($"Received StartTexture message from {sender}: Slot: {stickerSlot}, Hash: {textureHash}, Chunks: {chunkCount}, Resolution: {width}x{height}"); } - + private static void HandleSendTexture(ModNetworkMessage msg) { string sender = msg.Sender; diff --git a/Stickers/Stickers/StickerSystem.PlayerCallbacks.cs b/Stickers/Stickers/StickerSystem.PlayerCallbacks.cs index f2b5dd3..e8ab380 100644 --- a/Stickers/Stickers/StickerSystem.PlayerCallbacks.cs +++ b/Stickers/Stickers/StickerSystem.PlayerCallbacks.cs @@ -62,7 +62,7 @@ public partial class StickerSystem #endregion Player Callbacks - #region Sticker Callbacks + #region Player Callbacks public void OnStickerPlaceReceived(string playerId, int stickerSlot, Vector3 position, Vector3 forward, Vector3 up) => AttemptPlaceSticker(playerId, position, forward, up, alignWithNormal: true, stickerSlot); @@ -81,5 +81,5 @@ public partial class StickerSystem stickerData.IdentifyTime = Time.time + 3f; } - #endregion Sticker Callbacks + #endregion Player Callbacks } diff --git a/Stickers/Stickers/StickerSystem.StickerLifecycle.cs b/Stickers/Stickers/StickerSystem.StickerLifecycle.cs index 5f350dd..df4ee96 100644 --- a/Stickers/Stickers/StickerSystem.StickerLifecycle.cs +++ b/Stickers/Stickers/StickerSystem.StickerLifecycle.cs @@ -110,7 +110,7 @@ public partial class StickerSystem stickerData.Clear(); } - public void ClearStickersForPlayer(string playerId, int stickerSlot) + private void ClearStickersForPlayer(string playerId, int stickerSlot) { if (!_playerStickers.TryGetValue(playerId, out StickerData stickerData)) return; diff --git a/Stickers/format.json b/Stickers/format.json index 2d2cab5..5c28daa 100644 --- a/Stickers/format.json +++ b/Stickers/format.json @@ -1,8 +1,8 @@ { "_id": 232, "name": "Stickers", - "modversion": "1.0.9", - "gameversion": "2025r179", + "modversion": "1.0.8", + "gameversion": "2024r177", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS, SketchFoxsky", @@ -16,8 +16,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/Stickers.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r41/Stickers.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/Stickers/", - "changelog": "- Fixes for 2025r179\n- Fixed placing stickers when Cohtml text input fields were focused\n- Fixed scrolling cycling selected sticker slot despite not being in placement mode", + "changelog": "- Added world restriction via `[DisableStickers]` GameObject (thx Sketch).\n- Added sticker placement preview.\n- Fixed stickers being hit by VR switch shader replacement.\n- Fixed Desktop Sticker placement bind firing when a text field was focused.\n- **This version is not backwards compatible with previous versions over network.**", "embedcolor": "#f61963" } \ No newline at end of file diff --git a/.Deprecated/StopClosingMyMenuOnWorldLoad/Main.cs b/StopClosingMyMenuOnWorldLoad/Main.cs similarity index 100% rename from .Deprecated/StopClosingMyMenuOnWorldLoad/Main.cs rename to StopClosingMyMenuOnWorldLoad/Main.cs diff --git a/.Deprecated/StopClosingMyMenuOnWorldLoad/Properties/AssemblyInfo.cs b/StopClosingMyMenuOnWorldLoad/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/StopClosingMyMenuOnWorldLoad/Properties/AssemblyInfo.cs rename to StopClosingMyMenuOnWorldLoad/Properties/AssemblyInfo.cs diff --git a/.Deprecated/StopClosingMyMenuOnWorldLoad/README.md b/StopClosingMyMenuOnWorldLoad/README.md similarity index 100% rename from .Deprecated/StopClosingMyMenuOnWorldLoad/README.md rename to StopClosingMyMenuOnWorldLoad/README.md diff --git a/.Deprecated/StopClosingMyMenuOnWorldLoad/StopClosingMyMenuOnWorldLoad.csproj b/StopClosingMyMenuOnWorldLoad/StopClosingMyMenuOnWorldLoad.csproj similarity index 100% rename from .Deprecated/StopClosingMyMenuOnWorldLoad/StopClosingMyMenuOnWorldLoad.csproj rename to StopClosingMyMenuOnWorldLoad/StopClosingMyMenuOnWorldLoad.csproj diff --git a/.Deprecated/StopClosingMyMenuOnWorldLoad/format.json b/StopClosingMyMenuOnWorldLoad/format.json similarity index 100% rename from .Deprecated/StopClosingMyMenuOnWorldLoad/format.json rename to StopClosingMyMenuOnWorldLoad/format.json diff --git a/ThirdPerson/CameraLogic.cs b/ThirdPerson/CameraLogic.cs index f1b83ef..24d10c5 100644 --- a/ThirdPerson/CameraLogic.cs +++ b/ThirdPerson/CameraLogic.cs @@ -39,6 +39,7 @@ internal static class CameraLogic if (_state) _storedCamMask = _desktopCam.cullingMask; _desktopCam.cullingMask = _state ? 0 : _storedCamMask; + _uiCam.cullingMask = _state ? _uiCam.cullingMask & ~(1 << CVRLayers.PlayerClone) : _uiCam.cullingMask | (1 << CVRLayers.PlayerClone); _thirdPersonCam.gameObject.SetActive(_state); } } @@ -72,9 +73,6 @@ internal static class CameraLogic ThirdPerson.Logger.Msg("Copying active camera settings & components."); CVRTools.CopyToDestCam(activePlayerCam, _thirdPersonCam, true); - - // Remove PlayerClone - _thirdPersonCam.cullingMask &= ~(1 << CVRLayers.PlayerClone); if (!CheckIsRestricted()) return; diff --git a/ThirdPerson/Patches.cs b/ThirdPerson/Patches.cs index 131b45b..9267d2e 100644 --- a/ThirdPerson/Patches.cs +++ b/ThirdPerson/Patches.cs @@ -4,6 +4,7 @@ using MelonLoader; using System.Reflection; using static NAK.ThirdPerson.CameraLogic; using ABI_RC.Core; +using ABI_RC.Core.Player.TransformHider; namespace NAK.ThirdPerson; @@ -27,6 +28,10 @@ internal static class Patches typeof(CVRTools).GetMethod(nameof(CVRTools.ConfigureHudAffinity), BindingFlags.Public | BindingFlags.Static), postfix: typeof(Patches).GetMethod(nameof(OnConfigureHudAffinity), BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod() ); + harmony.Patch( + typeof(TransformHiderManager).GetMethod(nameof(TransformHiderManager.CheckPlayerCamWithinRange), BindingFlags.NonPublic | BindingFlags.Static), + prefix: typeof(Patches).GetMethod(nameof(OnCheckPlayerCamWithinRange), BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod() + ); } //Copy camera settings & postprocessing components @@ -34,4 +39,5 @@ internal static class Patches //Adjust camera distance with height as modifier private static void OnScaleAdjusted(float height) => AdjustScale(height); private static void OnConfigureHudAffinity() => CheckVRMode(); + private static bool OnCheckPlayerCamWithinRange() => !State; // don't hide head if in third person } \ No newline at end of file diff --git a/ThirdPerson/Properties/AssemblyInfo.cs b/ThirdPerson/Properties/AssemblyInfo.cs index c2c7701..ab34afe 100644 --- a/ThirdPerson/Properties/AssemblyInfo.cs +++ b/ThirdPerson/Properties/AssemblyInfo.cs @@ -20,13 +20,13 @@ using System.Reflection; [assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] [assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] [assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] -[assembly: MelonColor(255, 246, 25, 97)] // do not change color, originally chosen by Davi -[assembly: MelonAuthorColor(255, 158, 21, 32)] // do not change color, originally chosen by Davi +[assembly: MelonColor(255, 246, 25, 97)] +[assembly: MelonAuthorColor(255, 158, 21, 32)] [assembly: HarmonyDontPatchAll] namespace NAK.ThirdPerson.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.1.1"; + public const string Version = "1.0.9"; public const string Author = "Davi & NotAKidoS"; } \ No newline at end of file diff --git a/ThirdPerson/format.json b/ThirdPerson/format.json index 4cdca3e..52c0017 100644 --- a/ThirdPerson/format.json +++ b/ThirdPerson/format.json @@ -2,8 +2,8 @@ { "_id": 16, "name": "ThirdPerson", - "modversion": "1.1.1", - "gameversion": "2025r179", + "modversion": "1.0.9", + "gameversion": "2024r175", "loaderversion": "0.6.1", "modtype": "Mod", "author": "Davi & NotAKidoS", @@ -14,9 +14,9 @@ "third person" ], "requirements": [], - "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/ThirdPerson.dll", + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r26/ThirdPerson.dll", "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/ThirdPerson", - "changelog": "- Recompiled for 2025r179", + "changelog": "- Fixed an issue where VR Switching without using ThirdPerson prior would incorrectly set the Desktop camera culling mask to 0\n- Fixed an NRE when checking CVRWorld zoom rule when no CVRWorld instance was found\n- Prevented head hiding from persisting into third person while Avatar Overrender Ui is enabled", "embedcolor": "#F61961" } ] \ No newline at end of file diff --git a/.Deprecated/VisualCloneFix/Main.cs b/VisualCloneFix/Main.cs similarity index 100% rename from .Deprecated/VisualCloneFix/Main.cs rename to VisualCloneFix/Main.cs diff --git a/.Deprecated/VisualCloneFix/Patches.cs b/VisualCloneFix/Patches.cs similarity index 98% rename from .Deprecated/VisualCloneFix/Patches.cs rename to VisualCloneFix/Patches.cs index d1fb84b..2fc9a14 100644 --- a/.Deprecated/VisualCloneFix/Patches.cs +++ b/VisualCloneFix/Patches.cs @@ -16,7 +16,9 @@ public static class Patches [HarmonyPatch(typeof(TransformHiderUtils), nameof(TransformHiderUtils.SetupAvatar))] private static bool OnSetupAvatar(GameObject avatar) { - if (!VisualCloneFixMod.EntryUseVisualClone.Value) return true; + if (!VisualCloneFixMod.EntryUseVisualClone.Value) + return true; + LocalCloneHelper.SetupAvatar(avatar); return false; } diff --git a/.Deprecated/VisualCloneFix/Properties/AssemblyInfo.cs b/VisualCloneFix/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/VisualCloneFix/Properties/AssemblyInfo.cs rename to VisualCloneFix/Properties/AssemblyInfo.cs diff --git a/.Deprecated/VisualCloneFix/README.md b/VisualCloneFix/README.md similarity index 100% rename from .Deprecated/VisualCloneFix/README.md rename to VisualCloneFix/README.md diff --git a/.Deprecated/VisualCloneFix/VisualCloneFix.csproj b/VisualCloneFix/VisualCloneFix.csproj similarity index 100% rename from .Deprecated/VisualCloneFix/VisualCloneFix.csproj rename to VisualCloneFix/VisualCloneFix.csproj diff --git a/.Deprecated/VisualCloneFix/format.json b/VisualCloneFix/format.json similarity index 100% rename from .Deprecated/VisualCloneFix/format.json rename to VisualCloneFix/format.json diff --git a/.Deprecated/AutoSyncTransforms/Main.cs b/WhereAmIPointing/Main.cs similarity index 100% rename from .Deprecated/AutoSyncTransforms/Main.cs rename to WhereAmIPointing/Main.cs diff --git a/.Deprecated/AutoSyncTransforms/Properties/AssemblyInfo.cs b/WhereAmIPointing/Properties/AssemblyInfo.cs similarity index 100% rename from .Deprecated/AutoSyncTransforms/Properties/AssemblyInfo.cs rename to WhereAmIPointing/Properties/AssemblyInfo.cs diff --git a/.Deprecated/WhereAmIPointing/README.md b/WhereAmIPointing/README.md similarity index 100% rename from .Deprecated/WhereAmIPointing/README.md rename to WhereAmIPointing/README.md diff --git a/.Deprecated/AutoSyncTransforms/WhereAmIPointing.csproj b/WhereAmIPointing/WhereAmIPointing.csproj similarity index 100% rename from .Deprecated/AutoSyncTransforms/WhereAmIPointing.csproj rename to WhereAmIPointing/WhereAmIPointing.csproj diff --git a/.Deprecated/WhereAmIPointing/format.json b/WhereAmIPointing/format.json similarity index 100% rename from .Deprecated/WhereAmIPointing/format.json rename to WhereAmIPointing/format.json