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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user