Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/Network/Resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,11 @@ struct ModInfo {
.Hash = entry["hash"],
.HashAlgorithm = entry["hash_algorithm"],
};

if (entry.contains("protected")) {
modInfo.Protected = entry["protected"];
}

modInfos.push_back(modInfo);
success = true;
}
Expand All @@ -393,6 +398,7 @@ struct ModInfo {
size_t FileSize;
std::string Hash;
std::string HashAlgorithm;
bool Protected = false;
};

nlohmann::json modUsage = {};
Expand Down Expand Up @@ -544,6 +550,16 @@ void NewSyncResources(SOCKET Sock, const std::string& Mods, const std::vector<Mo
WaitForConfirm();
continue;
}

if (ModInfoIter->Protected && false) {
std::string message = "Mod '" + ModInfoIter->FileName + "' is protected and therefore must be placed in the Resources/Caching folder manually here: " + fs::absolute(CachingDirectory).string();

error(message);
UUl(message);
Terminate = true;
return;
}

CheckForDir();
std::string FName = ModInfoIter->FileName;
do {
Expand Down
Loading