summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/update
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-11-04 22:55:25 +0100
committerPetr Mrázek <peterix@gmail.com>2017-11-17 15:44:13 +0100
commit17c8f31a09da6bdfc4aa7f67b2ca86b791f2ba96 (patch)
tree47330451b2a147ee54b2e63c5a1e614e4f88268b /api/logic/minecraft/update
parent3470158943acb9fc4439ea255fe3ea0fbc7dbc85 (diff)
downloadMultiMC-17c8f31a09da6bdfc4aa7f67b2ca86b791f2ba96.tar
MultiMC-17c8f31a09da6bdfc4aa7f67b2ca86b791f2ba96.tar.gz
MultiMC-17c8f31a09da6bdfc4aa7f67b2ca86b791f2ba96.tar.lz
MultiMC-17c8f31a09da6bdfc4aa7f67b2ca86b791f2ba96.tar.xz
MultiMC-17c8f31a09da6bdfc4aa7f67b2ca86b791f2ba96.zip
NOISSUE split out the LaunchProfile out of the ComponentList
Diffstat (limited to 'api/logic/minecraft/update')
-rw-r--r--api/logic/minecraft/update/AssetUpdateTask.cpp6
-rw-r--r--api/logic/minecraft/update/FMLLibrariesTask.cpp5
-rw-r--r--api/logic/minecraft/update/LibrariesTask.cpp3
3 files changed, 9 insertions, 5 deletions
diff --git a/api/logic/minecraft/update/AssetUpdateTask.cpp b/api/logic/minecraft/update/AssetUpdateTask.cpp
index 6919e0a6..2ad2b5b2 100644
--- a/api/logic/minecraft/update/AssetUpdateTask.cpp
+++ b/api/logic/minecraft/update/AssetUpdateTask.cpp
@@ -12,7 +12,8 @@ AssetUpdateTask::AssetUpdateTask(MinecraftInstance * inst)
void AssetUpdateTask::executeTask()
{
setStatus(tr("Updating assets index..."));
- auto profile = m_inst->getComponentList();
+ auto components = m_inst->getComponentList();
+ auto profile = components->getProfile();
auto assets = profile->getMinecraftAssets();
QUrl indexUrl = assets->url;
QString localPath = assets->id + ".json";
@@ -48,7 +49,8 @@ void AssetUpdateTask::assetIndexFinished()
AssetsIndex index;
qDebug() << m_inst->name() << ": Finished asset index download";
- auto profile = m_inst->getComponentList();
+ auto components = m_inst->getComponentList();
+ auto profile = components->getProfile();
auto assets = profile->getMinecraftAssets();
QString asset_fname = "assets/indexes/" + assets->id + ".json";
diff --git a/api/logic/minecraft/update/FMLLibrariesTask.cpp b/api/logic/minecraft/update/FMLLibrariesTask.cpp
index e64b7a82..56ecee43 100644
--- a/api/logic/minecraft/update/FMLLibrariesTask.cpp
+++ b/api/logic/minecraft/update/FMLLibrariesTask.cpp
@@ -13,7 +13,8 @@ void FMLLibrariesTask::executeTask()
{
// Get the mod list
MinecraftInstance *inst = (MinecraftInstance *)m_inst;
- std::shared_ptr<ComponentList> profile = inst->getComponentList();
+ auto components = inst->getComponentList();
+ auto profile = components->getProfile();
bool forge_present = false;
if (!profile->hasTrait("legacyFML"))
@@ -34,7 +35,7 @@ void FMLLibrariesTask::executeTask()
// determine if we need some libs for FML or forge
setStatus(tr("Checking for FML libraries..."));
- forge_present = (profile->versionPatch("net.minecraftforge") != nullptr);
+ forge_present = (components->versionPatch("net.minecraftforge") != nullptr);
// we don't...
if (!forge_present)
{
diff --git a/api/logic/minecraft/update/LibrariesTask.cpp b/api/logic/minecraft/update/LibrariesTask.cpp
index bbbd5f02..80d45d97 100644
--- a/api/logic/minecraft/update/LibrariesTask.cpp
+++ b/api/logic/minecraft/update/LibrariesTask.cpp
@@ -21,7 +21,8 @@ void LibrariesTask::executeTask()
}
// Build a list of URLs that will need to be downloaded.
- std::shared_ptr<ComponentList> profile = inst->getComponentList();
+ auto components = inst->getComponentList();
+ auto profile = components->getProfile();
auto job = new NetJob(tr("Libraries for instance %1").arg(inst->name()));
downloadJob.reset(job);