1.3.0
This commit is contained in:
parent
c26fe8a3d5
commit
673decfbd3
4 changed files with 7 additions and 19 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "anime-launcher-sdk"
|
||||
version = "1.2.5"
|
||||
version = "1.3.0"
|
||||
authors = ["Nikita Podvirnyy <suimin.tu.mu.ga.mi@gmail.com>"]
|
||||
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
|
||||
|
|
|
@ -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) |
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
///
|
||||
/// ```
|
||||
|
|
Loading…
Reference in a new issue