diff --git a/AlternateIKSystem/AlternateIKSystem.csproj b/.DepricatedMods/AlternateIKSystem/AlternateIKSystem.csproj similarity index 100% rename from AlternateIKSystem/AlternateIKSystem.csproj rename to .DepricatedMods/AlternateIKSystem/AlternateIKSystem.csproj diff --git a/AlternateIKSystem/HarmonyPatches.cs b/.DepricatedMods/AlternateIKSystem/HarmonyPatches.cs similarity index 100% rename from AlternateIKSystem/HarmonyPatches.cs rename to .DepricatedMods/AlternateIKSystem/HarmonyPatches.cs diff --git a/AlternateIKSystem/IK/BodyControl.cs b/.DepricatedMods/AlternateIKSystem/IK/BodyControl.cs similarity index 100% rename from AlternateIKSystem/IK/BodyControl.cs rename to .DepricatedMods/AlternateIKSystem/IK/BodyControl.cs diff --git a/AlternateIKSystem/IK/IKCalibrator.cs b/.DepricatedMods/AlternateIKSystem/IK/IKCalibrator.cs similarity index 100% rename from AlternateIKSystem/IK/IKCalibrator.cs rename to .DepricatedMods/AlternateIKSystem/IK/IKCalibrator.cs diff --git a/AlternateIKSystem/IK/IKHandlers/IKHandler.cs b/.DepricatedMods/AlternateIKSystem/IK/IKHandlers/IKHandler.cs similarity index 100% rename from AlternateIKSystem/IK/IKHandlers/IKHandler.cs rename to .DepricatedMods/AlternateIKSystem/IK/IKHandlers/IKHandler.cs diff --git a/AlternateIKSystem/IK/IKHandlers/IKHandlerDesktop.cs b/.DepricatedMods/AlternateIKSystem/IK/IKHandlers/IKHandlerDesktop.cs similarity index 100% rename from AlternateIKSystem/IK/IKHandlers/IKHandlerDesktop.cs rename to .DepricatedMods/AlternateIKSystem/IK/IKHandlers/IKHandlerDesktop.cs diff --git a/AlternateIKSystem/IK/IKHandlers/IKHandlerHalfBody.cs b/.DepricatedMods/AlternateIKSystem/IK/IKHandlers/IKHandlerHalfBody.cs similarity index 100% rename from AlternateIKSystem/IK/IKHandlers/IKHandlerHalfBody.cs rename to .DepricatedMods/AlternateIKSystem/IK/IKHandlers/IKHandlerHalfBody.cs diff --git a/AlternateIKSystem/IK/IKManager.cs b/.DepricatedMods/AlternateIKSystem/IK/IKManager.cs similarity index 100% rename from AlternateIKSystem/IK/IKManager.cs rename to .DepricatedMods/AlternateIKSystem/IK/IKManager.cs diff --git a/AlternateIKSystem/IK/MusclePoses.cs b/.DepricatedMods/AlternateIKSystem/IK/MusclePoses.cs similarity index 100% rename from AlternateIKSystem/IK/MusclePoses.cs rename to .DepricatedMods/AlternateIKSystem/IK/MusclePoses.cs diff --git a/AlternateIKSystem/IK/Tracking/SteamVRTrackerManager.cs b/.DepricatedMods/AlternateIKSystem/IK/Tracking/SteamVRTrackerManager.cs similarity index 100% rename from AlternateIKSystem/IK/Tracking/SteamVRTrackerManager.cs rename to .DepricatedMods/AlternateIKSystem/IK/Tracking/SteamVRTrackerManager.cs diff --git a/AlternateIKSystem/IK/VRIKHelpers/VRIKLocomotionData.cs b/.DepricatedMods/AlternateIKSystem/IK/VRIKHelpers/VRIKLocomotionData.cs similarity index 100% rename from AlternateIKSystem/IK/VRIKHelpers/VRIKLocomotionData.cs rename to .DepricatedMods/AlternateIKSystem/IK/VRIKHelpers/VRIKLocomotionData.cs diff --git a/AlternateIKSystem/IK/VRIKHelpers/VRIKUtils.cs b/.DepricatedMods/AlternateIKSystem/IK/VRIKHelpers/VRIKUtils.cs similarity index 100% rename from AlternateIKSystem/IK/VRIKHelpers/VRIKUtils.cs rename to .DepricatedMods/AlternateIKSystem/IK/VRIKHelpers/VRIKUtils.cs diff --git a/AlternateIKSystem/IK/WeightManipulators/BodyParts/BodyPart.cs b/.DepricatedMods/AlternateIKSystem/IK/WeightManipulators/BodyParts/BodyPart.cs similarity index 100% rename from AlternateIKSystem/IK/WeightManipulators/BodyParts/BodyPart.cs rename to .DepricatedMods/AlternateIKSystem/IK/WeightManipulators/BodyParts/BodyPart.cs diff --git a/AlternateIKSystem/IK/WeightManipulators/DeviceControlManipulator.cs b/.DepricatedMods/AlternateIKSystem/IK/WeightManipulators/DeviceControlManipulator.cs similarity index 100% rename from AlternateIKSystem/IK/WeightManipulators/DeviceControlManipulator.cs rename to .DepricatedMods/AlternateIKSystem/IK/WeightManipulators/DeviceControlManipulator.cs diff --git a/AlternateIKSystem/IK/WeightManipulators/Interface/IWeightManipulator.cs b/.DepricatedMods/AlternateIKSystem/IK/WeightManipulators/Interface/IWeightManipulator.cs similarity index 100% rename from AlternateIKSystem/IK/WeightManipulators/Interface/IWeightManipulator.cs rename to .DepricatedMods/AlternateIKSystem/IK/WeightManipulators/Interface/IWeightManipulator.cs diff --git a/AlternateIKSystem/IK/WeightManipulators/TrackingControlManipulator.cs b/.DepricatedMods/AlternateIKSystem/IK/WeightManipulators/TrackingControlManipulator.cs similarity index 100% rename from AlternateIKSystem/IK/WeightManipulators/TrackingControlManipulator.cs rename to .DepricatedMods/AlternateIKSystem/IK/WeightManipulators/TrackingControlManipulator.cs diff --git a/AlternateIKSystem/IK/WeightManipulators/WeightManipulatorManager.cs b/.DepricatedMods/AlternateIKSystem/IK/WeightManipulators/WeightManipulatorManager.cs similarity index 100% rename from AlternateIKSystem/IK/WeightManipulators/WeightManipulatorManager.cs rename to .DepricatedMods/AlternateIKSystem/IK/WeightManipulators/WeightManipulatorManager.cs diff --git a/AlternateIKSystem/Integrations/BTKUIAddon.cs b/.DepricatedMods/AlternateIKSystem/Integrations/BTKUIAddon.cs similarity index 100% rename from AlternateIKSystem/Integrations/BTKUIAddon.cs rename to .DepricatedMods/AlternateIKSystem/Integrations/BTKUIAddon.cs diff --git a/AlternateIKSystem/LICENSE.txt b/.DepricatedMods/AlternateIKSystem/LICENSE.txt similarity index 100% rename from AlternateIKSystem/LICENSE.txt rename to .DepricatedMods/AlternateIKSystem/LICENSE.txt diff --git a/AlternateIKSystem/Main.cs b/.DepricatedMods/AlternateIKSystem/Main.cs similarity index 100% rename from AlternateIKSystem/Main.cs rename to .DepricatedMods/AlternateIKSystem/Main.cs diff --git a/AlternateIKSystem/ModSettings.cs b/.DepricatedMods/AlternateIKSystem/ModSettings.cs similarity index 100% rename from AlternateIKSystem/ModSettings.cs rename to .DepricatedMods/AlternateIKSystem/ModSettings.cs diff --git a/AlternateIKSystem/Properties/AssemblyInfo.cs b/.DepricatedMods/AlternateIKSystem/Properties/AssemblyInfo.cs similarity index 100% rename from AlternateIKSystem/Properties/AssemblyInfo.cs rename to .DepricatedMods/AlternateIKSystem/Properties/AssemblyInfo.cs diff --git a/AlternateIKSystem/README.md b/.DepricatedMods/AlternateIKSystem/README.md similarity index 100% rename from AlternateIKSystem/README.md rename to .DepricatedMods/AlternateIKSystem/README.md diff --git a/AlternateIKSystem/format.json b/.DepricatedMods/AlternateIKSystem/format.json similarity index 100% rename from AlternateIKSystem/format.json rename to .DepricatedMods/AlternateIKSystem/format.json diff --git a/BadAnimatorFix/BadAnimatorFix.csproj b/.DepricatedMods/BadAnimatorFix/BadAnimatorFix.csproj similarity index 100% rename from BadAnimatorFix/BadAnimatorFix.csproj rename to .DepricatedMods/BadAnimatorFix/BadAnimatorFix.csproj diff --git a/BadAnimatorFix/BadAnimatorFixManager.cs b/.DepricatedMods/BadAnimatorFix/BadAnimatorFixManager.cs similarity index 100% rename from BadAnimatorFix/BadAnimatorFixManager.cs rename to .DepricatedMods/BadAnimatorFix/BadAnimatorFixManager.cs diff --git a/BadAnimatorFix/BadAnimatorFixer.cs b/.DepricatedMods/BadAnimatorFix/BadAnimatorFixer.cs similarity index 100% rename from BadAnimatorFix/BadAnimatorFixer.cs rename to .DepricatedMods/BadAnimatorFix/BadAnimatorFixer.cs diff --git a/BadAnimatorFix/HarmonyPatches.cs b/.DepricatedMods/BadAnimatorFix/HarmonyPatches.cs similarity index 100% rename from BadAnimatorFix/HarmonyPatches.cs rename to .DepricatedMods/BadAnimatorFix/HarmonyPatches.cs diff --git a/BadAnimatorFix/Main.cs b/.DepricatedMods/BadAnimatorFix/Main.cs similarity index 100% rename from BadAnimatorFix/Main.cs rename to .DepricatedMods/BadAnimatorFix/Main.cs diff --git a/BadAnimatorFix/Properties/AssemblyInfo.cs b/.DepricatedMods/BadAnimatorFix/Properties/AssemblyInfo.cs similarity index 100% rename from BadAnimatorFix/Properties/AssemblyInfo.cs rename to .DepricatedMods/BadAnimatorFix/Properties/AssemblyInfo.cs diff --git a/BadAnimatorFix/format.json b/.DepricatedMods/BadAnimatorFix/format.json similarity index 100% rename from BadAnimatorFix/format.json rename to .DepricatedMods/BadAnimatorFix/format.json diff --git a/Blackout/AssetHandler.cs b/.DepricatedMods/Blackout/AssetHandler.cs similarity index 100% rename from Blackout/AssetHandler.cs rename to .DepricatedMods/Blackout/AssetHandler.cs diff --git a/Blackout/Blackout.csproj b/.DepricatedMods/Blackout/Blackout.csproj similarity index 100% rename from Blackout/Blackout.csproj rename to .DepricatedMods/Blackout/Blackout.csproj diff --git a/Blackout/BlackoutController.cs b/.DepricatedMods/Blackout/BlackoutController.cs similarity index 100% rename from Blackout/BlackoutController.cs rename to .DepricatedMods/Blackout/BlackoutController.cs diff --git a/Blackout/HarmonyPatches.cs b/.DepricatedMods/Blackout/HarmonyPatches.cs similarity index 100% rename from Blackout/HarmonyPatches.cs rename to .DepricatedMods/Blackout/HarmonyPatches.cs diff --git a/Blackout/Integrations/BTKUIAddon.cs b/.DepricatedMods/Blackout/Integrations/BTKUIAddon.cs similarity index 100% rename from Blackout/Integrations/BTKUIAddon.cs rename to .DepricatedMods/Blackout/Integrations/BTKUIAddon.cs diff --git a/Blackout/Integrations/UIExpansionKitAddon.cs b/.DepricatedMods/Blackout/Integrations/UIExpansionKitAddon.cs similarity index 100% rename from Blackout/Integrations/UIExpansionKitAddon.cs rename to .DepricatedMods/Blackout/Integrations/UIExpansionKitAddon.cs diff --git a/Blackout/Main.cs b/.DepricatedMods/Blackout/Main.cs similarity index 100% rename from Blackout/Main.cs rename to .DepricatedMods/Blackout/Main.cs diff --git a/Blackout/Properties/AssemblyInfo.cs b/.DepricatedMods/Blackout/Properties/AssemblyInfo.cs similarity index 100% rename from Blackout/Properties/AssemblyInfo.cs rename to .DepricatedMods/Blackout/Properties/AssemblyInfo.cs diff --git a/Blackout/Resource1.Designer.cs b/.DepricatedMods/Blackout/Resource1.Designer.cs similarity index 100% rename from Blackout/Resource1.Designer.cs rename to .DepricatedMods/Blackout/Resource1.Designer.cs diff --git a/Blackout/Resource1.resx b/.DepricatedMods/Blackout/Resource1.resx similarity index 100% rename from Blackout/Resource1.resx rename to .DepricatedMods/Blackout/Resource1.resx diff --git a/Blackout/format.json b/.DepricatedMods/Blackout/format.json similarity index 100% rename from Blackout/format.json rename to .DepricatedMods/Blackout/format.json diff --git a/Blackout/resources/blackout_controller.asset b/.DepricatedMods/Blackout/resources/blackout_controller.asset similarity index 100% rename from Blackout/resources/blackout_controller.asset rename to .DepricatedMods/Blackout/resources/blackout_controller.asset diff --git a/CameraFixes/CameraFixes.csproj b/.DepricatedMods/CameraFixes/CameraFixes.csproj similarity index 100% rename from CameraFixes/CameraFixes.csproj rename to .DepricatedMods/CameraFixes/CameraFixes.csproj diff --git a/CameraFixes/HarmonyPatches.cs b/.DepricatedMods/CameraFixes/HarmonyPatches.cs similarity index 100% rename from CameraFixes/HarmonyPatches.cs rename to .DepricatedMods/CameraFixes/HarmonyPatches.cs diff --git a/CameraFixes/Main.cs b/.DepricatedMods/CameraFixes/Main.cs similarity index 100% rename from CameraFixes/Main.cs rename to .DepricatedMods/CameraFixes/Main.cs diff --git a/CameraFixes/Properties/AssemblyInfo.cs b/.DepricatedMods/CameraFixes/Properties/AssemblyInfo.cs similarity index 100% rename from CameraFixes/Properties/AssemblyInfo.cs rename to .DepricatedMods/CameraFixes/Properties/AssemblyInfo.cs diff --git a/CameraFixes/format.json b/.DepricatedMods/CameraFixes/format.json similarity index 100% rename from CameraFixes/format.json rename to .DepricatedMods/CameraFixes/format.json diff --git a/DesktopVRIK/DesktopVRIK.csproj b/.DepricatedMods/DesktopVRIK/DesktopVRIK.csproj similarity index 100% rename from DesktopVRIK/DesktopVRIK.csproj rename to .DepricatedMods/DesktopVRIK/DesktopVRIK.csproj diff --git a/DesktopVRIK/HarmonyPatches.cs b/.DepricatedMods/DesktopVRIK/HarmonyPatches.cs similarity index 100% rename from DesktopVRIK/HarmonyPatches.cs rename to .DepricatedMods/DesktopVRIK/HarmonyPatches.cs diff --git a/DesktopVRIK/IK/IKCalibrator.cs b/.DepricatedMods/DesktopVRIK/IK/IKCalibrator.cs similarity index 100% rename from DesktopVRIK/IK/IKCalibrator.cs rename to .DepricatedMods/DesktopVRIK/IK/IKCalibrator.cs diff --git a/DesktopVRIK/IK/IKHandlers/IKHandler.cs b/.DepricatedMods/DesktopVRIK/IK/IKHandlers/IKHandler.cs similarity index 100% rename from DesktopVRIK/IK/IKHandlers/IKHandler.cs rename to .DepricatedMods/DesktopVRIK/IK/IKHandlers/IKHandler.cs diff --git a/DesktopVRIK/IK/IKHandlers/IKHandlerDesktop.cs b/.DepricatedMods/DesktopVRIK/IK/IKHandlers/IKHandlerDesktop.cs similarity index 100% rename from DesktopVRIK/IK/IKHandlers/IKHandlerDesktop.cs rename to .DepricatedMods/DesktopVRIK/IK/IKHandlers/IKHandlerDesktop.cs diff --git a/DesktopVRIK/IK/IKManager.cs b/.DepricatedMods/DesktopVRIK/IK/IKManager.cs similarity index 100% rename from DesktopVRIK/IK/IKManager.cs rename to .DepricatedMods/DesktopVRIK/IK/IKManager.cs diff --git a/DesktopVRIK/IK/MusclePoses.cs b/.DepricatedMods/DesktopVRIK/IK/MusclePoses.cs similarity index 100% rename from DesktopVRIK/IK/MusclePoses.cs rename to .DepricatedMods/DesktopVRIK/IK/MusclePoses.cs diff --git a/DesktopVRIK/IK/VRIKHelpers/VRIKLocomotionData.cs b/.DepricatedMods/DesktopVRIK/IK/VRIKHelpers/VRIKLocomotionData.cs similarity index 100% rename from DesktopVRIK/IK/VRIKHelpers/VRIKLocomotionData.cs rename to .DepricatedMods/DesktopVRIK/IK/VRIKHelpers/VRIKLocomotionData.cs diff --git a/DesktopVRIK/IK/VRIKHelpers/VRIKUtils.cs b/.DepricatedMods/DesktopVRIK/IK/VRIKHelpers/VRIKUtils.cs similarity index 100% rename from DesktopVRIK/IK/VRIKHelpers/VRIKUtils.cs rename to .DepricatedMods/DesktopVRIK/IK/VRIKHelpers/VRIKUtils.cs diff --git a/DesktopVRIK/Integrations/AMTAddon.cs b/.DepricatedMods/DesktopVRIK/Integrations/AMTAddon.cs similarity index 100% rename from DesktopVRIK/Integrations/AMTAddon.cs rename to .DepricatedMods/DesktopVRIK/Integrations/AMTAddon.cs diff --git a/DesktopVRIK/Integrations/BTKUIAddon.cs b/.DepricatedMods/DesktopVRIK/Integrations/BTKUIAddon.cs similarity index 100% rename from DesktopVRIK/Integrations/BTKUIAddon.cs rename to .DepricatedMods/DesktopVRIK/Integrations/BTKUIAddon.cs diff --git a/DesktopVRIK/Main.cs b/.DepricatedMods/DesktopVRIK/Main.cs similarity index 100% rename from DesktopVRIK/Main.cs rename to .DepricatedMods/DesktopVRIK/Main.cs diff --git a/DesktopVRIK/ModSettings.cs b/.DepricatedMods/DesktopVRIK/ModSettings.cs similarity index 100% rename from DesktopVRIK/ModSettings.cs rename to .DepricatedMods/DesktopVRIK/ModSettings.cs diff --git a/DesktopVRIK/Properties/AssemblyInfo.cs b/.DepricatedMods/DesktopVRIK/Properties/AssemblyInfo.cs similarity index 100% rename from DesktopVRIK/Properties/AssemblyInfo.cs rename to .DepricatedMods/DesktopVRIK/Properties/AssemblyInfo.cs diff --git a/DesktopVRIK/README.md b/.DepricatedMods/DesktopVRIK/README.md similarity index 100% rename from DesktopVRIK/README.md rename to .DepricatedMods/DesktopVRIK/README.md diff --git a/DesktopVRIK/format.json b/.DepricatedMods/DesktopVRIK/format.json similarity index 100% rename from DesktopVRIK/format.json rename to .DepricatedMods/DesktopVRIK/format.json diff --git a/DesktopVRSwitch/DesktopVRSwitch.csproj b/.DepricatedMods/DesktopVRSwitch/DesktopVRSwitch.csproj similarity index 100% rename from DesktopVRSwitch/DesktopVRSwitch.csproj rename to .DepricatedMods/DesktopVRSwitch/DesktopVRSwitch.csproj diff --git a/DesktopVRSwitch/HarmonyPatches.cs b/.DepricatedMods/DesktopVRSwitch/HarmonyPatches.cs similarity index 100% rename from DesktopVRSwitch/HarmonyPatches.cs rename to .DepricatedMods/DesktopVRSwitch/HarmonyPatches.cs diff --git a/DesktopVRSwitch/Integrations/BTKUIAddon.cs b/.DepricatedMods/DesktopVRSwitch/Integrations/BTKUIAddon.cs similarity index 100% rename from DesktopVRSwitch/Integrations/BTKUIAddon.cs rename to .DepricatedMods/DesktopVRSwitch/Integrations/BTKUIAddon.cs diff --git a/DesktopVRSwitch/Main.cs b/.DepricatedMods/DesktopVRSwitch/Main.cs similarity index 100% rename from DesktopVRSwitch/Main.cs rename to .DepricatedMods/DesktopVRSwitch/Main.cs diff --git a/DesktopVRSwitch/ModSettings.cs b/.DepricatedMods/DesktopVRSwitch/ModSettings.cs similarity index 100% rename from DesktopVRSwitch/ModSettings.cs rename to .DepricatedMods/DesktopVRSwitch/ModSettings.cs diff --git a/DesktopVRSwitch/Patches/DestroySteamVRInstancesImmediate.cs b/.DepricatedMods/DesktopVRSwitch/Patches/DestroySteamVRInstancesImmediate.cs similarity index 100% rename from DesktopVRSwitch/Patches/DestroySteamVRInstancesImmediate.cs rename to .DepricatedMods/DesktopVRSwitch/Patches/DestroySteamVRInstancesImmediate.cs diff --git a/DesktopVRSwitch/Patches/ReferenceCameraPatch.cs b/.DepricatedMods/DesktopVRSwitch/Patches/ReferenceCameraPatch.cs similarity index 100% rename from DesktopVRSwitch/Patches/ReferenceCameraPatch.cs rename to .DepricatedMods/DesktopVRSwitch/Patches/ReferenceCameraPatch.cs diff --git a/DesktopVRSwitch/Properties/AssemblyInfo.cs b/.DepricatedMods/DesktopVRSwitch/Properties/AssemblyInfo.cs similarity index 100% rename from DesktopVRSwitch/Properties/AssemblyInfo.cs rename to .DepricatedMods/DesktopVRSwitch/Properties/AssemblyInfo.cs diff --git a/DesktopVRSwitch/README.md b/.DepricatedMods/DesktopVRSwitch/README.md similarity index 100% rename from DesktopVRSwitch/README.md rename to .DepricatedMods/DesktopVRSwitch/README.md diff --git a/DesktopVRSwitch/Utils.cs b/.DepricatedMods/DesktopVRSwitch/Utils.cs similarity index 100% rename from DesktopVRSwitch/Utils.cs rename to .DepricatedMods/DesktopVRSwitch/Utils.cs diff --git a/DesktopVRSwitch/VRModeSwitchDebugger.cs b/.DepricatedMods/DesktopVRSwitch/VRModeSwitchDebugger.cs similarity index 100% rename from DesktopVRSwitch/VRModeSwitchDebugger.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeSwitchDebugger.cs diff --git a/DesktopVRSwitch/VRModeSwitchManager.cs b/.DepricatedMods/DesktopVRSwitch/VRModeSwitchManager.cs similarity index 100% rename from DesktopVRSwitch/VRModeSwitchManager.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeSwitchManager.cs diff --git a/DesktopVRSwitch/VRModeTrackers/CVRGestureRecognizerTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRGestureRecognizerTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/CVRGestureRecognizerTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRGestureRecognizerTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/CVRInputManagerTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRInputManagerTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/CVRInputManagerTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRInputManagerTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/CVRPickupObjectTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRPickupObjectTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/CVRPickupObjectTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRPickupObjectTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/CVRWorldTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRWorldTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/CVRWorldTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVRWorldTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/CVR_InteractableManagerTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVR_InteractableManagerTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/CVR_InteractableManagerTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVR_InteractableManagerTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/CVR_MenuManagerTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVR_MenuManagerTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/CVR_MenuManagerTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CVR_MenuManagerTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/CameraFacingObjectTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CameraFacingObjectTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/CameraFacingObjectTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CameraFacingObjectTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/CheckVRTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CheckVRTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/CheckVRTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CheckVRTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/CohtmlHudTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/CohtmlHudTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/CohtmlHudTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/CohtmlHudTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/HudOperationsTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/HudOperationsTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/HudOperationsTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/HudOperationsTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/IKSystemTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/IKSystemTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/IKSystemTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/IKSystemTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/MetaPortTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/MetaPortTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/MetaPortTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/MetaPortTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/MovementSystemTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/MovementSystemTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/MovementSystemTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/MovementSystemTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/PlayerSetupTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/PlayerSetupTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/PlayerSetupTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/PlayerSetupTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/PortableCameraTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/PortableCameraTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/PortableCameraTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/PortableCameraTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/VRModeTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/VRModeTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/VRModeTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/VRModeTracker.cs diff --git a/DesktopVRSwitch/VRModeTrackers/ViewManagerTracker.cs b/.DepricatedMods/DesktopVRSwitch/VRModeTrackers/ViewManagerTracker.cs similarity index 100% rename from DesktopVRSwitch/VRModeTrackers/ViewManagerTracker.cs rename to .DepricatedMods/DesktopVRSwitch/VRModeTrackers/ViewManagerTracker.cs diff --git a/DesktopVRSwitch/XRHandler.cs b/.DepricatedMods/DesktopVRSwitch/XRHandler.cs similarity index 100% rename from DesktopVRSwitch/XRHandler.cs rename to .DepricatedMods/DesktopVRSwitch/XRHandler.cs diff --git a/DesktopVRSwitch/format.json b/.DepricatedMods/DesktopVRSwitch/format.json similarity index 100% rename from DesktopVRSwitch/format.json rename to .DepricatedMods/DesktopVRSwitch/format.json diff --git a/FuckCohtmlResourceHandler/FuckCohtmlResourceHandler.csproj b/.DepricatedMods/FuckCohtmlResourceHandler/FuckCohtmlResourceHandler.csproj similarity index 100% rename from FuckCohtmlResourceHandler/FuckCohtmlResourceHandler.csproj rename to .DepricatedMods/FuckCohtmlResourceHandler/FuckCohtmlResourceHandler.csproj diff --git a/FuckCohtmlResourceHandler/HarmonyPatches.cs b/.DepricatedMods/FuckCohtmlResourceHandler/HarmonyPatches.cs similarity index 100% rename from FuckCohtmlResourceHandler/HarmonyPatches.cs rename to .DepricatedMods/FuckCohtmlResourceHandler/HarmonyPatches.cs diff --git a/FuckCohtmlResourceHandler/Main.cs b/.DepricatedMods/FuckCohtmlResourceHandler/Main.cs similarity index 100% rename from FuckCohtmlResourceHandler/Main.cs rename to .DepricatedMods/FuckCohtmlResourceHandler/Main.cs diff --git a/FuckCohtmlResourceHandler/Properties/AssemblyInfo.cs b/.DepricatedMods/FuckCohtmlResourceHandler/Properties/AssemblyInfo.cs similarity index 100% rename from FuckCohtmlResourceHandler/Properties/AssemblyInfo.cs rename to .DepricatedMods/FuckCohtmlResourceHandler/Properties/AssemblyInfo.cs diff --git a/FuckCohtmlResourceHandler/README.md b/.DepricatedMods/FuckCohtmlResourceHandler/README.md similarity index 100% rename from FuckCohtmlResourceHandler/README.md rename to .DepricatedMods/FuckCohtmlResourceHandler/README.md diff --git a/FuckCohtmlResourceHandler/format.json b/.DepricatedMods/FuckCohtmlResourceHandler/format.json similarity index 100% rename from FuckCohtmlResourceHandler/format.json rename to .DepricatedMods/FuckCohtmlResourceHandler/format.json diff --git a/FuckMLA/FuckMLA.csproj b/.DepricatedMods/FuckMLA/FuckMLA.csproj similarity index 100% rename from FuckMLA/FuckMLA.csproj rename to .DepricatedMods/FuckMLA/FuckMLA.csproj diff --git a/FuckMLA/HarmonyPatches.cs b/.DepricatedMods/FuckMLA/HarmonyPatches.cs similarity index 100% rename from FuckMLA/HarmonyPatches.cs rename to .DepricatedMods/FuckMLA/HarmonyPatches.cs diff --git a/FuckMLA/Main.cs b/.DepricatedMods/FuckMLA/Main.cs similarity index 100% rename from FuckMLA/Main.cs rename to .DepricatedMods/FuckMLA/Main.cs diff --git a/FuckMLA/Properties/AssemblyInfo.cs b/.DepricatedMods/FuckMLA/Properties/AssemblyInfo.cs similarity index 100% rename from FuckMLA/Properties/AssemblyInfo.cs rename to .DepricatedMods/FuckMLA/Properties/AssemblyInfo.cs diff --git a/FuckMLA/format.json b/.DepricatedMods/FuckMLA/format.json similarity index 100% rename from FuckMLA/format.json rename to .DepricatedMods/FuckMLA/format.json diff --git a/FuckVivox/FuckVivox.csproj b/.DepricatedMods/FuckVivox/FuckVivox.csproj similarity index 100% rename from FuckVivox/FuckVivox.csproj rename to .DepricatedMods/FuckVivox/FuckVivox.csproj diff --git a/FuckVivox/HarmonyPatches.cs b/.DepricatedMods/FuckVivox/HarmonyPatches.cs similarity index 75% rename from FuckVivox/HarmonyPatches.cs rename to .DepricatedMods/FuckVivox/HarmonyPatches.cs index 528b214..283ca0e 100644 --- a/FuckVivox/HarmonyPatches.cs +++ b/.DepricatedMods/FuckVivox/HarmonyPatches.cs @@ -6,6 +6,8 @@ using FuckMLA; using HarmonyLib; using UnityEngine; using Unity.Services.Vivox; +using ABI_RC.Core.Player; +using ABI_RC.Core; namespace NAK.FuckVivox.HarmonyPatches; @@ -96,4 +98,45 @@ internal class VivoxServiceInternalPatches FuckVivox.Logger.Warning($"Active Channel already contains key! :: + {channelSession.Channel.Name}"); __runOriginal = false; } + + [HarmonyPrefix] + [HarmonyPatch(typeof(InputManager), nameof(InputManager.OnApplicationFocus))] + private static void Prefix_InputManager_OnApplicationFocus(bool hasFocus) + { + FuckVivox.Logger.Msg("OnApplicationFocus: " + hasFocus); + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(RootLogic), nameof(RootLogic.CursorLock))] + private static void Prefix_RootLogic_CursorLock(bool value) + { + FuckVivox.Logger.Msg("CursorLock:" + value); + } + + private static bool _isFocused = false; + + [HarmonyPrefix] + [HarmonyPatch(typeof(InputManager), nameof(InputManager.LateUpdate))] + private static void Prefix_InputManager_LateUpdate() + { + + + if (Application.isFocused == _isFocused) + return; + + _isFocused = Application.isFocused; + FuckVivox.Logger.Msg("Application.isFocused Updated!: " + _isFocused); + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(InputManager), nameof(InputManager.Start))] + private static void Prefix_InputManager_Start() + { + Application.focusChanged += Test; + } + + private static void Test(bool value) + { + FuckVivox.Logger.Msg("Application.focusChanged! " + value); + } } \ No newline at end of file diff --git a/FuckVivox/Main.cs b/.DepricatedMods/FuckVivox/Main.cs similarity index 75% rename from FuckVivox/Main.cs rename to .DepricatedMods/FuckVivox/Main.cs index 3c7cae7..a8c237d 100644 --- a/FuckVivox/Main.cs +++ b/.DepricatedMods/FuckVivox/Main.cs @@ -11,10 +11,19 @@ public class FuckVivox : MelonMod { Logger = LoggerInstance; ApplyPatches(typeof(HarmonyPatches.VivoxServiceInternalPatches)); + + WindowFocusManager.OnFocusStateChanged += OnFocusChanged; } + private void OnFocusChanged(bool value) + { + Logger.Msg("WindowFocusManager.OnFocusStateChanged " + value); + } + public override void OnUpdate() { + WindowFocusManager.CheckWindowFocusedState(); + if (UnityEngine.Input.GetKeyDown(UnityEngine.KeyCode.F11)) VivoxHelpers.PleaseReLoginThankYou(); } diff --git a/FuckVivox/Properties/AssemblyInfo.cs b/.DepricatedMods/FuckVivox/Properties/AssemblyInfo.cs similarity index 100% rename from FuckVivox/Properties/AssemblyInfo.cs rename to .DepricatedMods/FuckVivox/Properties/AssemblyInfo.cs diff --git a/FuckVivox/VivoxHelpers.cs b/.DepricatedMods/FuckVivox/VivoxHelpers.cs similarity index 100% rename from FuckVivox/VivoxHelpers.cs rename to .DepricatedMods/FuckVivox/VivoxHelpers.cs diff --git a/.DepricatedMods/FuckVivox/WindowFocusManager.cs b/.DepricatedMods/FuckVivox/WindowFocusManager.cs new file mode 100644 index 0000000..bf2abdc --- /dev/null +++ b/.DepricatedMods/FuckVivox/WindowFocusManager.cs @@ -0,0 +1,51 @@ +using System.Runtime.InteropServices; +using System.Diagnostics; + +namespace FuckMLA; + +// We are manually checking if the window is focused because Unity is cool: +// Application.isFocused is true on startup, even when launched in background +// Application.focusChanged & MonoBehaviour.OnApplicationFocus is only called on second focus +// :))))))))))))))) + +public static class WindowFocusManager +{ + [DllImport("user32.dll")] + private static extern IntPtr GetForegroundWindow(); + + // [DllImport("user32.dll", SetLastError = true)] // detected melon console, that is stinky >:( + // private static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId); + + private static bool lastFocusState; + private static IntPtr mainWindowHandle; + public static Action OnFocusStateChanged; + + static WindowFocusManager() + { + Initialize(); + } + + private static async void Initialize() + { + //await Task.Delay(1000); // delay to ensure the main window handle is available + Process process = Process.GetCurrentProcess(); + mainWindowHandle = process.MainWindowHandle; + lastFocusState = IsWindowFocused(); + } + + private static bool IsWindowFocused() + { + IntPtr foregroundWindow = GetForegroundWindow(); + return foregroundWindow == mainWindowHandle; + } + + public static void CheckWindowFocusedState() + { + bool currentFocusState = IsWindowFocused(); + if (currentFocusState == lastFocusState) + return; + + lastFocusState = currentFocusState; + OnFocusStateChanged?.Invoke(currentFocusState); + } +} \ No newline at end of file diff --git a/FuckVivox/format.json b/.DepricatedMods/FuckVivox/format.json similarity index 100% rename from FuckVivox/format.json rename to .DepricatedMods/FuckVivox/format.json diff --git a/InteractionTest/AutoArmIK.cs b/.DepricatedMods/InteractionTest/AutoArmIK.cs similarity index 100% rename from InteractionTest/AutoArmIK.cs rename to .DepricatedMods/InteractionTest/AutoArmIK.cs diff --git a/InteractionTest/ColliderTest/AvatarColliderStruct.cs b/.DepricatedMods/InteractionTest/ColliderTest/AvatarColliderStruct.cs similarity index 100% rename from InteractionTest/ColliderTest/AvatarColliderStruct.cs rename to .DepricatedMods/InteractionTest/ColliderTest/AvatarColliderStruct.cs diff --git a/InteractionTest/ColliderTest/AvatarColliders.cs b/.DepricatedMods/InteractionTest/ColliderTest/AvatarColliders.cs similarity index 100% rename from InteractionTest/ColliderTest/AvatarColliders.cs rename to .DepricatedMods/InteractionTest/ColliderTest/AvatarColliders.cs diff --git a/InteractionTest/ColliderTest/LineColliderTest.cs b/.DepricatedMods/InteractionTest/ColliderTest/LineColliderTest.cs similarity index 100% rename from InteractionTest/ColliderTest/LineColliderTest.cs rename to .DepricatedMods/InteractionTest/ColliderTest/LineColliderTest.cs diff --git a/InteractionTest/GrabbableAvatar.cs b/.DepricatedMods/InteractionTest/GrabbableAvatar.cs similarity index 100% rename from InteractionTest/GrabbableAvatar.cs rename to .DepricatedMods/InteractionTest/GrabbableAvatar.cs diff --git a/InteractionTest/GrabbingAvatar.cs b/.DepricatedMods/InteractionTest/GrabbingAvatar.cs similarity index 100% rename from InteractionTest/GrabbingAvatar.cs rename to .DepricatedMods/InteractionTest/GrabbingAvatar.cs diff --git a/InteractionTest/HarmonyPatches.cs b/.DepricatedMods/InteractionTest/HarmonyPatches.cs similarity index 100% rename from InteractionTest/HarmonyPatches.cs rename to .DepricatedMods/InteractionTest/HarmonyPatches.cs diff --git a/InteractionTest/InteractionTest.csproj b/.DepricatedMods/InteractionTest/InteractionTest.csproj similarity index 100% rename from InteractionTest/InteractionTest.csproj rename to .DepricatedMods/InteractionTest/InteractionTest.csproj diff --git a/InteractionTest/Main.cs b/.DepricatedMods/InteractionTest/Main.cs similarity index 100% rename from InteractionTest/Main.cs rename to .DepricatedMods/InteractionTest/Main.cs diff --git a/InteractionTest/Properties/AssemblyInfo.cs b/.DepricatedMods/InteractionTest/Properties/AssemblyInfo.cs similarity index 100% rename from InteractionTest/Properties/AssemblyInfo.cs rename to .DepricatedMods/InteractionTest/Properties/AssemblyInfo.cs diff --git a/InteractionTest/README.md b/.DepricatedMods/InteractionTest/README.md similarity index 100% rename from InteractionTest/README.md rename to .DepricatedMods/InteractionTest/README.md diff --git a/InteractionTest/format.json b/.DepricatedMods/InteractionTest/format.json similarity index 100% rename from InteractionTest/format.json rename to .DepricatedMods/InteractionTest/format.json diff --git a/LateInitComponentHelperHack/LateInitComponentHelperHack.csproj b/.DepricatedMods/LateInitComponentHelperHack/LateInitComponentHelperHack.csproj similarity index 100% rename from LateInitComponentHelperHack/LateInitComponentHelperHack.csproj rename to .DepricatedMods/LateInitComponentHelperHack/LateInitComponentHelperHack.csproj diff --git a/LateInitComponentHelperHack/Main.cs b/.DepricatedMods/LateInitComponentHelperHack/Main.cs similarity index 100% rename from LateInitComponentHelperHack/Main.cs rename to .DepricatedMods/LateInitComponentHelperHack/Main.cs diff --git a/LateInitComponentHelperHack/Properties/AssemblyInfo.cs b/.DepricatedMods/LateInitComponentHelperHack/Properties/AssemblyInfo.cs similarity index 100% rename from LateInitComponentHelperHack/Properties/AssemblyInfo.cs rename to .DepricatedMods/LateInitComponentHelperHack/Properties/AssemblyInfo.cs diff --git a/LateInitComponentHelperHack/format.json b/.DepricatedMods/LateInitComponentHelperHack/format.json similarity index 100% rename from LateInitComponentHelperHack/format.json rename to .DepricatedMods/LateInitComponentHelperHack/format.json diff --git a/PickupPushPull/HarmonyPatches.cs b/.DepricatedMods/PickupPushPull/HarmonyPatches.cs similarity index 100% rename from PickupPushPull/HarmonyPatches.cs rename to .DepricatedMods/PickupPushPull/HarmonyPatches.cs diff --git a/PickupPushPull/InputModules/PickupPushPull_Module.cs b/.DepricatedMods/PickupPushPull/InputModules/PickupPushPull_Module.cs similarity index 100% rename from PickupPushPull/InputModules/PickupPushPull_Module.cs rename to .DepricatedMods/PickupPushPull/InputModules/PickupPushPull_Module.cs diff --git a/PickupPushPull/Main.cs b/.DepricatedMods/PickupPushPull/Main.cs similarity index 100% rename from PickupPushPull/Main.cs rename to .DepricatedMods/PickupPushPull/Main.cs diff --git a/PickupPushPull/PickupPushPull.csproj b/.DepricatedMods/PickupPushPull/PickupPushPull.csproj similarity index 100% rename from PickupPushPull/PickupPushPull.csproj rename to .DepricatedMods/PickupPushPull/PickupPushPull.csproj diff --git a/PickupPushPull/Properties/AssemblyInfo.cs b/.DepricatedMods/PickupPushPull/Properties/AssemblyInfo.cs similarity index 100% rename from PickupPushPull/Properties/AssemblyInfo.cs rename to .DepricatedMods/PickupPushPull/Properties/AssemblyInfo.cs diff --git a/PickupPushPull/format.json b/.DepricatedMods/PickupPushPull/format.json similarity index 100% rename from PickupPushPull/format.json rename to .DepricatedMods/PickupPushPull/format.json diff --git a/SmoothRay/HarmonyPatches.cs b/.DepricatedMods/SmoothRay/HarmonyPatches.cs similarity index 100% rename from SmoothRay/HarmonyPatches.cs rename to .DepricatedMods/SmoothRay/HarmonyPatches.cs diff --git a/SmoothRay/Main.cs b/.DepricatedMods/SmoothRay/Main.cs similarity index 100% rename from SmoothRay/Main.cs rename to .DepricatedMods/SmoothRay/Main.cs diff --git a/SmoothRay/Properties/AssemblyInfo.cs b/.DepricatedMods/SmoothRay/Properties/AssemblyInfo.cs similarity index 100% rename from SmoothRay/Properties/AssemblyInfo.cs rename to .DepricatedMods/SmoothRay/Properties/AssemblyInfo.cs diff --git a/SmoothRay/README.md b/.DepricatedMods/SmoothRay/README.md similarity index 100% rename from SmoothRay/README.md rename to .DepricatedMods/SmoothRay/README.md diff --git a/SmoothRay/SmoothRay.cs b/.DepricatedMods/SmoothRay/SmoothRay.cs similarity index 100% rename from SmoothRay/SmoothRay.cs rename to .DepricatedMods/SmoothRay/SmoothRay.cs diff --git a/SmoothRay/SmoothRay.csproj b/.DepricatedMods/SmoothRay/SmoothRay.csproj similarity index 100% rename from SmoothRay/SmoothRay.csproj rename to .DepricatedMods/SmoothRay/SmoothRay.csproj diff --git a/SmoothRay/format.json b/.DepricatedMods/SmoothRay/format.json similarity index 100% rename from SmoothRay/format.json rename to .DepricatedMods/SmoothRay/format.json diff --git a/TrackedControllerFix/HarmonyPatches.cs b/.DepricatedMods/TrackedControllerFix/HarmonyPatches.cs similarity index 100% rename from TrackedControllerFix/HarmonyPatches.cs rename to .DepricatedMods/TrackedControllerFix/HarmonyPatches.cs diff --git a/TrackedControllerFix/Main.cs b/.DepricatedMods/TrackedControllerFix/Main.cs similarity index 100% rename from TrackedControllerFix/Main.cs rename to .DepricatedMods/TrackedControllerFix/Main.cs diff --git a/TrackedControllerFix/Properties/AssemblyInfo.cs b/.DepricatedMods/TrackedControllerFix/Properties/AssemblyInfo.cs similarity index 100% rename from TrackedControllerFix/Properties/AssemblyInfo.cs rename to .DepricatedMods/TrackedControllerFix/Properties/AssemblyInfo.cs diff --git a/TrackedControllerFix/README.md b/.DepricatedMods/TrackedControllerFix/README.md similarity index 100% rename from TrackedControllerFix/README.md rename to .DepricatedMods/TrackedControllerFix/README.md diff --git a/TrackedControllerFix/TrackedControllerFix.csproj b/.DepricatedMods/TrackedControllerFix/TrackedControllerFix.csproj similarity index 100% rename from TrackedControllerFix/TrackedControllerFix.csproj rename to .DepricatedMods/TrackedControllerFix/TrackedControllerFix.csproj diff --git a/TrackedControllerFix/TrackedControllerFixer.cs b/.DepricatedMods/TrackedControllerFix/TrackedControllerFixer.cs similarity index 100% rename from TrackedControllerFix/TrackedControllerFixer.cs rename to .DepricatedMods/TrackedControllerFix/TrackedControllerFixer.cs diff --git a/TrackedControllerFix/format.json b/.DepricatedMods/TrackedControllerFix/format.json similarity index 100% rename from TrackedControllerFix/format.json rename to .DepricatedMods/TrackedControllerFix/format.json diff --git a/AvatarScale/AvatarScaling/AvatarScaleManager.cs b/AvatarScale/AvatarScaling/AvatarScaleManager.cs index 6f2e4c2..906c057 100644 --- a/AvatarScale/AvatarScaling/AvatarScaleManager.cs +++ b/AvatarScale/AvatarScaling/AvatarScaleManager.cs @@ -43,16 +43,25 @@ public class AvatarScaleManager : MonoBehaviour set { if (value != _settingUniversalScaling && value == false) - ResetTargetHeight(); + _localAvatarScaler.UseTargetHeight = false; _settingUniversalScaling = value; - SetTargetHeight(_lastTargetHeight); // immediate height update + _localAvatarScaler.UseTargetHeight = true; } } public bool Setting_AnimationClipScalingOverride; public bool Setting_PersistentHeight; - private float _lastTargetHeight = -1; + private float _lastTargetHeight = -1f; + public float LastTargetHeight + { + get => _lastTargetHeight; + set + { + _lastTargetHeight = value; + ModSettings.EntryHiddenAvatarHeight.Value = _lastTargetHeight; + } + } #endregion @@ -122,21 +131,6 @@ public class AvatarScaleManager : MonoBehaviour while (enabled) { yield return _heightUpdateYield; - - // update local scaler - if (_localAvatarScaler != null && _localAvatarScaler.heightNeedsUpdate) - { - if (_localAvatarScaler.ApplyTargetHeight()) - AvatarScaleEvents.OnLocalAvatarHeightChanged.Invoke(_localAvatarScaler); - } - - // update networked scalers (probably a better way to do this) - foreach (var netScaler in _networkedScalers) - { - if (!netScaler.Value.heightNeedsUpdate) continue; - if (netScaler.Value.ApplyTargetHeight()) - AvatarScaleEvents.OnRemoteAvatarHeightChanged.Invoke(netScaler.Key, netScaler.Value); - } } // ReSharper disable once IteratorNeverReturns @@ -179,31 +173,11 @@ public class AvatarScaleManager : MonoBehaviour public void SetTargetHeight(float targetHeight) { _lastTargetHeight = targetHeight; // save for persistent height - ModSettings.EntryHiddenAvatarHeight.Value = targetHeight; // save for restart - - if (!_settingUniversalScaling) - return; if (_localAvatarScaler == null) return; - _localAvatarScaler.SetTargetHeight(_lastTargetHeight); - _localAvatarScaler.heightNeedsUpdate = true; // only local scaler forces update - } - - public void ResetTargetHeight() - { - if (_localAvatarScaler == null) - return; - - if (!_localAvatarScaler.IsForcingHeight()) - return; - - // TODO: doesnt work when hitting Reset on slider in BTK UI (is it on main thread?) - CohtmlHud.Instance.ViewDropTextImmediate("(Local) AvatarScaleMod", "Avatar Scale Reset!", - "Universal Scaling is now disabled."); - - SetTargetHeight(-1f); + _localAvatarScaler.TargetHeight = _lastTargetHeight; } public float GetHeight() @@ -285,7 +259,7 @@ public class AvatarScaleManager : MonoBehaviour internal void OnNetworkHeightUpdateReceived(string playerId, float targetHeight) { if (_networkedScalers.TryGetValue(playerId, out NetworkScaler scaler)) - scaler.SetTargetHeight(targetHeight); + scaler.TargetHeight = targetHeight; else SetupHeightScalerForNetwork(playerId, targetHeight); } @@ -352,7 +326,7 @@ public class AvatarScaleManager : MonoBehaviour _networkedScalers[playerId] = scaler; - scaler.SetTargetHeight(targetHeight); // set initial height + scaler.TargetHeight = targetHeight; } #endregion diff --git a/AvatarScale/AvatarScaling/Components/BaseScaler.cs b/AvatarScale/AvatarScaling/Components/BaseScaler.cs index 91cf4dc..702e595 100644 --- a/AvatarScale/AvatarScaling/Components/BaseScaler.cs +++ b/AvatarScale/AvatarScaling/Components/BaseScaler.cs @@ -52,18 +52,52 @@ public class BaseScaler : MonoBehaviour #endregion #region Variables - - // Height update requested - public bool heightNeedsUpdate { get; internal set; } + + private float _targetHeight; + public float TargetHeight + { + get => _targetHeight; + set + { + if (value < float.Epsilon) + { + // reset to animated height + _targetHeight = _animatedHeight; + _targetScale = _animatedScale; + _scaleFactor = _animatedScaleFactor; + _targetHeightChanged = true; + return; + } + + _targetHeight = Mathf.Clamp(value, AvatarScaleManager.MinHeight, AvatarScaleManager.MaxHeight); + _scaleFactor = Mathf.Max(_targetHeight / _initialHeight, 0.01f); //safety + _targetScale = _initialScale * _scaleFactor; + _targetHeightChanged = true; + } + } + + protected bool _useTargetHeight; + public bool UseTargetHeight + { + get => _useTargetHeight; + set + { + if (_useTargetHeight == value) + return; + + _useTargetHeight = value; + _targetHeightChanged = true; + } + } // Config variables public bool avatarIsHidden { get; set; } - public bool useTargetHeight { get; set; } public bool overrideAnimationHeight { get; set; } // State variables internal bool _isAvatarInstantiated; - internal bool _shouldForceHeight => useTargetHeight || avatarIsHidden; // universal or hidden avatar + private bool _shouldForceHeight => _useTargetHeight || avatarIsHidden; + private bool _targetHeightChanged; // Avatar info internal Transform _avatarTransform; @@ -74,7 +108,6 @@ public class BaseScaler : MonoBehaviour internal Vector3 _initialScale; // Forced scaling (Universal & Hidden Avatar) - internal float _targetHeight = -1; internal Vector3 _targetScale = Vector3.one; internal float _scaleFactor = 1f; @@ -121,7 +154,6 @@ public class BaseScaler : MonoBehaviour _isAvatarInstantiated = false; _avatarTransform = null; - heightNeedsUpdate = false; ClearComponentLists(); } @@ -133,36 +165,11 @@ public class BaseScaler : MonoBehaviour public float GetTargetHeight() => _targetHeight; public float GetAnimatedHeight() => _animatedHeight; public bool IsForcingHeight() => _shouldForceHeight; + + #endregion + + #region Private Methods - public void SetTargetHeight(float height) - { - if (height < float.Epsilon) - { - ResetTargetHeight(); - return; - } - - _targetHeight = Mathf.Clamp(height, AvatarScaleManager.MinHeight, AvatarScaleManager.MaxHeight); - _scaleFactor = Mathf.Max(_targetHeight / _initialHeight, 0.01f); //safety - _targetScale = _initialScale * _scaleFactor; - - InvokeTargetHeightChanged(); - } - - public void ResetTargetHeight() - { - // if (Math.Abs(_initialHeight - _targetHeight) < float.Epsilon) - // return; // no need to change, is close enough - - useTargetHeight = false; - - _targetHeight = _animatedHeight; - _targetScale = _animatedScale; - _scaleFactor = _animatedScaleFactor; - - InvokeTargetHeightReset(); - } - public bool ApplyTargetHeight() { if (!_isAvatarInstantiated || _initialHeight == 0) @@ -171,17 +178,29 @@ public class BaseScaler : MonoBehaviour if (_avatarTransform == null) return false; - heightNeedsUpdate = false; - ScaleAvatarRoot(); UpdateAnimatorParameter(); ApplyComponentScaling(); return true; } + + protected void ResetTargetHeight() + { + if (!_isAvatarInstantiated) + return; - #endregion - - #region Private Methods + if (_avatarTransform == null) + return; + + _targetHeight = _initialHeight; + _targetScale = _initialScale; + _scaleFactor = 1f; + _targetHeightChanged = true; + + ScaleAvatarRoot(); + UpdateAnimatorParameter(); + ApplyComponentScaling(); + } private void ScaleAvatarRoot() { @@ -203,10 +222,17 @@ public class BaseScaler : MonoBehaviour if (!_isAvatarInstantiated) return; // no avatar - if (!_shouldForceHeight) - return; // not universal scaling or hidden avatar + if (!_targetHeightChanged + && _useTargetHeight) + ScaleAvatarRoot(); - ScaleAvatarRoot(); + if (!_targetHeightChanged) + return; + + if (_useTargetHeight) + ApplyTargetHeight(); + else + ResetTargetHeight(); } internal virtual void OnDestroy() diff --git a/AvatarScale/AvatarScaling/Components/LocalScaler.cs b/AvatarScale/AvatarScaling/Components/LocalScaler.cs index e86b8d8..8360d47 100644 --- a/AvatarScale/AvatarScaling/Components/LocalScaler.cs +++ b/AvatarScale/AvatarScaling/Components/LocalScaler.cs @@ -12,8 +12,6 @@ public class LocalScaler : BaseScaler public void Initialize() { _animatorManager = GetComponentInParent().animatorManager; - - heightNeedsUpdate = false; _isAvatarInstantiated = false; } @@ -78,7 +76,7 @@ public class LocalScaler : BaseScaler InvokeAnimatedHeightChanged(); if (overrideAnimationHeight - || !useTargetHeight) + || !_useTargetHeight) return false; // user has disabled animation height override or is not using universal scaling // animation scale changed and now will override universal scaling diff --git a/AvatarScale/AvatarScaling/Components/NetworkScaler.cs b/AvatarScale/AvatarScaling/Components/NetworkScaler.cs index 039f159..9c43f75 100644 --- a/AvatarScale/AvatarScaling/Components/NetworkScaler.cs +++ b/AvatarScale/AvatarScaling/Components/NetworkScaler.cs @@ -17,7 +17,6 @@ public class NetworkScaler : BaseScaler _animatorManager = GetComponentInParent().animatorManager; - heightNeedsUpdate = false; _isAvatarInstantiated = false; } diff --git a/AvatarScale/Input/DebugKeybinds.cs b/AvatarScale/Input/DebugKeybinds.cs index 4777e41..27f55e1 100644 --- a/AvatarScale/Input/DebugKeybinds.cs +++ b/AvatarScale/Input/DebugKeybinds.cs @@ -33,11 +33,11 @@ internal static class DebugKeybinds AvatarScaleManager.Instance.SetTargetHeight(currentHeight); AvatarScaleMod.Logger.Msg($"[Debug] Setting height: {currentHeight}"); - } + } private static void ResetHeight() { - AvatarScaleManager.Instance.ResetTargetHeight(); + AvatarScaleManager.Instance.Setting_UniversalScaling = false; AvatarScaleMod.Logger.Msg("[Debug] Resetting height."); } } \ No newline at end of file diff --git a/AvatarScale/Integrations/BTKUI/BtkUiAddon.cs b/AvatarScale/Integrations/BTKUI/BtkUiAddon.cs index 2196cdd..09a5ff4 100644 --- a/AvatarScale/Integrations/BTKUI/BtkUiAddon.cs +++ b/AvatarScale/Integrations/BTKUI/BtkUiAddon.cs @@ -88,7 +88,7 @@ namespace NAK.AvatarScaleMod.Integrations TimeSpan timeDifference = DateTime.Now - lastTime; if (timeDifference.TotalSeconds <= 0.5) { - AvatarScaleManager.Instance.ResetTargetHeight(); + AvatarScaleManager.Instance.Setting_UniversalScaling = false; return; } } diff --git a/AvatarScale/Integrations/BTKUI/BtkUiAddon_CAT_UniversalScalingSettings.cs b/AvatarScale/Integrations/BTKUI/BtkUiAddon_CAT_UniversalScalingSettings.cs index 3dff0b4..216fa48 100644 --- a/AvatarScale/Integrations/BTKUI/BtkUiAddon_CAT_UniversalScalingSettings.cs +++ b/AvatarScale/Integrations/BTKUI/BtkUiAddon_CAT_UniversalScalingSettings.cs @@ -67,7 +67,7 @@ namespace NAK.AvatarScaleMod.Integrations private static void OnAvatarHeightSliderReset() { - AvatarScaleManager.Instance.ResetTargetHeight(); + AvatarScaleManager.Instance.Setting_UniversalScaling = false; } #endregion