feat: made default game.path
folder name depend on game edition
This commit is contained in:
parent
7fc9b9ddba
commit
0984ea5ef6
3 changed files with 8 additions and 2 deletions
0
.gitmodules
vendored
0
.gitmodules
vendored
|
@ -11,8 +11,10 @@ git = "https://github.com/an-anime-team/anime-game-core"
|
||||||
tag = "1.4.5"
|
tag = "1.4.5"
|
||||||
features = ["genshin", "all"]
|
features = ["genshin", "all"]
|
||||||
|
|
||||||
|
# path = "../anime-game-core" # ! for dev purposes only
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0"
|
anyhow = { version = "1.0", features = ["backtrace"] }
|
||||||
dirs = "5.0.0"
|
dirs = "5.0.0"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
cached = { version = "0.42", features = ["proc_macro"] }
|
cached = { version = "0.42", features = ["proc_macro"] }
|
||||||
|
|
|
@ -4,6 +4,7 @@ use std::path::PathBuf;
|
||||||
use serde::{Serialize, Deserialize};
|
use serde::{Serialize, Deserialize};
|
||||||
use serde_json::Value as JsonValue;
|
use serde_json::Value as JsonValue;
|
||||||
|
|
||||||
|
use crate::anime_game_core::genshin::consts::{GameEdition, GAME_EDITION};
|
||||||
use crate::consts::launcher_dir;
|
use crate::consts::launcher_dir;
|
||||||
|
|
||||||
pub mod wine;
|
pub mod wine;
|
||||||
|
@ -36,7 +37,10 @@ impl Default for Game {
|
||||||
let launcher_dir = launcher_dir().expect("Failed to get launcher dir");
|
let launcher_dir = launcher_dir().expect("Failed to get launcher dir");
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
path: launcher_dir.join("Genshin Impact"), // TODO: change it based on GameEdition
|
path: launcher_dir.join(match unsafe { GAME_EDITION } {
|
||||||
|
GameEdition::Global => concat!("Ge", "nshi", "n Imp", "act"),
|
||||||
|
GameEdition::China => concat!("Yu", "anS", "hen")
|
||||||
|
}),
|
||||||
voices: vec![
|
voices: vec![
|
||||||
String::from("en-us")
|
String::from("en-us")
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue