1+ mod cache;
12mod config;
23mod extend;
34mod github;
@@ -376,7 +377,7 @@ async fn update(
376377 let mut cache = if force {
377378 structs:: Cache :: default ( )
378379 } else {
379- misc :: get_cache ( dir)
380+ cache :: get_cache ( dir)
380381 } ;
381382
382383 if game. engine == "iw4" {
@@ -482,10 +483,10 @@ async fn update(
482483 }
483484 }
484485
485- misc :: save_cache ( dir, cache) ;
486+ cache :: save_cache ( dir, cache) ;
486487
487488 // Store game data for offline mode
488- let mut stored_data = global :: get_stored_data ( ) . unwrap_or_default ( ) ;
489+ let mut stored_data = cache :: get_stored_data ( ) . unwrap_or_default ( ) ;
489490 stored_data. game_path = dir. to_string_lossy ( ) . into_owned ( ) ;
490491
491492 // Store available clients for this engine
@@ -494,7 +495,7 @@ async fn update(
494495 game. client . iter ( ) . map ( |s| s. to_string ( ) ) . collect ( ) ,
495496 ) ;
496497
497- if let Err ( e) = global :: store_game_data ( & stored_data) {
498+ if let Err ( e) = cache :: store_game_data ( & stored_data) {
498499 println ! (
499500 "{} Failed to store game data: {}" ,
500501 PREFIXES . get( "error" ) . unwrap( ) . formatted( ) ,
@@ -679,7 +680,7 @@ async fn main() {
679680 let offline_mode = !global:: check_connectivity ( ) . await ;
680681 if offline_mode {
681682 // Check if this is a first-time run (no stored data)
682- let stored_data = global :: get_stored_data ( ) ;
683+ let stored_data = cache :: get_stored_data ( ) ;
683684 if stored_data. is_none ( ) {
684685 println ! (
685686 "{} Internet connection is required for first-time installation." ,
@@ -713,7 +714,7 @@ async fn main() {
713714 let cfg = config:: load ( install_path. join ( "alterware-launcher.json" ) ) ;
714715
715716 // Try to get stored game data
716- let stored_data = global :: get_stored_data ( ) ;
717+ let stored_data = cache :: get_stored_data ( ) ;
717718 if let Some ( ref data) = stored_data {
718719 info ! ( "Found stored game data for path: {}" , data. game_path) ;
719720 } else {
@@ -933,7 +934,7 @@ async fn main() {
933934 }
934935
935936 // Store game data for offline mode
936- let mut stored_data = global :: get_stored_data ( ) . unwrap_or_default ( ) ;
937+ let mut stored_data = cache :: get_stored_data ( ) . unwrap_or_default ( ) ;
937938 stored_data. game_path = install_path. to_string_lossy ( ) . into_owned ( ) ;
938939
939940 // Store available clients for this engine
@@ -942,7 +943,7 @@ async fn main() {
942943 g. client . iter ( ) . map ( |s| s. to_string ( ) ) . collect ( ) ,
943944 ) ;
944945
945- if let Err ( e) = global :: store_game_data ( & stored_data) {
946+ if let Err ( e) = cache :: store_game_data ( & stored_data) {
946947 println ! (
947948 "{} Failed to store game data: {}" ,
948949 PREFIXES . get( "error" ) . unwrap( ) . formatted( ) ,
0 commit comments