JaneDoe-ZS/nap_gameserver/src/config.rs

27 lines
805 B
Rust
Raw Normal View History

2024-07-20 12:13:04 +00:00
use common::database::DatabaseCredentials;
use data::AssetsConfig;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize)]
pub struct NapGSConfig {
pub tcp_listen_addr: String,
pub player_save_period_seconds: u64,
#[serde(rename = "database")]
pub database_credentials: DatabaseCredentials,
pub assets: AssetsConfig,
}
impl Default for NapGSConfig {
fn default() -> Self {
Self {
tcp_listen_addr: String::from("0.0.0.0:20501"),
player_save_period_seconds: 30,
database_credentials: DatabaseCredentials::default(),
assets: AssetsConfig {
filecfg_path: String::from("assets/FileCfg"),
usm_keys_path: String::from("assets/VideoUSMEncKeys.json"),
},
}
}
}