diff --git a/References.Items.props b/References.Items.props index 95eaa0f..b618151 100644 --- a/References.Items.props +++ b/References.Items.props @@ -196,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 @@ -596,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 @@ -632,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/TwoWayMute/Main.cs b/TwoWayMute/Main.cs new file mode 100644 index 0000000..8d6de3e --- /dev/null +++ b/TwoWayMute/Main.cs @@ -0,0 +1,24 @@ +using System.Reflection; +using ABI_RC.Systems.Communications.Audio.Components; +using HarmonyLib; +using MelonLoader; + +namespace NAK.TwoWayMute; + +public class TwoWayMuteMod : MelonMod +{ + public override void OnInitializeMelon() + { + HarmonyInstance.Patch( + typeof(Comms_ParticipantPipeline).GetMethod(nameof(Comms_ParticipantPipeline.SetFlowControlState), + BindingFlags.NonPublic | BindingFlags.Instance), + prefix: new HarmonyMethod(typeof(TwoWayMuteMod).GetMethod(nameof(OnSetFlowControlState), + BindingFlags.NonPublic | BindingFlags.Static)) + ); + } + + private static void OnSetFlowControlState( + ref bool state, + Comms_ParticipantPipeline __instance) + => state &= !__instance._selfModerationMute; +} \ No newline at end of file diff --git a/TwoWayMute/Properties/AssemblyInfo.cs b/TwoWayMute/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0c53769 --- /dev/null +++ b/TwoWayMute/Properties/AssemblyInfo.cs @@ -0,0 +1,32 @@ +using NAK.TwoWayMute.Properties; +using MelonLoader; +using System.Reflection; + +[assembly: AssemblyVersion(AssemblyInfoParams.Version)] +[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)] +[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)] +[assembly: AssemblyTitle(nameof(NAK.TwoWayMute))] +[assembly: AssemblyCompany(AssemblyInfoParams.Author)] +[assembly: AssemblyProduct(nameof(NAK.TwoWayMute))] + +[assembly: MelonInfo( + typeof(NAK.TwoWayMute.TwoWayMuteMod), + nameof(NAK.TwoWayMute), + AssemblyInfoParams.Version, + AssemblyInfoParams.Author, + downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/TwoWayMute" +)] + +[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.TwoWayMute.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/TwoWayMute/README.md b/TwoWayMute/README.md new file mode 100644 index 0000000..8732b10 --- /dev/null +++ b/TwoWayMute/README.md @@ -0,0 +1,15 @@ +# TwoWayMute + +Adjusts the self moderation muting behaviour to also prevent the muted user from hearing you. +Basically- if you mute someone, they will also not be able to hear you. + +--- + +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/TwoWayMute/TwoWayMute.csproj b/TwoWayMute/TwoWayMute.csproj new file mode 100644 index 0000000..4e44ed3 --- /dev/null +++ b/TwoWayMute/TwoWayMute.csproj @@ -0,0 +1,11 @@ + + + + net48 + + + + ..\.ManagedLibs\TheClapper.dll + + + diff --git a/TwoWayMute/format.json b/TwoWayMute/format.json new file mode 100644 index 0000000..db2dbc9 --- /dev/null +++ b/TwoWayMute/format.json @@ -0,0 +1,23 @@ +{ + "_id": -1, + "name": "TwoWayMute", + "modversion": "1.0.0", + "gameversion": "2024r177", + "loaderversion": "0.6.1", + "modtype": "Mod", + "author": "NotAKidoS", + "description": "Adjusts the self moderation muting behaviour to also prevent the muted user from hearing you.\nBasically- if you mute someone, they will also not be able to hear you.", + "searchtags": [ + "mute", + "communication", + "meow", + "car" + ], + "requirements": [ + "None" + ], + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r44/TwoWayMute.dll", + "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/TwoWayMute/", + "changelog": "- Initial Release", + "embedcolor": "#f61963" +} \ No newline at end of file