implement mod hashing + new download

This commit is contained in:
Lion Kortlepel
2024-09-29 00:32:52 +02:00
parent 7f69e336a9
commit a4b62d013c
4 changed files with 104 additions and 10 deletions

View File

@@ -19,6 +19,7 @@
#pragma once
#include "Common.h"
#include <nlohmann/json.hpp>
class TResourceManager {
public:
@@ -30,10 +31,17 @@ public:
[[nodiscard]] std::string FileSizes() const { return mFileSizes; }
[[nodiscard]] int ModsLoaded() const { return mModsLoaded; }
[[nodiscard]] std::string NewFileList() const;
void RefreshFiles();
private:
size_t mMaxModSize = 0;
std::string mFileSizes;
std::string mFileList;
std::string mTrimmedList;
int mModsLoaded = 0;
std::mutex mModsMutex;
nlohmann::json mMods;
};