You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
531 B

use std::fs;
use once_cell::sync::Lazy;
use serde::Deserialize;
use valence::uuid::Uuid;
#[derive(Deserialize)]
pub struct Config {
// USE ONLY FOR DEVELOPMENT PURPOSES
pub no_auto_stop: Option<bool>,
pub spawn_y: i32,
pub platforms: i32,
pub platform_gap: i32,
pub platform_size: i32,
pub operators: Vec<Uuid>,
}
pub static CONFIG: Lazy<Config> = Lazy::new(|| {
let config = fs::read_to_string("./config.toml").expect("Failed to read config.toml!");
toml::from_str(&config).unwrap()
});