MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / ESPInfo

Method ESPInfo

src/pluginlist.cpp:1816–1851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1814}
1815
1816PluginList::ESPInfo::ESPInfo(const QString& name, bool forceLoaded, bool forceEnabled,
1817 bool forceDisabled, const QString& originName,
1818 const QString& fullPath, bool hasIni,
1819 std::set<QString> archives, bool lightSupported,
1820 bool mediumSupported)
1821 : name(name), fullPath(fullPath), enabled(forceLoaded), forceLoaded(forceLoaded),
1822 forceEnabled(forceEnabled), forceDisabled(forceDisabled), priority(0),
1823 loadOrder(-1), originName(originName), hasIni(hasIni),
1824 archives(archives.begin(), archives.end()), modSelected(false)
1825{
1826 try {
1827 ESP::File file(ToWString(fullPath));
1828 auto extension = name.right(3).toLower();
1829 hasMasterExtension = (extension == "esm");
1830 hasLightExtension = (extension == "esl");
1831 isMasterFlagged = file.isMaster();
1832 isLightFlagged = lightSupported && file.isLight(mediumSupported);
1833 isMediumFlagged = mediumSupported && file.isMedium();
1834 hasNoRecords = file.isDummy();
1835
1836 author = QString::fromLatin1(file.author().c_str());
1837 description = QString::fromLatin1(file.description().c_str());
1838
1839 for (auto&& m : file.masters()) {
1840 masters.insert(QString::fromStdString(m));
1841 }
1842 } catch (const std::exception& e) {
1843 log::error("failed to parse plugin file {}: {}", fullPath, e.what());
1844 hasMasterExtension = false;
1845 hasLightExtension = false;
1846 isMasterFlagged = false;
1847 isMediumFlagged = false;
1848 isLightFlagged = false;
1849 hasNoRecords = false;
1850 }
1851}
1852
1853void PluginList::managedGameChanged(const IPluginGame* gamePlugin)
1854{

Callers

nothing calls this directly

Calls 8

ToWStringFunction · 0.85
isMasterMethod · 0.80
descriptionMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
mastersMethod · 0.45
insertMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected