Clients can now see download progress of large resources

This commit is contained in:
Yousef Khadadeh 2025-10-09 21:02:19 +03:00
parent 2a213028c0
commit 3b12f630f8
11 changed files with 87 additions and 30 deletions

View file

@ -44,9 +44,13 @@ class ResourceManager {
std::optional<ResourceData> get_resource(const ServerClientID& id) const;
ClientPortionID get_max_id(ServerPortionID serverID) const;
const std::unordered_map<ServerClientID, ResourceData>& resource_list();
ServerClientID get_resource_being_retrieved();
float get_resource_retrieval_progress();
World& world;
private:
ServerClientID resourceBeingRetrieved = {0, 0};
std::unordered_map<ServerClientID, ResourceData> resources;
std::unordered_map<ServerClientID, std::shared_ptr<ResourceDisplay>> displays;