mirror of
https://github.com/alterware/alterware-launcher.git
synced 2025-12-04 07:17:50 +00:00
download bonus content
This commit is contained in:
@@ -15,3 +15,15 @@ pub fn load(config_path: PathBuf) -> Config {
|
||||
pub fn save(config_path: PathBuf, config: Config) {
|
||||
fs::write(config_path, serde_json::to_string(&config).unwrap()).unwrap();
|
||||
}
|
||||
|
||||
pub fn save_value(config_path: PathBuf, key: &str, value: bool) {
|
||||
let mut config = load(config_path.clone());
|
||||
match key {
|
||||
"update_only" => config.update_only = value,
|
||||
"skip_self_update" => config.skip_self_update = value,
|
||||
"download_bonus_content" => config.download_bonus_content = value,
|
||||
"ask_bonus_content" => config.ask_bonus_content = value,
|
||||
_ => (),
|
||||
}
|
||||
save(config_path, config);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user