mirror of
https://github.com/geode-sdk/geode.git
synced 2025-02-19 11:04:43 -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) {
|
void Loader::Impl::updateModResources(Mod* mod) {
|
||||||
if (mod->getMetadata().getSpritesheets().empty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (mod != Mod::get()) {
|
if (mod != Mod::get()) {
|
||||||
// geode.loader resource is stored somewhere else, which is already added anyway
|
// geode.loader resource is stored somewhere else, which is already added anyway
|
||||||
auto searchPathRoot = dirs::getModRuntimeDir() / mod->getID() / "resources";
|
auto searchPathRoot = dirs::getModRuntimeDir() / mod->getID() / "resources";
|
||||||
CCFileUtils::get()->addSearchPath(searchPathRoot.string().c_str());
|
CCFileUtils::get()->addSearchPath(searchPathRoot.string().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// only thing needs previous setup is spritesheets
|
||||||
|
if (mod->getMetadata().getSpritesheets().empty())
|
||||||
|
return;
|
||||||
|
|
||||||
auto searchPath = mod->getResourcesDir();
|
auto searchPath = mod->getResourcesDir();
|
||||||
|
|
||||||
log::debug("Adding resources for {}", mod->getID());
|
log::debug("Adding resources for {}", mod->getID());
|
||||||
|
|
Loading…
Reference in a new issue