Skip to content

Commit

Permalink
Fix: revert changes to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
searica committed Nov 24, 2024
1 parent 525183d commit 74592b2
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions JotunnLib/Utils/ModCompatibility/ModCompatibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,28 +217,27 @@ internal static bool CompareVersionData(ModuleVersionData serverData, ModuleVers
return true;
}

// Check for compatible ModModule data layout versions
//if (serverData.ModModuleDataLayout != clientData.ModModuleDataLayout)
//{
// Logger.LogWarning("Jotunn versions on server and client are not compatible.");
// return false;
//}

bool result = true;

// Check for supported ModModule data layout
if (!clientData.IsSupportedDataLayout)
{
Logger.LogWarning($"Jotunn version on client is higher than server version: {Main.Version}");
return false;
result = false;
}

if (!serverData.IsSupportedDataLayout)
{
Logger.LogWarning($"Jotunn version on server is higher than client version: {Main.Version}");
return false;
}

// Check for compatible ModModule data layout versions
if (serverData.ModModuleDataLayout != clientData.ModModuleDataLayout)
{
Logger.LogWarning("Jotunn versions on server and client are not compatible.");
return false;
result = false;
}

bool result = true;

// Check server enforced mods
foreach (var serverModule in FindNotInstalledMods(serverData, clientData))
{
Expand Down Expand Up @@ -350,13 +349,13 @@ private static void OpenTroubleshootingPage()
/// <returns></returns>
private static string CreateErrorMessage(ModuleVersionData serverData, ModuleVersionData clientData)
{
string dataLayoutErrMsg = CreateModModuleLayoutErrorMessage(serverData, clientData);
if (!string.IsNullOrEmpty(dataLayoutErrMsg))
{
return CreateVanillaVersionErrorMessage(serverData, clientData) +
dataLayoutErrMsg +
CreateFurtherStepsMessage();
}
//string dataLayoutErrMsg = CreateModModuleLayoutErrorMessage(serverData, clientData);
//if (!string.IsNullOrEmpty(dataLayoutErrMsg))
//{
// return CreateVanillaVersionErrorMessage(serverData, clientData) +
// dataLayoutErrMsg +
// CreateFurtherStepsMessage();
//}

return CreateVanillaVersionErrorMessage(serverData, clientData) +
CreateNotInstalledErrorMessage(serverData, clientData) +
Expand Down

0 comments on commit 74592b2

Please sign in to comment.