Create initial multiplayer server skeleton

This commit is contained in:
NG (Graham) committed 2025-07-01 20:04:11 -04:00
1 parent 9f74a2e76a
commit c2dc6088a0
11 files changed
+537 -32

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
use clap::Parser;
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
pub struct CliArgs {
/// UDP port on which to accept connections
#[arg(short, long, default_value_t = 4542)]
pub port: u16,
/// IP Address on which to accept connections
#[arg(long, default_value_t = {"127.0.0.1".to_string()})]
pub ip: String,
/// Assets root
#[arg(long, default_value_t = {"../assets/robocraft".to_string()})]
pub assets: String,
/// User data root
#[arg(long, default_value_t = {"../data/robocraft".to_string()})]
pub data: String,
}
impl CliArgs {
pub fn get() -> Self {
Self::parse()
}
}