pub struct Modification {
pub mods: Vec<Mod>,
pub dirty: bool,
}Expand description
The mod list: every package found, in list order.
Fields§
§mods: Vec<Mod>The mods, the first winning over the others when they share a file.
dirty: bool+0: the list changed (Enable, Swap) since the packages were set up.
Implementations§
Source§impl Modification
impl Modification
Sourcepub fn refresh(
found: Vec<(String, Vec<u8>)>,
settings: &impl Settings,
) -> Modification
pub fn refresh( found: Vec<(String, Vec<u8>)>, settings: &impl Settings, ) -> Modification
RefreshList over the packages found: (file name without .pkm, bytes).
Sourcepub fn add(&mut self, found: Vec<(String, Vec<u8>)>, settings: &impl Settings)
pub fn add(&mut self, found: Vec<(String, Vec<u8>)>, settings: &impl Settings)
Mods added while the game runs (dropped in the browser, or installed from Nexus Mods): the list is read again with them, replacing any of the same name. They take effect after a reload; the list is marked changed when an enabled mod was replaced or the enabled set changed.
Sourcepub fn revert(&mut self, settings: &impl Settings)
pub fn revert(&mut self, settings: &impl Settings)
RefreshList over the packages already read: the settings’ order and enabled mods
again (the Mods dialog’s Cancel). The list stays dirty.
Sourcepub fn in_conflict(&self, i: usize) -> bool
pub fn in_conflict(&self, i: usize) -> bool
Whether mod i is enabled with another enabled mod sharing a file.
Sourcepub fn load_order(&self) -> Vec<&Mod>
pub fn load_order(&self) -> Vec<&Mod>
The enabled mods in the order SetupFileSystem adds them: from the last in the list to
the first.
Sourcepub fn saved(&self) -> Vec<SavedMod>
pub fn saved(&self) -> Vec<SavedMod>
SaveLoad::SaveMetaData: each enabled mod as the save records it, its name, its file under
the data directory (WinData\<file>.pkm, inferred from GetPackDirectory) and its crc,
game version and author’s version.
Sourcepub fn check(&self, saved: &SavedMod) -> u32
pub fn check(&self, saved: &SavedMod) -> u32
0 when the saved mod is installed as it was, 1 when it is not installed (by its file, without case), 4 when its crc differs, 3 when the author’s version differs and 2 when it was made before game version 1.0.4.
Original: SaveLoad::CheckMod, Runtime 0x1800c3900.
Sourcepub fn enabled_files(&self) -> Vec<String>
pub fn enabled_files(&self) -> Vec<String>
The enabled mods’ file names, in list order (their resource lists load in this order).
Trait Implementations§
Source§impl Clone for Modification
impl Clone for Modification
Source§fn clone(&self) -> Modification
fn clone(&self) -> Modification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more