From 673decfbd37a437e3abc11b2166951a637d1f9c9 Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Sat, 20 May 2023 15:58:22 +0200 Subject: [PATCH] 1.3.0 --- Cargo.toml | 4 ++-- README.md | 1 + src/games/honkai/states.rs | 19 ++----------------- src/lib.rs | 2 ++ 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bba90eb..4199ffb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "anime-launcher-sdk" -version = "1.2.5" +version = "1.3.0" authors = ["Nikita Podvirnyy "] license = "GPL-3.0" readme = "README.md" @@ -8,7 +8,7 @@ edition = "2021" [dependencies.anime-game-core] git = "https://github.com/an-anime-team/anime-game-core" -tag = "1.8.2" +tag = "1.9.0" features = ["all"] # path = "../anime-game-core" # ! for dev purposes only diff --git a/README.md b/README.md index db667e1..2d526f2 100644 --- a/README.md +++ b/README.md @@ -25,4 +25,5 @@ SDK based on [anime-game-core](https://github.com/an-anime-team/anime-game-core) | Name | Feature | | - | - | | [An Anime Game](https://github.com/an-anime-team/an-anime-game-launcher) | `gen-shin` (without dash) | +| [Honkers Railway](https://github.com/an-anime-team/the-honkers-railway-launcher) | `star-rail` | | [Honkers](https://github.com/an-anime-team/honkers-launcher) | `hon-kai` (without dash) | diff --git a/src/games/honkai/states.rs b/src/games/honkai/states.rs index 7174ef4..38318b3 100644 --- a/src/games/honkai/states.rs +++ b/src/games/honkai/states.rs @@ -11,9 +11,6 @@ use crate::config::ConfigExt; pub enum LauncherState { Launch, - /// Always contains `VersionDiff::Predownload` - PredownloadAvailable(VersionDiff), - MfplatPatchAvailable, MainPatchAvailable(MainPatch), @@ -25,9 +22,6 @@ pub enum LauncherState { // Always contains `VersionDiff::Diff` GameUpdateAvailable(VersionDiff), - /// Always contains `VersionDiff::Outdated` - GameOutdated(VersionDiff), - /// Always contains `VersionDiff::NotInstalled` GameNotInstalled(VersionDiff) } @@ -67,7 +61,7 @@ impl LauncherState { let diff = game.try_get_diff()?; match diff { - VersionDiff::Latest(_) | VersionDiff::Predownload { .. } => { + VersionDiff::Latest(_) => { // Check game patch status (params.status_updater)(StateUpdating::Patch); @@ -95,19 +89,10 @@ impl LauncherState { return Ok(Self::MainPatchAvailable(player_patch)); } - // Check if update predownload available - if let VersionDiff::Predownload { .. } = diff { - Ok(Self::PredownloadAvailable(diff)) - } - - // Otherwise we can launch the game - else { - Ok(Self::Launch) - } + Ok(Self::Launch) } VersionDiff::Diff { .. } => Ok(Self::GameUpdateAvailable(diff)), - VersionDiff::Outdated { .. } => Ok(Self::GameOutdated(diff)), VersionDiff::NotInstalled { .. } => Ok(Self::GameNotInstalled(diff)) } } diff --git a/src/lib.rs b/src/lib.rs index c480e79..6c0f74e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -28,6 +28,8 @@ pub mod sessions; pub const VERSION: &str = env!("CARGO_PKG_VERSION"); +// TODO: rewrite it to find this binary in PATH instead + /// Check if specified binary is available /// /// ```