Skip to content
Permalink
Browse files

Fix XCOM1 not starting

  • Loading branch information...
SupSuper committed Jun 8, 2019
1 parent 67c6810 commit 9b5a80222b635df80f1023adf6ba4a0279a7c687
Showing with 14 additions and 13 deletions.
  1. +10 −10 src/Engine/ModInfo.cpp
  2. +1 −1 src/Engine/ModInfo.h
  3. +3 −2 src/Mod/Mod.cpp
@@ -72,17 +72,17 @@ void ModInfo::load(const std::string &filename)
}
}

const std::string &ModInfo::getPath() const { return _path; }
const std::string &ModInfo::getName() const { return _name; }
const std::string &ModInfo::getDescription() const { return _desc; }
const std::string &ModInfo::getVersion() const { return _version; }
const std::string &ModInfo::getAuthor() const { return _author; }
const std::string &ModInfo::getId() const { return _id; }
const std::string &ModInfo::getMaster() const { return _master; }
bool ModInfo::isMaster() const { return _isMaster; }
const std::string &ModInfo::getPath() const { return _path; }
const std::string &ModInfo::getName() const { return _name; }
const std::string &ModInfo::getDescription() const { return _desc; }
const std::string &ModInfo::getVersion() const { return _version; }
const std::string &ModInfo::getAuthor() const { return _author; }
const std::string &ModInfo::getId() const { return _id; }
const std::string &ModInfo::getMaster() const { return _master; }
bool ModInfo::isMaster() const { return _isMaster; }
const std::string &ModInfo::getRequiredExtendedVersion() const { return _requiredExtendedVersion; }
std::string ModInfo::getResourceConfigFile() const { return _path + "/" + _resourceConfigFile; }
int ModInfo::getReservedSpace() const { return _reservedSpace; }
const std::string &ModInfo::getResourceConfigFile() const { return _resourceConfigFile; }
int ModInfo::getReservedSpace() const { return _reservedSpace; }

/**
* Checks if a given mod can be activated.
@@ -65,7 +65,7 @@ class ModInfo
/// Gets the OXCE version required by this mod.
const std::string &getRequiredExtendedVersion() const;
/// Gets ruleset file where are defined based resources like required original game data.
std::string getResourceConfigFile() const;
const std::string &getResourceConfigFile() const;
/// Gets the list of external resource dirs to load for this mod.
const std::vector<std::string> &getExternalResourceDirs() const;
};
@@ -896,9 +896,10 @@ void Mod::loadAll(const std::vector< std::pair< std::string, std::vector<std::st
for (size_t i = 0; _modData.size() > i; ++i)
{
_modCurrent = &_modData.at(0);
if (_modCurrent->info->isMaster())
const ModInfo *info = _modCurrent->info;
if (info->isMaster() && !info->getResourceConfigFile().empty())
{
std::string path = _modCurrent->info->getResourceConfigFile();
std::string path = info->getPath() + "/" + info->getResourceConfigFile();
if (CrossPlatform::fileExists(path))
{
loadResourceConfigFile(path);

0 comments on commit 9b5a802

Please sign in to comment.
You can’t perform that action at this time.