aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2024-12-20 13:25:14 +0100
committer0neGal <mail@0negal.com>2024-12-20 13:25:45 +0100
commitf660a6bc05781ad5722fc6ade2b8f94471875fc4 (patch)
treeebc6e7a7ff32a2388ae4f72e4072dc3991ca38e0 /src/modules
parentf3ab861bd2d45223b5d64979eb28269da834ebe1 (diff)
downloadViper-f660a6bc05781ad5722fc6ade2b8f94471875fc4.tar.gz
Viper-f660a6bc05781ad5722fc6ade2b8f94471875fc4.zip
skip core mods when doing "Toggle All"
fixes #252
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/mods.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/mods.js b/src/modules/mods.js
index 6214098..aecb5e3 100644
--- a/src/modules/mods.js
+++ b/src/modules/mods.js
@@ -729,9 +729,17 @@ mods.toggle = (mod, fork) => {
}
// toggles all mods, thereby inverting the current enabled states
+ //
+ // this skips core mods, as there's generally little use to have
+ // this affect them
if (mod == "allmods") {
let modlist = mods.list().all; // get list of all mods
for (let i = 0; i < modlist.length; i++) { // run through list
+ // skip core mods
+ if (modlist[i].name.toLowerCase().match(/^northstar\./)) {
+ continue;
+ }
+
mods.toggle(modlist[i].name, true); // enable mod
}