From fe6f19a3544a309d374c2cf33b716b3992f82e51 Mon Sep 17 00:00:00 2001 From: Max <89798523+MaxWasUnavailable@users.noreply.github.com> Date: Sun, 18 Feb 2024 02:55:41 +0100 Subject: [PATCH] Allow LobbyCompat to join unknown/vanilla lobbies with unknown mods --- LobbyCompatibility/Features/PluginHelper.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/LobbyCompatibility/Features/PluginHelper.cs b/LobbyCompatibility/Features/PluginHelper.cs index 7e016c2..4bd2784 100644 --- a/LobbyCompatibility/Features/PluginHelper.cs +++ b/LobbyCompatibility/Features/PluginHelper.cs @@ -186,12 +186,15 @@ internal static bool MatchesTargetRequirements(IEnumerable tar } /// - /// Checks if client is allowed to join vanilla lobbies. + /// Checks if client is allowed to join vanilla or unknown lobbies. /// - /// True if client is allowed to join vanilla lobbies, false otherwise. + /// True if client is allowed to join vanilla or unknown lobbies, false otherwise. + /// This means the client is allowed to have unknown or clientside mods. internal static bool CanJoinVanillaLobbies() { - return GetAllPluginInfo().All(plugin => plugin.CompatibilityLevel is CompatibilityLevel.ClientOnly or null); + return GetAllPluginInfo().All(plugin => + plugin.CompatibilityLevel != CompatibilityLevel.ServerOnly && + plugin.CompatibilityLevel != CompatibilityLevel.ClientOptional); } ///