diff --git a/doc/src/load_order_mechanisms.md b/doc/src/load_order_mechanisms.md index 12e504f0..19296c6b 100644 --- a/doc/src/load_order_mechanisms.md +++ b/doc/src/load_order_mechanisms.md @@ -16,4 +16,4 @@ There are a few hardcoded rules that trump load order, irrespective of the metho - Official Bethesda plugins are all hardcoded to always load in a certain order before other plugins. These include the game's main master file (`Skyrim.esm` or `Fallout4.esm`), DLC plugins (e.g. `Dragonborn.esm`, `DLCNukaWorld.esm`) and Creation Club plugins (e.g. `ccQDRSSE001-SurvivalMode.esl`). - Light plugins load amongst other plugins, but they all then get moved to the end of the load order so that in-game they all take up the `FE` load order slot. This movement does not affect conflict resolution. -A plugin's type is usually indicated by its file extension, for example `.esm` is used by master plugins, `.esl` is used by light plugins and `.esp` is used by non-master, non-light (i.e. normal) plugins. However, this isn't necessarily accurate, see Plugin Types for details. +A plugin's type is usually indicated by its file extension, for example `.esm` is used by master plugins, `.esl` is used by light plugins and `.esp` is used by non-master, non-light (i.e. full) plugins. However, this isn't necessarily accurate, see Plugin Types for details. diff --git a/src/enums.rs b/src/enums.rs index dab08783..031b3665 100644 --- a/src/enums.rs +++ b/src/enums.rs @@ -87,7 +87,7 @@ pub enum Error { TooManyActivePlugins { light_count: usize, medium_count: usize, - normal_count: usize, + full_count: usize, }, DuplicatePlugin(String), NonMasterBeforeMaster { @@ -155,8 +155,8 @@ impl fmt::Display for Error { Error::PluginNotFound(name) => { write!(f, "The plugin \"{name}\" is not in the load order") } - Error::TooManyActivePlugins {light_count, medium_count, normal_count } => - write!(f, "Maximum number of active plugins exceeded: there are {normal_count} active normal plugins, {medium_count} active medium plugins and {light_count} active light plugins"), + Error::TooManyActivePlugins {light_count, medium_count, full_count } => + write!(f, "Maximum number of active plugins exceeded: there are {full_count} active full plugins, {medium_count} active medium plugins and {light_count} active light plugins"), Error::DuplicatePlugin(name) => write!(f, "The given plugin list contains more than one instance of \"{name}\""), Error::NonMasterBeforeMaster{ master, non_master} => diff --git a/src/load_order/asterisk_based.rs b/src/load_order/asterisk_based.rs index da91694c..9309349f 100644 --- a/src/load_order/asterisk_based.rs +++ b/src/load_order/asterisk_based.rs @@ -638,7 +638,7 @@ mod tests { // .esm plugins are loaded as ESMs, .esl plugins are loaded as ESMs and // ESLs, ignoring their actual flags, so only worth testing a .esp that - // has the ESM flag set that has another (normal) .esp as a master. + // has the ESM flag set that has another (full) .esp as a master. let plugins_dir = &load_order.game_settings().plugins_directory(); let plugin_name_1 = "Blank - Plugin Dependent.esp"; @@ -686,7 +686,7 @@ mod tests { // .esm plugins are loaded as ESMs, .esl plugins are loaded as ESMs and // ESLs, ignoring their actual flags, so only worth testing a .esp that - // has the ESM flag set that has another (normal) .esp as a master. + // has the ESM flag set that has another (full) .esp as a master. let plugin_name = "Blank - Master Dependent.esm"; copy_to_test_dir(plugin_name, plugin_name, load_order.game_settings()); diff --git a/src/load_order/mutable.rs b/src/load_order/mutable.rs index 407a0f23..df66cf76 100644 --- a/src/load_order/mutable.rs +++ b/src/load_order/mutable.rs @@ -949,7 +949,7 @@ mod tests { } #[test] - fn find_first_non_master_should_find_a_normal_esp() { + fn find_first_non_master_should_find_a_full_esp() { let tmp_dir = tempdir().unwrap(); let plugins = prepare_plugins(&tmp_dir.path(), "Blank.esp"); diff --git a/src/load_order/writable.rs b/src/load_order/writable.rs index eac47393..542c9bb2 100644 --- a/src/load_order/writable.rs +++ b/src/load_order/writable.rs @@ -28,7 +28,7 @@ use crate::enums::Error; use crate::plugin::Plugin; use crate::GameSettings; -const MAX_ACTIVE_NORMAL_PLUGINS: usize = 255; +const MAX_ACTIVE_FULL_PLUGINS: usize = 255; const MAX_ACTIVE_LIGHT_PLUGINS: usize = 4096; const MAX_ACTIVE_MEDIUM_PLUGINS: usize = 256; @@ -138,7 +138,7 @@ pub fn remove(load_order: &mut T, plugin_name: &str) -> Res struct PluginCounts { light: usize, medium: usize, - normal: usize, + full: usize, } impl PluginCounts { @@ -148,7 +148,7 @@ impl PluginCounts { } else if plugin.is_medium_plugin() { self.medium += 1; } else { - self.normal += 1; + self.full += 1; } } } @@ -189,16 +189,16 @@ pub fn activate(load_order: &mut T, plugin_name: &str) -> R if !plugin.is_active() { let is_light = plugin.is_light_plugin(); let is_medium = plugin.is_medium_plugin(); - let is_normal = !is_light && !is_medium; + let is_full = !is_light && !is_medium; if (is_light && counts.light == MAX_ACTIVE_LIGHT_PLUGINS) || (is_medium && counts.medium == MAX_ACTIVE_MEDIUM_PLUGINS) - || (is_normal && counts.normal == MAX_ACTIVE_NORMAL_PLUGINS) + || (is_full && counts.full == MAX_ACTIVE_FULL_PLUGINS) { return Err(Error::TooManyActivePlugins { light_count: counts.light, medium_count: counts.medium, - normal_count: counts.normal, + full_count: counts.full, }); } else { plugin.activate()?; @@ -229,14 +229,14 @@ pub fn set_active_plugins( let counts = count_plugins(load_order.plugins(), &existing_plugin_indices); - if counts.normal > MAX_ACTIVE_NORMAL_PLUGINS + if counts.full > MAX_ACTIVE_FULL_PLUGINS || counts.medium > MAX_ACTIVE_MEDIUM_PLUGINS || counts.light > MAX_ACTIVE_LIGHT_PLUGINS { return Err(Error::TooManyActivePlugins { light_count: counts.light, medium_count: counts.medium, - normal_count: counts.normal, + full_count: counts.full, }); } @@ -520,7 +520,7 @@ mod tests { let tmp_dir = tempdir().unwrap(); let mut load_order = prepare(GameId::Oblivion, &tmp_dir.path()); - for i in 0..(MAX_ACTIVE_NORMAL_PLUGINS - 1) { + for i in 0..(MAX_ACTIVE_FULL_PLUGINS - 1) { let plugin = format!("{}.esp", i); copy_to_test_dir("Blank.esp", &plugin, &load_order.game_settings()); load_and_insert(&mut load_order, &plugin); @@ -536,7 +536,7 @@ mod tests { let tmp_dir = tempdir().unwrap(); let mut load_order = prepare(GameId::Oblivion, &tmp_dir.path()); - for i in 0..(MAX_ACTIVE_NORMAL_PLUGINS - 1) { + for i in 0..(MAX_ACTIVE_FULL_PLUGINS - 1) { let plugin = format!("{}.esp", i); copy_to_test_dir("Blank.esp", &plugin, &load_order.game_settings()); load_and_insert(&mut load_order, &plugin); @@ -552,7 +552,7 @@ mod tests { let tmp_dir = tempdir().unwrap(); let mut load_order = prepare(GameId::Starfield, &tmp_dir.path()); - for i in 0..(MAX_ACTIVE_NORMAL_PLUGINS - 1) { + for i in 0..(MAX_ACTIVE_FULL_PLUGINS - 1) { let plugin = format!("{}.esp", i); copy_to_test_dir("Blank.esp", &plugin, &load_order.game_settings()); load_and_insert(&mut load_order, &plugin); @@ -573,7 +573,7 @@ mod tests { let tmp_dir = tempdir().unwrap(); let mut load_order = prepare(GameId::Starfield, &tmp_dir.path()); - for i in 0..(MAX_ACTIVE_NORMAL_PLUGINS - 1) { + for i in 0..(MAX_ACTIVE_FULL_PLUGINS - 1) { let plugin = format!("{}.esp", i); copy_to_test_dir("Blank - Override.esp", &plugin, &load_order.game_settings()); load_and_insert(&mut load_order, &plugin); @@ -725,7 +725,7 @@ mod tests { let mut active_plugins = vec!["Starfield.esm".to_string(), blank_override.to_string()]; - for i in 0..(MAX_ACTIVE_NORMAL_PLUGINS - 1) { + for i in 0..(MAX_ACTIVE_FULL_PLUGINS - 1) { let plugin = format!("{}.esp", i); copy_to_test_dir("Blank.esp", &plugin, &load_order.game_settings()); load_and_insert(&mut load_order, &plugin);