mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 01:45:35 -05:00
Fix search paths missing with spritesheetless mods
This commit is contained in:
parent
7c69450df1
commit
e78eaf01e8
1 changed files with 4 additions and 3 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue