pub struct Archive {
pub user_packs: usize,
/* private fields */
}Expand description
A set of packages resolved by priority: higher priority shadows lower for the same name.
Fields§
§user_packs: usizeIO::FileSystem: the user pack files (enabled mods) the packages were set up with
(AddUserPackFile, AreUserPackFilesEnabled).
Implementations§
Source§impl Archive
impl Archive
Sourcepub fn add(&mut self, pkg: Package)
pub fn add(&mut self, pkg: Package)
Add one of the game’s packages. An entry replaces one of the same name when its package’s priority is not lower.
Sourcepub fn add_mod(&mut self, pkg: Package)
pub fn add_mod(&mut self, pkg: Package)
FileSystem::LoadPackages for a mod (.pkm), added after the game’s packages: the enabled
mods go in from the last in the mod list to the first, and a file replaces one already there
only when that one’s package allows it. So the first mod in the list wins, and nothing
overrides data1 or patch1.
Original: Runtime 0x1800ac3b0.
Sourcepub fn package_count(&self) -> usize
pub fn package_count(&self) -> usize
How many packages are loaded (the game’s first, then the mods).
Sourcepub fn remove_after(&mut self, keep: usize)
pub fn remove_after(&mut self, keep: usize)
Drop every package after the first keep (the mods), as FileSystem::ClosePackages
before the packages load again.
Sourcepub fn package_of(&self, name: &str) -> Option<&Package>
pub fn package_of(&self, name: &str) -> Option<&Package>
The package holding name’s current entry (its header names the mod).