From 1d56514b71da92b827ec4162975a12e4bf9b13fc Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Sun, 16 Apr 2023 17:36:39 +0200 Subject: [PATCH] 1.0.1 - fixed config file parsing --- Cargo.toml | 2 +- src/genshin/config/schema/mod.rs | 2 ++ src/honkai/config/schema/mod.rs | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index f15a7e1..a544aa7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "anime-launcher-sdk" -version = "1.0.0" +version = "1.0.1" authors = ["Nikita Podvirnyy "] license = "GPL-3.0" readme = "README.md" diff --git a/src/genshin/config/schema/mod.rs b/src/genshin/config/schema/mod.rs index 56d50c1..95651f6 100644 --- a/src/genshin/config/schema/mod.rs +++ b/src/genshin/config/schema/mod.rs @@ -60,11 +60,13 @@ impl From<&JsonValue> for Schema { None => default.game }, + #[cfg(feature = "sandbox")] sandbox: match value.get("sandbox") { Some(value) => Sandbox::from(value), None => default.sandbox }, + #[cfg(feature = "components")] components: match value.get("components") { Some(value) => Components::from(value), None => default.components diff --git a/src/honkai/config/schema/mod.rs b/src/honkai/config/schema/mod.rs index 153af67..95651f6 100644 --- a/src/honkai/config/schema/mod.rs +++ b/src/honkai/config/schema/mod.rs @@ -60,6 +60,13 @@ impl From<&JsonValue> for Schema { None => default.game }, + #[cfg(feature = "sandbox")] + sandbox: match value.get("sandbox") { + Some(value) => Sandbox::from(value), + None => default.sandbox + }, + + #[cfg(feature = "components")] components: match value.get("components") { Some(value) => Components::from(value), None => default.components