diff --git a/Cargo.toml b/Cargo.toml index d223156..420c34f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "anime-launcher-sdk" -version = "1.6.5" +version = "1.6.6" authors = ["Nikita Podvirnyy "] license = "GPL-3.0" readme = "README.md" @@ -9,7 +9,7 @@ edition = "2021" [dependencies.anime-game-core] git = "https://github.com/an-anime-team/anime-game-core" -tag = "1.11.7" +tag = "1.11.8" features = ["all"] # path = "../anime-game-core" # ! for dev purposes only diff --git a/src/games/honkai/config/schema/launcher/discord_rpc.rs b/src/games/honkai/config/schema/launcher/discord_rpc.rs index 81c720f..df40423 100644 --- a/src/games/honkai/config/schema/launcher/discord_rpc.rs +++ b/src/games/honkai/config/schema/launcher/discord_rpc.rs @@ -53,17 +53,17 @@ impl From<&JsonValue> for DiscordRpc { let mut title = match value.get("title") { Some(value) => value.as_str().unwrap_or(&default.title).to_string(), - None => default.title + None => default.title.clone() }; let mut subtitle = match value.get("subtitle") { Some(value) => value.as_str().unwrap_or(&default.subtitle).to_string(), - None => default.subtitle + None => default.subtitle.clone() }; // If old values are detected - replace them by new if app_id == 901534333360304168 { - app_id = defualt.app_id; + app_id = default.app_id; title = default.title; subtitle = default.subtitle; } diff --git a/src/games/honkai/config/schema/launcher/mod.rs b/src/games/honkai/config/schema/launcher/mod.rs index 86f721f..0dce47e 100644 --- a/src/games/honkai/config/schema/launcher/mod.rs +++ b/src/games/honkai/config/schema/launcher/mod.rs @@ -12,6 +12,8 @@ use crate::config::schema_blanks::prelude::*; use crate::honkai::consts::launcher_dir; pub mod prelude { + pub use super::{Launcher, LauncherStyle}; + #[cfg(feature = "discord-rpc")] pub use super::discord_rpc::DiscordRpc; } diff --git a/src/games/honkai/config/schema/mod.rs b/src/games/honkai/config/schema/mod.rs index eaa1fa0..bc9ff9e 100644 --- a/src/games/honkai/config/schema/mod.rs +++ b/src/games/honkai/config/schema/mod.rs @@ -28,7 +28,7 @@ pub mod prelude { pub use super::launcher::prelude::*; pub use super::game::prelude::*; - pub use super::launcher::*; + pub use super::launcher::prelude::*; pub use super::game::*; pub use super::patch::*; diff --git a/src/games/honkai/game.rs b/src/games/honkai/game.rs index c9346f4..796ff73 100644 --- a/src/games/honkai/game.rs +++ b/src/games/honkai/game.rs @@ -207,7 +207,7 @@ pub fn run() -> anyhow::Result<()> { // We use real current dir here because sandboxed one // obviously doesn't exist - command.current_dir(config.game.path) + command.current_dir(&config.game.path) .spawn()?.wait_with_output()?; #[cfg(feature = "discord-rpc")] diff --git a/src/games/honkai/states.rs b/src/games/honkai/states.rs index b4142f6..3fec2a0 100644 --- a/src/games/honkai/states.rs +++ b/src/games/honkai/states.rs @@ -54,7 +54,7 @@ impl LauncherState { // Check game installation status (params.status_updater)(StateUpdating::Game); - let game = Game::new(¶ms.game_path); + let game = Game::new(¶ms.game_path, ()); let diff = game.try_get_diff()?; diff --git a/src/games/pgr/config/schema/launcher/mod.rs b/src/games/pgr/config/schema/launcher/mod.rs index adf6799..1c35c92 100644 --- a/src/games/pgr/config/schema/launcher/mod.rs +++ b/src/games/pgr/config/schema/launcher/mod.rs @@ -12,6 +12,8 @@ use crate::config::schema_blanks::prelude::*; use crate::pgr::consts::launcher_dir; pub mod prelude { + pub use super::{Launcher, LauncherStyle}; + #[cfg(feature = "discord-rpc")] pub use super::discord_rpc::DiscordRpc; } diff --git a/src/games/pgr/config/schema/mod.rs b/src/games/pgr/config/schema/mod.rs index bfe7a9a..872863c 100644 --- a/src/games/pgr/config/schema/mod.rs +++ b/src/games/pgr/config/schema/mod.rs @@ -27,7 +27,7 @@ pub mod prelude { pub use super::launcher::prelude::*; pub use super::game::prelude::*; - pub use super::launcher::*; + pub use super::launcher::prelude::*; pub use super::game::*; #[cfg(feature = "components")] diff --git a/src/games/star_rail/config/schema/launcher/discord_rpc.rs b/src/games/star_rail/config/schema/launcher/discord_rpc.rs index b7c2113..d0792d8 100644 --- a/src/games/star_rail/config/schema/launcher/discord_rpc.rs +++ b/src/games/star_rail/config/schema/launcher/discord_rpc.rs @@ -53,12 +53,12 @@ impl From<&JsonValue> for DiscordRpc { let mut title = match value.get("title") { Some(value) => value.as_str().unwrap_or(&default.title).to_string(), - None => default.title + None => default.title.clone() }; let mut subtitle = match value.get("subtitle") { Some(value) => value.as_str().unwrap_or(&default.subtitle).to_string(), - None => default.subtitle + None => default.subtitle.clone() }; // If old values are detected - replace them by new diff --git a/src/games/star_rail/config/schema/launcher/mod.rs b/src/games/star_rail/config/schema/launcher/mod.rs index 975c2df..841039e 100644 --- a/src/games/star_rail/config/schema/launcher/mod.rs +++ b/src/games/star_rail/config/schema/launcher/mod.rs @@ -14,6 +14,8 @@ use crate::star_rail::consts::launcher_dir; pub mod discord_rpc; pub mod prelude { + pub use super::{Launcher, LauncherStyle}; + #[cfg(feature = "discord-rpc")] pub use super::discord_rpc::DiscordRpc; } diff --git a/src/games/star_rail/config/schema/mod.rs b/src/games/star_rail/config/schema/mod.rs index eaa1fa0..bc9ff9e 100644 --- a/src/games/star_rail/config/schema/mod.rs +++ b/src/games/star_rail/config/schema/mod.rs @@ -28,7 +28,7 @@ pub mod prelude { pub use super::launcher::prelude::*; pub use super::game::prelude::*; - pub use super::launcher::*; + pub use super::launcher::prelude::*; pub use super::game::*; pub use super::patch::*;