fix: correctly set managed pack fields in CF pack
Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
8c0816c166
commit
4b0ceea894
@ -186,6 +186,8 @@ bool FlameCreationTask::updateInstance()
|
|||||||
setOverride(true);
|
setOverride(true);
|
||||||
qDebug() << "Will override instance!";
|
qDebug() << "Will override instance!";
|
||||||
|
|
||||||
|
m_instance = inst;
|
||||||
|
|
||||||
// We let it go through the createInstance() stage, just with a couple modifications for updating
|
// We let it go through the createInstance() stage, just with a couple modifications for updating
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -319,6 +321,13 @@ bool FlameCreationTask::createInstance()
|
|||||||
|
|
||||||
loop.exec();
|
loop.exec();
|
||||||
|
|
||||||
|
if (m_instance) {
|
||||||
|
auto inst = m_instance.value();
|
||||||
|
|
||||||
|
inst->copyManagedPack(instance);
|
||||||
|
inst->setName(instance.name());
|
||||||
|
}
|
||||||
|
|
||||||
return getError().isEmpty();
|
return getError().isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
#include "InstanceCreationTask.h"
|
#include "InstanceCreationTask.h"
|
||||||
|
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
|
#include "minecraft/MinecraftInstance.h"
|
||||||
|
|
||||||
#include "modplatform/flame/FileResolvingTask.h"
|
#include "modplatform/flame/FileResolvingTask.h"
|
||||||
|
|
||||||
#include "net/NetJob.h"
|
#include "net/NetJob.h"
|
||||||
@ -35,4 +39,6 @@ class FlameCreationTask final : public InstanceCreationTask {
|
|||||||
// Handle to allow aborting
|
// Handle to allow aborting
|
||||||
NetJob* m_process_update_file_info_job = nullptr;
|
NetJob* m_process_update_file_info_job = nullptr;
|
||||||
NetJob::Ptr m_files_job = nullptr;
|
NetJob::Ptr m_files_job = nullptr;
|
||||||
|
|
||||||
|
std::optional<InstancePtr> m_instance;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user