diff options
author | flow <flowlnlnln@gmail.com> | 2022-10-13 13:27:52 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-10-13 13:27:52 -0300 |
commit | 83654a193e8856e00bcdbe4f87d209e52c380a62 (patch) | |
tree | 6c8c639edb5f9e1332e3b59d6aec80dd62e49d6f /launcher/modplatform/modpacksch/FTBPackInstallTask.h | |
parent | 19ee736e1d117a5da5f06740ee502d741fe01aa4 (diff) | |
download | PrismLauncher-83654a193e8856e00bcdbe4f87d209e52c380a62.tar.gz PrismLauncher-83654a193e8856e00bcdbe4f87d209e52c380a62.tar.bz2 PrismLauncher-83654a193e8856e00bcdbe4f87d209e52c380a62.zip |
refactor+fix: Make FTB install task similar to other install tasks
In particular, this changes the order so that the instance gets created
before downloading the mods (like other install tasks), and the mod download
directly puts the files in the staging folder (like the others), instead
of that weird makeCached and copy stuff.
This fixes some issues with modpack downloads from FTB, like creating an
instance with no mods in it.
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/modplatform/modpacksch/FTBPackInstallTask.h')
-rw-r--r-- | launcher/modplatform/modpacksch/FTBPackInstallTask.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/launcher/modplatform/modpacksch/FTBPackInstallTask.h b/launcher/modplatform/modpacksch/FTBPackInstallTask.h index e63ca0df..7c6fbeb9 100644 --- a/launcher/modplatform/modpacksch/FTBPackInstallTask.h +++ b/launcher/modplatform/modpacksch/FTBPackInstallTask.h @@ -56,7 +56,6 @@ public: explicit PackInstallTask(Modpack pack, QString version, QWidget* parent = nullptr); ~PackInstallTask() override = default; - bool canAbort() const override { return m_abortable; } bool abort() override; protected: @@ -65,20 +64,20 @@ protected: private slots: void onManifestDownloadSucceeded(); void onResolveModsSucceeded(); + void onCreateInstanceSucceeded(); void onModDownloadSucceeded(); void onManifestDownloadFailed(QString reason); void onResolveModsFailed(QString reason); + void onCreateInstanceFailed(QString reason); void onModDownloadFailed(QString reason); private: void resolveMods(); + void createInstance(); void downloadPack(); - void install(); private: - bool m_abortable = true; - NetJob::Ptr m_net_job = nullptr; shared_qobject_ptr<Flame::FileResolvingTask> m_mod_id_resolver_task = nullptr; |