diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d9293e..bd52770 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Remastered recently added tracks at conventional 44100 Hz for better stitching. - Improved playback experience: use precise DSP time and up-front scheduing for seamless audio stitching, add custom Audio Sources to improve reliability. - Removed remaining CSync code and package references even from debug builds. +- Downgraded LobbyCompatibility to optional dependency. ## MuzikaGromche 1337.420.9001 - Multiverse Edition diff --git a/MuzikaGromche/Compatibility.cs b/MuzikaGromche/Compatibility.cs new file mode 100644 index 0000000..a3838b0 --- /dev/null +++ b/MuzikaGromche/Compatibility.cs @@ -0,0 +1,26 @@ +using BepInEx; +using BepInEx.Bootstrap; +using LobbyCompatibility.Enums; +using LobbyCompatibility.Features; +using System.Runtime.CompilerServices; + +namespace MuzikaGromche +{ + internal static class Compatibility + { + [MethodImpl(MethodImplOptions.NoInlining)] + public static void Register(BaseUnityPlugin plugin) + { + if (Chainloader.PluginInfos.ContainsKey("BMX.LobbyCompatibility")) + { + RegisterLobbyCompatibility(plugin.Info.Metadata); + } + } + + [MethodImpl(MethodImplOptions.NoInlining)] + private static void RegisterLobbyCompatibility(BepInPlugin plugin) + { + PluginHelper.RegisterPlugin(plugin.GUID, plugin.Version, CompatibilityLevel.Everyone, VersionStrictness.Patch); + } + } +} diff --git a/MuzikaGromche/Plugin.cs b/MuzikaGromche/Plugin.cs index 394a960..ebb9966 100644 --- a/MuzikaGromche/Plugin.cs +++ b/MuzikaGromche/Plugin.cs @@ -4,8 +4,6 @@ using HarmonyLib; using LethalConfig; using LethalConfig.ConfigItems; using LethalConfig.ConfigItems.Options; -using LobbyCompatibility.Attributes; -using LobbyCompatibility.Enums; using System; using System.Collections; using System.Collections.Generic; @@ -24,8 +22,7 @@ namespace MuzikaGromche [BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)] [BepInDependency("ainavt.lc.lethalconfig", "1.4.6")] [BepInDependency("watergun.v72lightfix", BepInDependency.DependencyFlags.SoftDependency)] - [BepInDependency("BMX.LobbyCompatibility", BepInDependency.DependencyFlags.HardDependency)] - [LobbyCompatibility(CompatibilityLevel.Everyone, VersionStrictness.Patch)] + [BepInDependency("BMX.LobbyCompatibility", BepInDependency.DependencyFlags.SoftDependency)] public class Plugin : BaseUnityPlugin { internal new static Config Config { get; private set; } = null!; @@ -693,6 +690,7 @@ namespace MuzikaGromche harmony.PatchAll(typeof(DiscoBallDespawnPatch)); harmony.PatchAll(typeof(SpawnRatePatch)); NetcodePatcher(); + Compatibility.Register(this); } else { diff --git a/README.md b/README.md index e7f9cbd..1367349 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ To keep it a surprise, it is adviced that you do not read the detailed descripti Muzika Gromche is compatible with *Almost Vanillaâ„¢* gameplay and [*High Quota Mindset*](https://youtu.be/18RUCgQldGg?t=2553). It slightly changes certain timers, so won't be compatible with leaderboards. If you are a streamerâ„¢, be aware that it does play *copyrighted content.* -Muzika Gromche works with all Lethal Company versions from v72 all the way back to v40, and is likely to work on all future versions as long as dependencies ([`LethalConfig`] and [`LobbyCompatibility`]) are working. +Muzika Gromche works with all Lethal Company versions from v72 all the way back to v40, and is likely to work on all future versions as long as dependencies are working. [`LobbyCompatibility`] is recommended but optional. Speaking of dependencies, [`V70PoweredLights_Fix`] is not strictly required, but it doesn't hurt to have it installed on any version, and it makes this mod more enjoyable on new Mansion tiles. diff --git a/manifest.json b/manifest.json index 33bf952..e92eb2e 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,6 @@ "dependencies": [ "BepInEx-BepInExPack-5.4.2100", "AinaVT-LethalConfig-1.4.6", - "WaterGun-V70PoweredLights_Fix-1.0.0", - "BMX-LobbyCompatibility-1.5.1" + "WaterGun-V70PoweredLights_Fix-1.0.0" ] }