From aade36860c373268857ca821c14a13f38c880b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 23 Apr 2014 02:27:40 +0200 Subject: Begin the transformation! Nuke all the things. --- logic/lists/MinecraftVersionList.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'logic/lists/MinecraftVersionList.cpp') 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); -- cgit v1.2.3