Fix search paths missing with spritesheetless mods

This commit is contained in:
altalk23 2023-09-04 17:21:34 +03:00
parent 7c69450df1
commit e78eaf01e8

View file

@ -216,15 +216,16 @@ Mod* Loader::Impl::getLoadedMod(std::string const& id) const {
}
void Loader::Impl::updateModResources(Mod* mod) {
if (mod->getMetadata().getSpritesheets().empty())
return;
if (mod != Mod::get()) {
// geode.loader resource is stored somewhere else, which is already added anyway
auto searchPathRoot = dirs::getModRuntimeDir() / mod->getID() / "resources";
CCFileUtils::get()->addSearchPath(searchPathRoot.string().c_str());
}
// only thing needs previous setup is spritesheets
if (mod->getMetadata().getSpritesheets().empty())
return;
auto searchPath = mod->getResourcesDir();
log::debug("Adding resources for {}", mod->getID());