Skip to content

Commit

Permalink
Only top-level masters can load external resource dirs
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Engine/ModInfo.cpp
  • Loading branch information
MeridianOXC authored and SupSuper committed Aug 12, 2023
1 parent 5882394 commit e27c711
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Engine/ModInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ void ModInfo::load(const std::string &filename)
// default a master's master to none. masters can still have
// masters, but they must be explicitly declared.
_master = "";
// only masters can load external resource dirs
_externalResourceDirs = doc["loadResources"].as< std::vector<std::string> >(_externalResourceDirs);
}
_resourceConfigFile = doc["resourceConfig"].as<std::string>(_resourceConfigFile);

Expand All @@ -111,6 +109,12 @@ void ModInfo::load(const std::string &filename)
{
_master = "";
}

if (_isMaster && _master.empty())
{
// only top-level masters can load external resource dirs
_externalResourceDirs = doc["loadResources"].as< std::vector<std::string> >(_externalResourceDirs);
}
}

const std::string &ModInfo::getPath() const { return _path; }
Expand Down

0 comments on commit e27c711

Please sign in to comment.