add pseudopack 'core'

This commit is contained in:
MihailRis
2024-08-14 00:24:22 +03:00
parent 1a50e69769
commit e19ed3d239
5 changed files with 22 additions and 22 deletions
+13 -2
View File
@@ -313,12 +313,17 @@ void Engine::loadContent() {
contentPacks = manager.getAll(names);
std::vector<PathsRoot> resRoots;
{
auto pack = ContentPack::createCore(paths);
resRoots.push_back({"core", pack.folder});
ContentLoader(&pack, contentBuilder).load();
load_configs(pack.folder);
}
for (auto& pack : contentPacks) {
resRoots.push_back({pack.id, pack.folder});
ContentLoader(&pack, contentBuilder).load();
load_configs(pack.folder);
}
load_configs(paths->getResourcesFolder());
content = contentBuilder.build();
resPaths = std::make_unique<ResPaths>(resdir, resRoots);
@@ -330,7 +335,13 @@ void Engine::loadContent() {
void Engine::resetContent() {
auto resdir = paths->getResourcesFolder();
resPaths = std::make_unique<ResPaths>(resdir, std::vector<PathsRoot>());
std::vector<PathsRoot> resRoots;
{
auto pack = ContentPack::createCore(paths);
resRoots.push_back({"core", pack.folder});
load_configs(pack.folder);
}
resPaths = std::make_unique<ResPaths>(resdir, resRoots);
contentPacks.clear();
content.reset();