mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
NOISSUE split out the LaunchProfile out of the ComponentList
This commit is contained in:
@ -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";
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user