Skip to content

Commit

Permalink
FEAT: Add debug output when using S3L_DEBUG envvar
Browse files Browse the repository at this point in the history
  • Loading branch information
magicaldave committed Jan 1, 2025
1 parent fbe5d16 commit 65286b1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::{
env::var,
fs::{create_dir_all, read_to_string, File, OpenOptions},
io::{Result, Write},
path::{Path, PathBuf},
Expand Down Expand Up @@ -186,6 +187,15 @@ fn main() -> Result<()> {
Err(error) => panic!("{}", &format!("{} {:#?}!", GET_PLUGINS_ERR, error)),
};

if var("S3L_DEBUG").is_ok() {
dbg!(
&openmw_cfg::config_path(),
&config,
&plugins,
&openmw_cfg::get_data_dirs(&config)
);
}

let userdata_dir = get_data_local_dir(&config);

let light_config = if let Some(light_config) = find_light_config(&userdata_dir) {
Expand Down Expand Up @@ -340,6 +350,10 @@ fn main() -> Result<()> {
}
}

if var("S3L_DEBUG").is_ok() {
dbg!(&header);
}

generated_plugin.objects.push(TES3Object::Header(header));
generated_plugin.sort_objects();

Expand Down

0 comments on commit 65286b1

Please sign in to comment.