- fixed features issues
This commit is contained in:
Observer KRypt0n_ 2023-06-10 14:55:51 +02:00
parent b9c72486d0
commit 22534ed605
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
11 changed files with 18 additions and 12 deletions

View file

@ -1,6 +1,6 @@
[package] [package]
name = "anime-launcher-sdk" name = "anime-launcher-sdk"
version = "1.6.5" version = "1.6.6"
authors = ["Nikita Podvirnyy <suimin.tu.mu.ga.mi@gmail.com>"] authors = ["Nikita Podvirnyy <suimin.tu.mu.ga.mi@gmail.com>"]
license = "GPL-3.0" license = "GPL-3.0"
readme = "README.md" readme = "README.md"
@ -9,7 +9,7 @@ edition = "2021"
[dependencies.anime-game-core] [dependencies.anime-game-core]
git = "https://github.com/an-anime-team/anime-game-core" git = "https://github.com/an-anime-team/anime-game-core"
tag = "1.11.7" tag = "1.11.8"
features = ["all"] features = ["all"]
# path = "../anime-game-core" # ! for dev purposes only # path = "../anime-game-core" # ! for dev purposes only

View file

@ -53,17 +53,17 @@ impl From<&JsonValue> for DiscordRpc {
let mut title = match value.get("title") { let mut title = match value.get("title") {
Some(value) => value.as_str().unwrap_or(&default.title).to_string(), 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") { let mut subtitle = match value.get("subtitle") {
Some(value) => value.as_str().unwrap_or(&default.subtitle).to_string(), 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 old values are detected - replace them by new
if app_id == 901534333360304168 { if app_id == 901534333360304168 {
app_id = defualt.app_id; app_id = default.app_id;
title = default.title; title = default.title;
subtitle = default.subtitle; subtitle = default.subtitle;
} }

View file

@ -12,6 +12,8 @@ use crate::config::schema_blanks::prelude::*;
use crate::honkai::consts::launcher_dir; use crate::honkai::consts::launcher_dir;
pub mod prelude { pub mod prelude {
pub use super::{Launcher, LauncherStyle};
#[cfg(feature = "discord-rpc")] #[cfg(feature = "discord-rpc")]
pub use super::discord_rpc::DiscordRpc; pub use super::discord_rpc::DiscordRpc;
} }

View file

@ -28,7 +28,7 @@ pub mod prelude {
pub use super::launcher::prelude::*; pub use super::launcher::prelude::*;
pub use super::game::prelude::*; pub use super::game::prelude::*;
pub use super::launcher::*; pub use super::launcher::prelude::*;
pub use super::game::*; pub use super::game::*;
pub use super::patch::*; pub use super::patch::*;

View file

@ -207,7 +207,7 @@ pub fn run() -> anyhow::Result<()> {
// We use real current dir here because sandboxed one // We use real current dir here because sandboxed one
// obviously doesn't exist // obviously doesn't exist
command.current_dir(config.game.path) command.current_dir(&config.game.path)
.spawn()?.wait_with_output()?; .spawn()?.wait_with_output()?;
#[cfg(feature = "discord-rpc")] #[cfg(feature = "discord-rpc")]

View file

@ -54,7 +54,7 @@ impl LauncherState {
// Check game installation status // Check game installation status
(params.status_updater)(StateUpdating::Game); (params.status_updater)(StateUpdating::Game);
let game = Game::new(&params.game_path); let game = Game::new(&params.game_path, ());
let diff = game.try_get_diff()?; let diff = game.try_get_diff()?;

View file

@ -12,6 +12,8 @@ use crate::config::schema_blanks::prelude::*;
use crate::pgr::consts::launcher_dir; use crate::pgr::consts::launcher_dir;
pub mod prelude { pub mod prelude {
pub use super::{Launcher, LauncherStyle};
#[cfg(feature = "discord-rpc")] #[cfg(feature = "discord-rpc")]
pub use super::discord_rpc::DiscordRpc; pub use super::discord_rpc::DiscordRpc;
} }

View file

@ -27,7 +27,7 @@ pub mod prelude {
pub use super::launcher::prelude::*; pub use super::launcher::prelude::*;
pub use super::game::prelude::*; pub use super::game::prelude::*;
pub use super::launcher::*; pub use super::launcher::prelude::*;
pub use super::game::*; pub use super::game::*;
#[cfg(feature = "components")] #[cfg(feature = "components")]

View file

@ -53,12 +53,12 @@ impl From<&JsonValue> for DiscordRpc {
let mut title = match value.get("title") { let mut title = match value.get("title") {
Some(value) => value.as_str().unwrap_or(&default.title).to_string(), 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") { let mut subtitle = match value.get("subtitle") {
Some(value) => value.as_str().unwrap_or(&default.subtitle).to_string(), 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 old values are detected - replace them by new

View file

@ -14,6 +14,8 @@ use crate::star_rail::consts::launcher_dir;
pub mod discord_rpc; pub mod discord_rpc;
pub mod prelude { pub mod prelude {
pub use super::{Launcher, LauncherStyle};
#[cfg(feature = "discord-rpc")] #[cfg(feature = "discord-rpc")]
pub use super::discord_rpc::DiscordRpc; pub use super::discord_rpc::DiscordRpc;
} }

View file

@ -28,7 +28,7 @@ pub mod prelude {
pub use super::launcher::prelude::*; pub use super::launcher::prelude::*;
pub use super::game::prelude::*; pub use super::game::prelude::*;
pub use super::launcher::*; pub use super::launcher::prelude::*;
pub use super::game::*; pub use super::game::*;
pub use super::patch::*; pub use super::patch::*;