Skip to content

Commit 7410300

Browse files
committed
feat(fnv): bsas are now compressed using correct format (fixes Begin Again and Tale of two Wastelands)
1 parent 37918e6 commit 7410300

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

crates/hoolamike/src/extensions/tale_of_two_wastelands_installer.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const MANIFEST_PATH: &str = "_package/index.json";
6363
type LocationsLookup = BTreeMap<LocationIndex, Location>;
6464

6565
#[derive(Clone)]
66-
struct RepackingContext {
66+
pub struct RepackingContext {
6767
locations: Arc<LocationsLookup>,
6868
}
6969

@@ -498,7 +498,7 @@ pub mod file_attrs {
498498
super::manifest_file::FileAttr,
499499
crate::utils::MaybeWindowsPath,
500500
anyhow::{Context, Result},
501-
chrono::{DateTime, Duration, Local, Utc},
501+
chrono::{DateTime, Utc},
502502
std::time::{SystemTime, UNIX_EPOCH},
503503
tap::prelude::*,
504504
tracing::info,

crates/hoolamike/src/extensions/tale_of_two_wastelands_installer/build_bsa.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub fn build_bsa<F: FnOnce(&Archive<'_>, ArchiveOptions, MaybeWindowsPath) -> Re
7575
entries
7676
.par_iter()
7777
.map(|(key, file)| {
78-
file.as_archive_file().map(|file| {
78+
file.as_archive_file(version).map(|file| {
7979
building_archive.pb_inc(1);
8080
(key, file)
8181
})

crates/hoolamike/src/install_modlist/directives/create_bsa/tes_4.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl<Directive: std::fmt::Debug> LazyArchiveFile<Directive> {
4444

4545
impl LazyArchiveFile<FileStateData> {
4646
#[instrument]
47-
pub fn as_archive_file(&self) -> Result<File<'_>> {
47+
pub fn as_archive_file(&self, version: Version) -> Result<File<'_>> {
4848
self.directive.pipe_ref(
4949
|FileStateData {
5050
flip_compression: _,
@@ -54,7 +54,7 @@ impl LazyArchiveFile<FileStateData> {
5454
File::read(
5555
Borrowed(self.as_bytes()),
5656
&FileReadOptions::builder()
57-
.version(Version::SSE)
57+
.version(version)
5858
.compression_result(CompressionResult::Compressed)
5959
.build(),
6060
)
@@ -187,7 +187,7 @@ pub fn create_archive<F: FnOnce(&Archive<'_>, ArchiveOptions, MaybeWindowsPath)
187187
entries
188188
.par_iter()
189189
.map(|(key, file)| {
190-
file.as_archive_file().map(|file| {
190+
file.as_archive_file(version).map(|file| {
191191
building_archive.pb_inc(1);
192192
(key, file)
193193
})

crates/hoolamike/src/progress_bars.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub fn vertical_progress_bar(len: u64, kind: ProgressKind, with_finish: indicati
103103
kind.stylize(&mut pb);
104104
let prefix = kind.prefix();
105105
pb.set_prefix(prefix);
106-
pb.enable_steady_tick(std::time::Duration::from_secs(1));
106+
// pb.enable_steady_tick(std::time::Duration::from_secs(1));
107107
pb.with_finish(with_finish.clone())
108108
})
109109
}

0 commit comments

Comments
 (0)