mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-30 11:17:08 -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,19 +651,7 @@ void Index::Impl::installNext(size_t index, IndexInstallList const& list) {
|
||||||
item->getMetadata().getID(), res.unwrapErr()
|
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
|
// Move the temp file
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -202,13 +202,13 @@ Mod* Loader::Impl::getInstalledMod(std::string const& id) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Loader::Impl::isModLoaded(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 {
|
Mod* Loader::Impl::getLoadedMod(std::string const& id) const {
|
||||||
if (m_mods.count(id)) {
|
if (m_mods.count(id)) {
|
||||||
auto mod = m_mods.at(id);
|
auto mod = m_mods.at(id);
|
||||||
if (mod->isLoaded() && mod->isEnabled()) {
|
if (mod->isLoaded()) {
|
||||||
return mod;
|
return mod;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,7 +172,8 @@ CCArray* ModListLayer::createModCells(ModListType type, ModListQuery const& quer
|
||||||
// newly installed
|
// newly installed
|
||||||
for (auto const& item : Index::get()->getItems()) {
|
for (auto const& item : Index::get()->getItems()) {
|
||||||
if (!item->isInstalled() ||
|
if (!item->isInstalled() ||
|
||||||
Loader::get()->isModInstalled(item->getMetadata().getID()))
|
Loader::get()->isModInstalled(item->getMetadata().getID()) ||
|
||||||
|
Loader::get()->isModLoaded(item->getMetadata().getID()))
|
||||||
continue;
|
continue;
|
||||||
// match the same as other installed mods
|
// match the same as other installed mods
|
||||||
if (auto match = queryMatchKeywords(query, item->getMetadata())) {
|
if (auto match = queryMatchKeywords(query, item->getMetadata())) {
|
||||||
|
|
Loading…
Reference in a new issue