Skip to content

Commit

Permalink
Rename disabled key to disabled_plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
MolotovCherry committed Nov 17, 2024
1 parent 5c0bf1c commit 0f8f6da
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
7 changes: 4 additions & 3 deletions assets-autostart/INSTRUCTIONS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ Using:

Disabling:
To disable a specific plugin, either move/delete the plugin dll, or set the
`[core]disabled` key to an array of plugin filenames (no extension). For example,
if you have `FooBar.dll` and `FooBaz.dll` plugins, they can be disabled with:
disabled = ["FooBar", "FooBaz"]
`[core]disabled_plugins` key to an array of plugin filenames (no extension).
For example, if you have `FooBar.dll` and `FooBaz.dll` plugins, they can be
disabled with:
disabled_plugins = ["FooBar", "FooBaz"]

To globally disable plugins, set the `[core]enabled` key to false, or uninstall
the autostart tool:
Expand Down
7 changes: 4 additions & 3 deletions assets-injector/INSTRUCTIONS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ Using:

Disabling:
To disable a specific plugin, either move/delete the plugin dll, or set the
`[core]disabled` key to an array of plugin filenames (no extension). For example,
if you have `FooBar.dll` and `FooBaz.dll` plugins, they can be disabled with:
disabled = ["FooBar", "FooBaz"]
`[core]disabled_plugins` key to an array of plugin filenames (no extension).
For example, if you have `FooBar.dll` and `FooBaz.dll` plugins, they can be
disabled with:
disabled_plugins = ["FooBar", "FooBaz"]

To globally disable plugins, set the `[core]enabled` key to false, or simply
don't start the injector tool:
Expand Down
7 changes: 4 additions & 3 deletions assets-watcher/INSTRUCTIONS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ Using:

Disabling:
To disable a specific plugin, either move/delete the plugin dll, or set the
`[core]disabled` key to an array of plugin filenames (no extension). For example,
if you have `FooBar.dll` and `FooBaz.dll` plugins, they can be disabled with:
disabled = ["FooBar", "FooBaz"]
`[core]disabled_plugins` key to an array of plugin filenames (no extension).
For example, if you have `FooBar.dll` and `FooBaz.dll` plugins, they can be
disabled with:
disabled_plugins = ["FooBar", "FooBaz"]

To globally disable plugins, set the `[core]enabled` key to false, or simply
don't start the watcher tool:
Expand Down
9 changes: 6 additions & 3 deletions crates/shared/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ pub struct Core {
/// Each entry is the plugins filename without extension
/// Except for those in this list, all plugins are enabled by default
/// e.g. FooBar.dll should have an entry for "FooBar"
pub disabled: Vec<String>,
#[serde(alias = "disabled")]
pub disabled_plugins: Vec<String>,
/// Whether to show cli window
pub cli: bool,
}
Expand All @@ -38,7 +39,7 @@ impl Default for Core {
enabled: true,
// the default location for most people
install_root: r"C:\Program Files (x86)\Steam\steamapps\common\Baldurs Gate 3".into(),
disabled: Vec::new(),
disabled_plugins: Vec::new(),
cli: false,
}
}
Expand All @@ -47,7 +48,9 @@ impl Default for Core {
impl Core {
pub fn is_plugin_disabled(&self, name: &str) -> bool {
let name = UniCase::new(name);
self.disabled.iter().any(|p| UniCase::new(p) == name)
self.disabled_plugins
.iter()
.any(|p| UniCase::new(p) == name)
}
}

Expand Down

0 comments on commit 0f8f6da

Please sign in to comment.