diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2023-08-12 21:18:22 +0100 |
---|---|---|
committer | TheKodeToad <TheKodeToad@proton.me> | 2023-08-12 21:20:51 +0100 |
commit | 5056a51c188ef366d5ea13b6794dd14b11f78075 (patch) | |
tree | f559a49912d5ba9553f69847f7841784a14f7153 /launcher/modplatform/flame/FlamePackExportTask.cpp | |
parent | 3aba7f8fec45c7c87be486d8f6b5c96f69facf93 (diff) | |
download | PrismLauncher-5056a51c188ef366d5ea13b6794dd14b11f78075.tar.gz PrismLauncher-5056a51c188ef366d5ea13b6794dd14b11f78075.tar.bz2 PrismLauncher-5056a51c188ef366d5ea13b6794dd14b11f78075.zip |
Improvements and refinements to pack export
- Persist fields
- Toggle optional files
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/modplatform/flame/FlamePackExportTask.cpp')
-rw-r--r-- | launcher/modplatform/flame/FlamePackExportTask.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/launcher/modplatform/flame/FlamePackExportTask.cpp b/launcher/modplatform/flame/FlamePackExportTask.cpp index f5f3af37..6cfc078a 100644 --- a/launcher/modplatform/flame/FlamePackExportTask.cpp +++ b/launcher/modplatform/flame/FlamePackExportTask.cpp @@ -43,12 +43,14 @@ const QStringList FlamePackExportTask::FILE_EXTENSIONS({ "jar", "zip" }); FlamePackExportTask::FlamePackExportTask(const QString& name, const QString& version, const QString& author, + bool optionalFiles, InstancePtr instance, const QString& output, MMCZip::FilterFunction filter) : name(name) , version(version) , author(author) + , optionalFiles(optionalFiles) , instance(instance) , mcInstance(dynamic_cast<MinecraftInstance*>(instance.get())) , gameRoot(instance->gameRoot()) @@ -407,7 +409,7 @@ QByteArray FlamePackExportTask::generateIndex() QJsonObject file; file["projectID"] = mod.addonId; file["fileID"] = mod.version; - file["required"] = mod.enabled; + file["required"] = mod.enabled || !optionalFiles; files << file; } obj["files"] = files; |