2023-08-29 06:47:40 +02:00
|
|
|
#[derive(serde::Deserialize, serde::Serialize)]
|
|
|
|
pub struct CdnFile {
|
|
|
|
pub name: String,
|
|
|
|
pub size: u32,
|
|
|
|
pub hash: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(serde::Deserialize, serde::Serialize)]
|
|
|
|
pub struct Game<'a> {
|
|
|
|
pub engine: &'a str,
|
|
|
|
pub client: Vec<&'a str>,
|
|
|
|
pub references: Vec<&'a str>,
|
|
|
|
pub app_id: u32,
|
2023-09-10 18:29:30 +02:00
|
|
|
pub bonus: Vec<&'a str>,
|
2023-08-29 06:47:40 +02:00
|
|
|
}
|
2023-09-10 16:58:42 +02:00
|
|
|
|
2023-09-10 18:29:30 +02:00
|
|
|
#[derive(serde::Deserialize, serde::Serialize)]
|
2023-09-10 16:58:42 +02:00
|
|
|
pub struct Config {
|
|
|
|
pub update_only: bool,
|
|
|
|
pub skip_self_update: bool,
|
2023-09-10 18:29:30 +02:00
|
|
|
pub download_bonus_content: bool,
|
|
|
|
pub ask_bonus_content: bool,
|
2023-09-12 21:28:53 +02:00
|
|
|
pub force_update: bool,
|
2023-09-10 16:58:42 +02:00
|
|
|
}
|
2023-09-10 17:36:01 +02:00
|
|
|
|
2023-09-10 18:29:30 +02:00
|
|
|
impl Default for Config {
|
|
|
|
fn default() -> Self {
|
|
|
|
Self {
|
|
|
|
update_only: false,
|
|
|
|
skip_self_update: false,
|
|
|
|
download_bonus_content: false,
|
|
|
|
ask_bonus_content: true,
|
2023-09-12 21:28:53 +02:00
|
|
|
force_update: false,
|
2023-09-10 18:29:30 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|