Merge remote-tracking branch 'upstream/develop' into data-packs
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
commit
6ab4fef0c5
686 changed files with 15261 additions and 9719 deletions
|
@ -32,29 +32,32 @@ namespace DataPackUtils {
|
|||
|
||||
enum class ProcessingLevel { Full, BasicInfoOnly };
|
||||
|
||||
bool process(DataPack& pack, ProcessingLevel level = ProcessingLevel::Full);
|
||||
bool process(DataPack* pack, ProcessingLevel level = ProcessingLevel::Full);
|
||||
|
||||
bool processZIP(DataPack& pack, ProcessingLevel level = ProcessingLevel::Full);
|
||||
bool processFolder(DataPack& pack, ProcessingLevel level = ProcessingLevel::Full);
|
||||
bool processZIP(DataPack* pack, ProcessingLevel level = ProcessingLevel::Full);
|
||||
bool processFolder(DataPack* pack, ProcessingLevel level = ProcessingLevel::Full);
|
||||
|
||||
bool processMCMeta(DataPack& pack, QByteArray&& raw_data);
|
||||
bool processPackPNG(const DataPack& pack, QByteArray&& raw_data);
|
||||
bool processMCMeta(DataPack* pack, QByteArray&& raw_data);
|
||||
|
||||
QString processComponent(const QJsonValue& value, bool strikethrough = false, bool underline = false);
|
||||
|
||||
bool processPackPNG(const DataPack* pack, QByteArray&& raw_data);
|
||||
|
||||
/// processes ONLY the pack.png (rest of the pack may be invalid)
|
||||
bool processPackPNG(const DataPack& pack);
|
||||
bool processPackPNG(const DataPack* pack);
|
||||
|
||||
/** Checks whether a file is valid as a data pack or not. */
|
||||
bool validate(QFileInfo file);
|
||||
|
||||
/** Checks whether a file is valid as a resource pack or not. */
|
||||
bool validateResourcePack(QFileInfo file);
|
||||
|
||||
} // namespace DataPackUtils
|
||||
|
||||
class LocalDataPackParseTask : public Task {
|
||||
Q_OBJECT
|
||||
public:
|
||||
LocalDataPackParseTask(int token, DataPack& dp);
|
||||
|
||||
[[nodiscard]] bool canAbort() const override { return true; }
|
||||
bool abort() override;
|
||||
LocalDataPackParseTask(int token, DataPack* dp);
|
||||
|
||||
void executeTask() override;
|
||||
|
||||
|
@ -63,7 +66,5 @@ class LocalDataPackParseTask : public Task {
|
|||
private:
|
||||
int m_token;
|
||||
|
||||
DataPack& m_data_pack;
|
||||
|
||||
bool m_aborted = false;
|
||||
};
|
||||
DataPack* m_data_pack;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue