summaryrefslogtreecommitdiffstats
path: root/logic/lists/MinecraftVersionList.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-04-23 02:27:40 +0200
committerPetr Mrázek <peterix@gmail.com>2014-06-09 01:38:29 +0200
commitaade36860c373268857ca821c14a13f38c880b1a (patch)
tree464b804216c7eadc00941daa33a1713c8071a088 /logic/lists/MinecraftVersionList.cpp
parent3a0cdf2d3dde6192694ca34429ab277608357c2a (diff)
downloadMultiMC-aade36860c373268857ca821c14a13f38c880b1a.tar
MultiMC-aade36860c373268857ca821c14a13f38c880b1a.tar.gz
MultiMC-aade36860c373268857ca821c14a13f38c880b1a.tar.lz
MultiMC-aade36860c373268857ca821c14a13f38c880b1a.tar.xz
MultiMC-aade36860c373268857ca821c14a13f38c880b1a.zip
Begin the transformation!
Nuke all the things.
Diffstat (limited to 'logic/lists/MinecraftVersionList.cpp')
-rw-r--r--logic/lists/MinecraftVersionList.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/logic/lists/MinecraftVersionList.cpp b/logic/lists/MinecraftVersionList.cpp
index b9d60c61..ec2f2d21 100644
--- a/logic/lists/MinecraftVersionList.cpp
+++ b/logic/lists/MinecraftVersionList.cpp
@@ -212,6 +212,7 @@ void MCVListLoadTask::list_downloaded()
{
bool is_snapshot = false;
bool is_latest = false;
+ bool legacyLaunch = false;
// Load the version info.
if (!versions[i].isObject())
@@ -236,32 +237,28 @@ void MCVListLoadTask::list_downloaded()
// FIXME: log this somewhere
continue;
}
- // Parse the type.
- MinecraftVersion::VersionType versionType;
// OneSix or Legacy. use filter to determine type
if (versionTypeStr == "release")
{
- versionType = legacyWhitelist.contains(versionID) ? MinecraftVersion::Legacy
- : MinecraftVersion::OneSix;
+ legacyLaunch = legacyWhitelist.contains(versionID);
is_latest = (versionID == latestReleaseID);
is_snapshot = false;
}
else if (versionTypeStr == "snapshot") // It's a snapshot... yay
{
- versionType = legacyWhitelist.contains(versionID) ? MinecraftVersion::Legacy
- : MinecraftVersion::OneSix;
+ legacyLaunch = legacyWhitelist.contains(versionID);
is_latest = (versionID == latestSnapshotID);
is_snapshot = true;
}
else if (versionTypeStr == "old_alpha")
{
- versionType = MinecraftVersion::Nostalgia;
+ legacyLaunch = false;
is_latest = false;
is_snapshot = false;
}
else if (versionTypeStr == "old_beta")
{
- versionType = MinecraftVersion::Legacy;
+ legacyLaunch = true;
is_latest = false;
is_snapshot = false;
}
@@ -280,7 +277,8 @@ void MCVListLoadTask::list_downloaded()
mcVersion->download_url = dlUrl;
mcVersion->is_latest = is_latest;
mcVersion->is_snapshot = is_snapshot;
- mcVersion->type = versionType;
+ if(legacyLaunch)
+ mcVersion->features.insert("legacy");
tempList.append(mcVersion);
}
m_list->updateListData(tempList);