mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 01:45:35 -05:00
dont enable mods on update
This commit is contained in:
parent
73169fbf22
commit
6ab542d51a
3 changed files with 4 additions and 15 deletions
|
@ -651,20 +651,8 @@ void Index::Impl::installNext(size_t index, IndexInstallList const& list) {
|
|||
item->getMetadata().getID(), res.unwrapErr()
|
||||
));
|
||||
}
|
||||
|
||||
// If the mod is already loaded, enable it
|
||||
if (mod->isLoaded()) {
|
||||
res = mod->enable();
|
||||
if (!res) {
|
||||
return postError(fmt::format(
|
||||
"Unable to enable {}: {}",
|
||||
item->getMetadata().getID(), res.unwrapErr()
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Move the temp file
|
||||
try {
|
||||
ghc::filesystem::rename(
|
||||
|
|
|
@ -202,13 +202,13 @@ Mod* Loader::Impl::getInstalledMod(std::string const& id) const {
|
|||
}
|
||||
|
||||
bool Loader::Impl::isModLoaded(std::string const& id) const {
|
||||
return m_mods.count(id) && m_mods.at(id)->isLoaded() && m_mods.at(id)->isEnabled();
|
||||
return m_mods.count(id) && m_mods.at(id)->isLoaded();
|
||||
}
|
||||
|
||||
Mod* Loader::Impl::getLoadedMod(std::string const& id) const {
|
||||
if (m_mods.count(id)) {
|
||||
auto mod = m_mods.at(id);
|
||||
if (mod->isLoaded() && mod->isEnabled()) {
|
||||
if (mod->isLoaded()) {
|
||||
return mod;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -172,7 +172,8 @@ CCArray* ModListLayer::createModCells(ModListType type, ModListQuery const& quer
|
|||
// newly installed
|
||||
for (auto const& item : Index::get()->getItems()) {
|
||||
if (!item->isInstalled() ||
|
||||
Loader::get()->isModInstalled(item->getMetadata().getID()))
|
||||
Loader::get()->isModInstalled(item->getMetadata().getID()) ||
|
||||
Loader::get()->isModLoaded(item->getMetadata().getID()))
|
||||
continue;
|
||||
// match the same as other installed mods
|
||||
if (auto match = queryMatchKeywords(query, item->getMetadata())) {
|
||||
|
|
Loading…
Reference in a new issue