mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-24 03:39:56 -04:00
add warning if you try to install a billion mods
This commit is contained in:
parent
5266ba9655
commit
8fabdf545e
1 changed files with 13 additions and 0 deletions
|
@ -860,6 +860,19 @@ void ModPopup::onEnable(CCObject*) {
|
|||
}
|
||||
|
||||
void ModPopup::onInstall(CCObject*) {
|
||||
// A futile attempt to try and prevent users from blindly installing
|
||||
// everything on the index
|
||||
if (m_source.asServer() && Loader::get()->getAllMods().size() > 10) {
|
||||
if (!Mod::get()->setSavedValue("shown-dont-install-everything-warning", true)) {
|
||||
FLAlertLayer::create(
|
||||
"Warning",
|
||||
"Installing too many mods can lead to <cr>instability</c>, <cr>bugs</c>, and "
|
||||
"<cr>crashes</c>. <cy>You should only install mods you need!</c>",
|
||||
"OK"
|
||||
)->show();
|
||||
return;
|
||||
}
|
||||
}
|
||||
server::ModDownloadManager::get()->startDownload(m_source.getID(), std::nullopt);
|
||||
this->onClose(nullptr);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue