NOISSUE finalize support for new mojang version format

This commit is contained in:
Petr Mrázek
2016-03-26 16:56:57 +01:00
parent d587720010
commit f032e32133
42 changed files with 805 additions and 612 deletions

View File

@@ -25,14 +25,14 @@ bool VersionFile::hasJarMods()
void VersionFile::applyTo(MinecraftProfile *profile)
{
auto theirVersion = profile->getMinecraftVersion();
if (!theirVersion.isNull() && !mcVersion.isNull())
if (!theirVersion.isNull() && !dependsOnMinecraftVersion.isNull())
{
if (QRegExp(mcVersion, Qt::CaseInsensitive, QRegExp::Wildcard).indexIn(theirVersion) == -1)
if (QRegExp(dependsOnMinecraftVersion, Qt::CaseInsensitive, QRegExp::Wildcard).indexIn(theirVersion) == -1)
{
throw MinecraftVersionMismatch(fileId, mcVersion, theirVersion);
throw MinecraftVersionMismatch(fileId, dependsOnMinecraftVersion, theirVersion);
}
}
profile->applyMinecraftVersion(id);
profile->applyMinecraftVersion(minecraftVersion);
profile->applyMainClass(mainClass);
profile->applyAppletClass(appletClass);
profile->applyMinecraftArguments(minecraftArguments);
@@ -51,4 +51,10 @@ void VersionFile::applyTo(MinecraftProfile *profile)
profile->applyLibrary(library);
}
profile->applyProblemSeverity(getProblemSeverity());
auto iter = mojangDownloads.begin();
while(iter != mojangDownloads.end())
{
profile->applyMojangDownload(iter.key(), iter.value());
iter++;
}
}