diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index fd156fd..ba7aded 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -99,9 +99,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -114,33 +114,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -465,7 +465,7 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "auto_context" version = "0.1.0" -source = "git+https://github.com/atampy25/quickentity-rs#49fd1e1af3a250c9986ad2da03e8db8ce1e0bcf5" +source = "git+https://github.com/atampy25/quickentity-rs#d486b19c65fdba75f3da4a3f16a0138969370e42" [[package]] name = "autocfg" @@ -1006,9 +1006,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "regex-automata 0.4.7", @@ -1200,9 +1200,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.10" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6b81fb3c84f5563d509c59b5a48d935f689e993afa90fe39047f05adef9142" +checksum = "35723e6a11662c2afb578bcf0b88bf6ea8e21282a953428f240574fcc3a2b5b3" dependencies = [ "clap_builder", "clap_derive", @@ -1210,9 +1210,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.10" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca6706fd5224857d9ac5eb9355f6683563cc0541c7cd9d014043b57cbec78ac" +checksum = "49eb96cbfa7cfa35017b7cd548c75b14c3118c98b423041d70562665e07fb0fa" dependencies = [ "anstream", "anstyle", @@ -1222,9 +1222,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.8" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +checksum = "5d029b67f89d30bbb547c89fd5161293c0aec155fc691d7924b64550662db93e" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1234,9 +1234,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "clipboard-win" @@ -1294,9 +1294,9 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "combine" @@ -1719,7 +1719,7 @@ dependencies = [ "cc", "memchr", "rustc_version", - "toml 0.8.15", + "toml 0.8.16", "vswhom", "winreg 0.52.0", ] @@ -2588,7 +2588,7 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hitman-commons" version = "0.1.0" -source = "git+https://github.com/atampy25/hitman-commons#30bda96162073aefce1cb91f4d2d6ebc966f12be" +source = "git+https://github.com/atampy25/hitman-commons#cb07e1a8211f07a3348f5e6f9f732b6a2e698c9e" dependencies = [ "brotli-decompressor 4.0.1", "hashbrown 0.14.5", @@ -2965,9 +2965,9 @@ dependencies = [ [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "ispc_rt" @@ -4569,7 +4569,7 @@ dependencies = [ [[package]] name = "quickentity-rs" version = "1.0.0" -source = "git+https://github.com/atampy25/quickentity-rs#49fd1e1af3a250c9986ad2da03e8db8ce1e0bcf5" +source = "git+https://github.com/atampy25/quickentity-rs#d486b19c65fdba75f3da4a3f16a0138969370e42" dependencies = [ "anyhow", "auto_context", @@ -5289,9 +5289,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -5779,7 +5779,7 @@ dependencies = [ "cfg-expr 0.15.8", "heck 0.5.0", "pkg-config", - "toml 0.8.15", + "toml 0.8.16", "version-compare 0.2.0", ] @@ -6376,21 +6376,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac2caab0bf757388c6c0ae23b3293fdb463fee59434529014f85e3263b995c28" +checksum = "81967dd0dd2c1ab0bc3468bd7caecc32b8a4aa47d0c8c695d8c2b2108168d62c" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.16", + "toml_edit 0.22.17", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "f8fb9f64314842840f1d940ac544da178732128f1c78c21772e876579e0da1db" dependencies = [ "serde", ] @@ -6421,15 +6421,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.16" +version = "0.22.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788" +checksum = "8d9f8729f5aea9562aac1cc0441f5d6de3cff1ee0c5d67293eeca5eb36ee7c16" dependencies = [ "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.15", + "winnow 0.6.16", ] [[package]] @@ -6800,9 +6800,9 @@ checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vswhom" @@ -7578,9 +7578,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.15" +version = "0.6.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557404e450152cd6795bb558bca69e43c585055f4606e3bcae5894fc6dac9ba0" +checksum = "b480ae9340fc261e6be3e95a1ba86d54ae3f9171132a73ce8d4bbaf68339507c" dependencies = [ "memchr", ] diff --git a/src-tauri/src/editor_connection.rs b/src-tauri/src/editor_connection.rs index f8faea8..07f7c48 100644 --- a/src-tauri/src/editor_connection.rs +++ b/src-tauri/src/editor_connection.rs @@ -405,6 +405,12 @@ impl EditorConnection { ); } + // Ignore editor entities + SDKEditorEvent::EntityTransformUpdated { .. } => {} + + // Ignore editor entities + SDKEditorEvent::EntityPropertyChanged { .. } => {} + _ => panic!("This event kind should not be debounced") } } diff --git a/src-tauri/src/entity.rs b/src-tauri/src/entity.rs index 6d9497d..64f78b3 100644 --- a/src-tauri/src/entity.rs +++ b/src-tauri/src/entity.rs @@ -608,7 +608,6 @@ pub fn get_ref_decoration( #[context("Couldn't get decoration for LINE {}", line)] pub fn get_line_decoration( game_files: &PartitionManager, - hash_list: &HashList, game_version: GameVersion, tonytools_hash_list: &tonytools::hashlist::HashList, line: ResourceID @@ -801,7 +800,6 @@ pub fn get_decorations( res.to_owned(), get_line_decoration( game_files, - hash_list, game_version, tonytools_hash_list, ResourceID::from_any(res)? @@ -834,7 +832,6 @@ pub fn get_decorations( res.to_owned(), get_line_decoration( game_files, - hash_list, game_version, tonytools_hash_list, ResourceID::from_any(res)? @@ -920,7 +917,6 @@ pub fn get_decorations( res.to_owned(), get_line_decoration( game_files, - hash_list, game_version, tonytools_hash_list, ResourceID::from_any(res)? @@ -953,7 +949,6 @@ pub fn get_decorations( res.to_owned(), get_line_decoration( game_files, - hash_list, game_version, tonytools_hash_list, ResourceID::from_any(res)? diff --git a/src-tauri/src/event_handling/content_search.rs b/src-tauri/src/event_handling/content_search.rs index aa77801..042c413 100644 --- a/src-tauri/src/event_handling/content_search.rs +++ b/src-tauri/src/event_handling/content_search.rs @@ -92,7 +92,7 @@ pub fn start_content_search( if use_qn_format { let (temp_data, temp_meta) = ( partition.read_resource(resource_id).ok()?, - RpkgResourceMeta::try_from(*resource_info).ok()? + RpkgResourceMeta::from(*resource_info) ); let factory = match game_version { @@ -231,7 +231,7 @@ pub fn start_content_search( "CLNG" => { let s: Option<_> = try { let (res_meta, res_data) = ( - RpkgResourceMeta::try_from(*resource_info).ok()?, + RpkgResourceMeta::from(*resource_info), partition.read_resource(resource_id).ok()? ); @@ -282,7 +282,7 @@ pub fn start_content_search( "DITL" => { let s: Option<_> = try { let (res_meta, res_data) = ( - RpkgResourceMeta::try_from(*resource_info).ok()?, + RpkgResourceMeta::from(*resource_info), partition.read_resource(resource_id).ok()? ); @@ -313,7 +313,7 @@ pub fn start_content_search( "DLGE" => { let s: Option<_> = try { let (res_meta, res_data) = ( - RpkgResourceMeta::try_from(*resource_info).ok()?, + RpkgResourceMeta::from(*resource_info), partition.read_resource(resource_id).ok()? ); @@ -373,7 +373,7 @@ pub fn start_content_search( "LOCR" => { let s: Option<_> = try { let (res_meta, res_data) = ( - RpkgResourceMeta::try_from(*resource_info).ok()?, + RpkgResourceMeta::from(*resource_info), partition.read_resource(resource_id).ok()? ); @@ -432,7 +432,7 @@ pub fn start_content_search( "RTLV" => { let s: Option<_> = try { let (res_meta, res_data) = ( - RpkgResourceMeta::try_from(*resource_info).ok()?, + RpkgResourceMeta::from(*resource_info), partition.read_resource(resource_id).ok()? ); @@ -462,7 +462,7 @@ pub fn start_content_search( "LINE" => { let s: Option<_> = try { let (res_meta, res_data) = ( - RpkgResourceMeta::try_from(*resource_info).ok()?, + RpkgResourceMeta::from(*resource_info), partition.read_resource(resource_id).ok()? ); diff --git a/src-tauri/src/event_handling/resource_overview.rs b/src-tauri/src/event_handling/resource_overview.rs index 1f11610..f37828c 100644 --- a/src-tauri/src/event_handling/resource_overview.rs +++ b/src-tauri/src/event_handling/resource_overview.rs @@ -9,7 +9,7 @@ use hitman_formats::{ ores::{parse_hashes_ores, parse_json_ores}, wwev::{WwiseEvent, WwiseEventData} }; -use image::{io::Reader as ImageReader, ImageFormat}; +use image::{ImageFormat, ImageReader}; use rayon::iter::{IntoParallelRefIterator, ParallelIterator}; use rfd::AsyncFileDialog; use rpkg_rs::{resource::partition_manager::PartitionManager, GlacierResource}; @@ -369,8 +369,14 @@ pub fn initialise_resource_overview( let clng = hmlanguages::clng::CLNG::new(game_version.into(), langmap.1.to_owned()) .map_err(|x| anyhow!("TonyTools error: {x:?}"))?; - clng.convert(&res_data, to_string(&res_meta)?) - .map_err(|x| anyhow!("TonyTools error: {x:?}"))? + clng.convert( + &res_data, + to_string( + &RpkgResourceMeta::from_resource_metadata(res_meta.to_owned(), false) + .with_hash_list(&hash_list.entries)? + )? + ) + .map_err(|x| anyhow!("TonyTools error: {x:?}"))? } { break x; } else { @@ -412,9 +418,15 @@ pub fn initialise_resource_overview( let formatter = serde_json::ser::PrettyFormatter::with_indent(b"\t"); let mut ser = serde_json::Serializer::with_formatter(&mut buf, formatter); - ditl.convert(&res_data, to_string(&res_meta)?) - .map_err(|x| anyhow!("TonyTools error: {x:?}"))? - .serialize(&mut ser)?; + ditl.convert( + &res_data, + to_string( + &RpkgResourceMeta::from_resource_metadata(res_meta, false) + .with_hash_list(&hash_list.entries)? + )? + ) + .map_err(|x| anyhow!("TonyTools error: {x:?}"))? + .serialize(&mut ser)?; String::from_utf8(buf)? } @@ -447,8 +459,14 @@ pub fn initialise_resource_overview( ) .map_err(|x| anyhow!("TonyTools error: {x:?}"))?; - dlge.convert(&res_data, to_string(&res_meta)?) - .map_err(|x| anyhow!("TonyTools error: {x:?}"))? + dlge.convert( + &res_data, + to_string( + &RpkgResourceMeta::from_resource_metadata(res_meta.to_owned(), false) + .with_hash_list(&hash_list.entries)? + )? + ) + .map_err(|x| anyhow!("TonyTools error: {x:?}"))? } { break x; } else { @@ -497,8 +515,14 @@ pub fn initialise_resource_overview( ) .map_err(|x| anyhow!("TonyTools error: {x:?}"))?; - locr.convert(&res_data, to_string(&res_meta)?) - .map_err(|x| anyhow!("TonyTools error: {x:?}"))? + locr.convert( + &res_data, + to_string( + &RpkgResourceMeta::from_resource_metadata(res_meta.to_owned(), false) + .with_hash_list(&hash_list.entries)? + )? + ) + .map_err(|x| anyhow!("TonyTools error: {x:?}"))? } { break x; } else { @@ -527,7 +551,13 @@ pub fn initialise_resource_overview( let rtlv = hmlanguages::rtlv::RTLV::new(game_version.into(), None) .map_err(|x| anyhow!("TonyTools error: {x:?}"))? - .convert(&res_data, to_string(&res_meta)?) + .convert( + &res_data, + to_string( + &RpkgResourceMeta::from_resource_metadata(res_meta, false) + .with_hash_list(&hash_list.entries)? + )? + ) .map_err(|x| anyhow!("TonyTools error: {x:?}"))?; let mut buf = Vec::new(); @@ -874,7 +904,6 @@ pub async fn handle_resource_overview_event(app: &AppHandle, event: ResourceOver if let Some(game_files) = app_state.game_files.load().as_ref() && let Some(install) = app_settings.load().game_install.as_ref() - && let Some(hash_list) = app_state.hash_list.load().as_ref() { let (metadata, data) = extract_latest_resource(game_files, hash)?; let metadata_file = RpkgResourceMeta::from_resource_metadata(metadata, false) @@ -1074,7 +1103,6 @@ pub async fn handle_resource_overview_event(app: &AppHandle, event: ResourceOver if let Some(game_files) = app_state.game_files.load().as_ref() && let Some(install) = app_settings.load().game_install.as_ref() - && let Some(hash_list) = app_state.hash_list.load().as_ref() { let (res_meta, res_data) = extract_latest_resource(game_files, hash)?; @@ -1118,7 +1146,6 @@ pub async fn handle_resource_overview_event(app: &AppHandle, event: ResourceOver }; if let Some(game_files) = app_state.game_files.load().as_ref() - && let Some(hash_list) = app_state.hash_list.load().as_ref() { if hash == "0057C2C3941115CA".parse()? { let (_, res_data) = extract_latest_resource(game_files, hash)?; @@ -1175,7 +1202,6 @@ pub async fn handle_resource_overview_event(app: &AppHandle, event: ResourceOver }; if let Some(game_files) = app_state.game_files.load().as_ref() - && let Some(hash_list) = app_state.hash_list.load().as_ref() && let Some(install) = app_settings.load().game_install.as_ref() { let (res_meta, res_data) = extract_latest_resource(game_files, hash)?; @@ -1312,7 +1338,6 @@ pub async fn handle_resource_overview_event(app: &AppHandle, event: ResourceOver }; if let Some(game_files) = app_state.game_files.load().as_ref() - && let Some(hash_list) = app_state.hash_list.load().as_ref() { let mut dialog = AsyncFileDialog::new().set_title("Extract file"); @@ -1361,7 +1386,6 @@ pub async fn handle_resource_overview_event(app: &AppHandle, event: ResourceOver }; if let Some(game_files) = app_state.game_files.load().as_ref() - && let Some(hash_list) = app_state.hash_list.load().as_ref() { let mut dialog = AsyncFileDialog::new().set_title("Extract all WAVs to folder"); @@ -1455,7 +1479,6 @@ pub async fn handle_resource_overview_event(app: &AppHandle, event: ResourceOver }; if let Some(game_files) = app_state.game_files.load().as_ref() - && let Some(hash_list) = app_state.hash_list.load().as_ref() { let mut dialog = AsyncFileDialog::new().set_title("Extract file"); @@ -1589,8 +1612,17 @@ pub async fn handle_resource_overview_event(app: &AppHandle, event: ResourceOver hmlanguages::clng::CLNG::new(game_version.into(), langmap.1.to_owned()) .map_err(|x| anyhow!("TonyTools error: {x:?}"))?; - clng.convert(&res_data, to_string(&res_meta)?) - .map_err(|x| anyhow!("TonyTools error: {x:?}"))? + clng.convert( + &res_data, + to_string( + &RpkgResourceMeta::from_resource_metadata( + res_meta.to_owned(), + false + ) + .with_hash_list(&hash_list.entries)? + )? + ) + .map_err(|x| anyhow!("TonyTools error: {x:?}"))? } { break x; } else { @@ -1628,9 +1660,15 @@ pub async fn handle_resource_overview_event(app: &AppHandle, event: ResourceOver let formatter = serde_json::ser::PrettyFormatter::with_indent(b"\t"); let mut ser = serde_json::Serializer::with_formatter(&mut buf, formatter); - ditl.convert(&res_data, to_string(&res_meta)?) - .map_err(|x| anyhow!("TonyTools error: {x:?}"))? - .serialize(&mut ser)?; + ditl.convert( + &res_data, + to_string( + &RpkgResourceMeta::from_resource_metadata(res_meta, false) + .with_hash_list(&hash_list.entries)? + )? + ) + .map_err(|x| anyhow!("TonyTools error: {x:?}"))? + .serialize(&mut ser)?; buf } @@ -1659,8 +1697,17 @@ pub async fn handle_resource_overview_event(app: &AppHandle, event: ResourceOver ) .map_err(|x| anyhow!("TonyTools error: {x:?}"))?; - dlge.convert(&res_data, to_string(&res_meta)?) - .map_err(|x| anyhow!("TonyTools error: {x:?}"))? + dlge.convert( + &res_data, + to_string( + &RpkgResourceMeta::from_resource_metadata( + res_meta.to_owned(), + false + ) + .with_hash_list(&hash_list.entries)? + )? + ) + .map_err(|x| anyhow!("TonyTools error: {x:?}"))? } { break x; } else { @@ -1705,8 +1752,17 @@ pub async fn handle_resource_overview_event(app: &AppHandle, event: ResourceOver ) .map_err(|x| anyhow!("TonyTools error: {x:?}"))?; - locr.convert(&res_data, to_string(&res_meta)?) - .map_err(|x| anyhow!("TonyTools error: {x:?}"))? + locr.convert( + &res_data, + to_string( + &RpkgResourceMeta::from_resource_metadata( + res_meta.to_owned(), + false + ) + .with_hash_list(&hash_list.entries)? + )? + ) + .map_err(|x| anyhow!("TonyTools error: {x:?}"))? } { break x; } else { @@ -1731,7 +1787,13 @@ pub async fn handle_resource_overview_event(app: &AppHandle, event: ResourceOver "RTLV" => { let rtlv = hmlanguages::rtlv::RTLV::new(game_version.into(), None) .map_err(|x| anyhow!("TonyTools error: {x:?}"))? - .convert(&res_data, to_string(&res_meta)?) + .convert( + &res_data, + to_string( + &RpkgResourceMeta::from_resource_metadata(res_meta, false) + .with_hash_list(&hash_list.entries)? + )? + ) .map_err(|x| anyhow!("TonyTools error: {x:?}"))?; let mut buf = Vec::new(); diff --git a/src-tauri/src/event_handling/tools.rs b/src-tauri/src/event_handling/tools.rs index 795a2c2..0ecd09d 100644 --- a/src-tauri/src/event_handling/tools.rs +++ b/src-tauri/src/event_handling/tools.rs @@ -639,7 +639,6 @@ pub async fn handle_tool_event(app: &AppHandle, event: ToolEvent) -> Result<()> == "0057C2C3941115CA" { if let Some(game_files) = app_state.game_files.load().as_ref() - && let Some(hash_list) = app_state.hash_list.load().as_ref() { let mut current = to_value( from_str::>(&parse_json_ores( @@ -733,7 +732,6 @@ pub async fn handle_tool_event(app: &AppHandle, event: ToolEvent) -> Result<()> FileBrowserEvent::ConvertUnlockablesPatchToJsonPatch { path } => { if let Some(game_files) = app_state.game_files.load().as_ref() - && let Some(hash_list) = app_state.hash_list.load().as_ref() { let mut current = to_value( from_str::>(&parse_json_ores( diff --git a/src-tauri/src/general.rs b/src-tauri/src/general.rs index ae690e0..5247482 100644 --- a/src-tauri/src/general.rs +++ b/src-tauri/src/general.rs @@ -354,9 +354,7 @@ pub async fn open_file(app: &AppHandle, path: impl AsRef) -> Result<()> { "unlockables.json" => { let id = Uuid::new_v4(); - if let Some(game_files) = app_state.game_files.load().as_ref() - && let Some(hash_list) = app_state.hash_list.load().as_ref() - { + if let Some(game_files) = app_state.game_files.load().as_ref() { let mut unlockables = to_value( from_str::>(&parse_json_ores( &extract_latest_resource(game_files, "0057C2C3941115CA".parse()?)?.1 @@ -537,9 +535,7 @@ pub async fn open_file(app: &AppHandle, path: impl AsRef) -> Result<()> { { let id = Uuid::new_v4(); - if let Some(game_files) = app_state.game_files.load().as_ref() - && let Some(hash_list) = app_state.hash_list.load().as_ref() - { + if let Some(game_files) = app_state.game_files.load().as_ref() { let mut unlockables = to_value( from_str::>(&parse_json_ores( &extract_latest_resource(game_files, "0057C2C3941115CA".parse()?)?.1 @@ -1002,9 +998,7 @@ pub async fn load_game_files(app: &AppHandle) -> Result<()> { finish_task(app, task)? }; - if let Some(game_files) = app_state.game_files.load().as_ref() - && let Some(hash_list) = app_state.hash_list.load().as_ref() - { + if let Some(game_files) = app_state.game_files.load().as_ref() { let task = start_task(app, "Caching repository")?; app_state.repository.store(Some( diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 79935d6..309d088 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -57,7 +57,6 @@ use model::{ }; use notify::Watcher; use quickentity_rs::{generate_patch, qn_structs::Property}; -use rayon::iter::ParallelIterator; use rfd::AsyncFileDialog; use serde::{Deserialize, Serialize}; use serde_json::{from_slice, json, to_value, to_vec, Value};