This repository was archived by the owner on Oct 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed
Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ derivative = "2.2.0"
1919futures = " 0.3.30"
2020indoc = " 2.0.5"
2121lotus-lib = " 4.0.0"
22- lotus-utils-audio = " 0.1.1 "
23- lotus-utils-texture = " 0.1.1 "
22+ lotus-utils-audio = " 0.2.0 "
23+ lotus-utils-texture = " 0.2.0 "
2424ratatui = { version = " 0.26.1" , features = [" unstable-widget-ref" ] }
2525tokio = { version = " 1.37.0" , features = [" full" ] }
2626tokio-util = " 0.7.10"
Original file line number Diff line number Diff line change @@ -32,10 +32,9 @@ pub fn extract_file(
3232 let mut file_name: String = file_name;
3333 let file_data: Vec < u8 > ;
3434
35- if file_name. ends_with ( ".png" ) {
36- file_name = package. get_texture_file_name ( file_node) ;
37- file_data = package. decompress_texture ( file_node) . unwrap ( ) ;
38- } else if file_name. ends_with ( ".wav" ) {
35+ if package. is_texture ( file_node) . unwrap ( ) {
36+ ( file_data, file_name) = package. decompress_texture ( file_node) . unwrap ( ) ;
37+ } else if package. is_audio ( file_node) . unwrap ( ) {
3938 ( file_data, file_name) = package. decompress_audio ( file_node) . unwrap ( ) ;
4039 } else {
4140 // Decompress and extract a file from the cache without parsing it (e.g. audio, texture)
You can’t perform that action at this time.
0 commit comments