feat(star-rail): removed unused patch.apply_xlua property

This commit is contained in:
Observer KRypt0n_ 2023-04-23 00:15:34 +02:00
parent ed246f079b
commit f322763197
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2

View file

@ -9,7 +9,6 @@ use crate::star_rail::consts::launcher_dir;
pub struct Patch {
pub path: PathBuf,
pub servers: Vec<String>,
pub apply_xlua: bool,
pub root: bool
}
@ -25,8 +24,6 @@ impl Default for Patch {
String::from("https://notabug.org/Krock/dawn")
],
apply_xlua: true,
// Disable root requirement for patching if we're running launcher in flatpak
root: !PathBuf::from("/.flatpak-info").exists()
}
@ -64,11 +61,6 @@ impl From<&JsonValue> for Patch {
None => default.servers
},
apply_xlua: match value.get("apply_xlua") {
Some(value) => value.as_bool().unwrap_or(default.apply_xlua),
None => default.apply_xlua
},
root: match value.get("root") {
Some(value) => value.as_bool().unwrap_or(default.root),
None => default.root