Change "Unknown" lobby behaviour to be more compatible
legoandmars opened this issue · 1 comments
Currently, lobbies are marked as Unknown
when:
- There are no mods installed on both the client and server
- There are no incompatible mods on the client
This is the theoretically most correct way to do it - if you have an Everyone
mod installed, it technically shouldn't be compatible with an unknown lobby.
However, it is very likely some people will be running exactly the same mod setups (some with LobbyCompatibility, some without) in the following situations:
- The early transition period, when not everybody has updated
- Any mods that use a soft dependency with an
Everyone
/ClientOptional
value
At least for now, we should allow people to join Unknown
lobbies to avoid any compatibility issues.
Later on, this can likely be changed once we have a large amount of mods using LC.
The following need to be done:
- Update LobbyDiff to ALWAYS label lobbies without LC as unknown, regardless of the client's mods. This is how it was done in one of my previous PRs, but any way to check "the server returned null for LC mods" would suffice.
if (PluginDiffs.Count == 0)
{
_cachedResult = LobbyDiffResult.Unknown;
return LobbyDiffResult.Unknown;
}
if (PluginDiffs.All(pluginDiff => pluginDiff.RequiredVersion == null))
{
_cachedResult = LobbyDiffResult.Unknown;
return LobbyDiffResult.Unknown;
}
- The join block patches need to be edited to allow you to join Unknown lobbies.
Not strictly required, but would be nice UI to have:
- Ideally, trying to join an unknown lobby (from the public lobby menu) would show some sort of warning that it could be incompatible.
- When viewing the modlist for an unknown lobby, instead of just showing the client's mods, some sort of text like "Could not find mod data for lobby" should be shown.
related: unknown mods should always show version - right now if a server has an unknown mod, it's impossible to see version