45 lines
1.1 KiB
Rust
45 lines
1.1 KiB
Rust
// TODO x,y bounds
|
|
pub struct Config {
|
|
/// Must start and end with `/`
|
|
pub base_url: String,
|
|
pub cache_age: u64,
|
|
pub listen: String,
|
|
pub mapper_threads: usize,
|
|
pub minetestmapper_args: Vec<String>,
|
|
pub minetestmapper_path: String,
|
|
/// Should end with `/`
|
|
pub output_path: String,
|
|
pub tile_size: usize,
|
|
pub world_path: String,
|
|
pub zoom_default: i32,
|
|
pub zoom_max: i32,
|
|
pub zoom_min: i32,
|
|
}
|
|
|
|
impl Default for Config {
|
|
fn default() -> Self {
|
|
Self {
|
|
base_url: String::from("/"),
|
|
cache_age: 86400,
|
|
listen: String::from("127.0.0.1:8080"),
|
|
mapper_threads: 4,
|
|
minetestmapper_args: vec![
|
|
String::from("--drawalpha"),
|
|
String::from("--max-y"),
|
|
String::from("2000"),
|
|
String::from("--colors"),
|
|
String::from("/home/tuxmain/Colors.txt/colors.txt"),
|
|
],
|
|
minetestmapper_path: String::from("/home/tuxmain/minetestmapper/minetestmapper"),
|
|
output_path: String::from("/var/www/html/minetest-map/survival/"),
|
|
tile_size: 256,
|
|
world_path: String::from(
|
|
"/var/games/minetest-server/.minetest/worlds/juneland-survival/",
|
|
),
|
|
zoom_default: 7,
|
|
zoom_max: 10,
|
|
zoom_min: 4,
|
|
}
|
|
}
|
|
}
|