Skip to content

Commit

Permalink
Allow LobbyCompat to join unknown/vanilla lobbies with unknown mods
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxWasUnavailable committed Feb 18, 2024
1 parent d775e61 commit fe6f19a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions LobbyCompatibility/Features/PluginHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,15 @@ internal static bool MatchesTargetRequirements(IEnumerable<PluginInfoRecord> tar
}

/// <summary>
/// Checks if client is allowed to join vanilla lobbies.
/// Checks if client is allowed to join vanilla or unknown lobbies.
/// </summary>
/// <returns> True if client is allowed to join vanilla lobbies, false otherwise. </returns>
/// <returns> True if client is allowed to join vanilla or unknown lobbies, false otherwise. </returns>
/// <remarks> This means the client is allowed to have unknown or clientside mods. </remarks>
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);
}

/// <summary>
Expand Down

0 comments on commit fe6f19a

Please sign in to comment.