mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 22:36:23 +00:00
Add statuses, status messages
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
TResourceManager::TResourceManager() {
|
||||
Application::SetSubsystemStatus("ResourceManager", Application::Status::Starting);
|
||||
std::string Path = Application::Settings.Resource + "/Client";
|
||||
if (!fs::exists(Path))
|
||||
fs::create_directories(Path);
|
||||
@@ -13,11 +14,11 @@ TResourceManager::TResourceManager() {
|
||||
std::string File(entry.path().string());
|
||||
if (auto pos = File.find(".zip"); pos != std::string::npos) {
|
||||
if (File.length() - pos == 4) {
|
||||
std::replace(File.begin(), File.end(),'\\','/');
|
||||
std::replace(File.begin(), File.end(), '\\', '/');
|
||||
mFileList += File + ';';
|
||||
if(auto i = File.find_last_of('/'); i != std::string::npos){
|
||||
if (auto i = File.find_last_of('/'); i != std::string::npos) {
|
||||
++i;
|
||||
File = File.substr(i,pos-i);
|
||||
File = File.substr(i, pos - i);
|
||||
}
|
||||
mTrimmedList += "/" + fs::path(File).filename().string() + ';';
|
||||
mFileSizes += std::to_string(size_t(fs::file_size(entry.path()))) + ';';
|
||||
@@ -29,4 +30,6 @@ TResourceManager::TResourceManager() {
|
||||
|
||||
if (mModsLoaded)
|
||||
beammp_info("Loaded " + std::to_string(mModsLoaded) + " Mods");
|
||||
|
||||
Application::SetSubsystemStatus("ResourceManager", Application::Status::Good);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user