@@ -22,28 +22,29 @@ use clap::Parser;
2222#[ derive( Debug , Parser ) ]
2323pub struct Args {
2424 /// The directory to load the map from. Should be DIM1, or the equivalent renamed folder.
25+ #[ arg( env = "LIMBO_WORLD" ) ]
2526 pub map_dir : String ,
2627 /// The address to serve crawlspace on.
27- #[ arg( short, long, default_value = "[::]" ) ]
28+ #[ arg( short, long, default_value = "[::]" , env = "LIMBO_ADDRESS" ) ]
2829 pub addr : String ,
2930 /// The port to serve crawlspace on. Defaults to 25565 if not set.
30- #[ arg( short, long, default_value = "25565" ) ]
31+ #[ arg( short, long, default_value = "25565" , env = "LIMBO_PORT" ) ]
3132 pub port : u16 ,
3233 /// The x coordinate of the spawnpoint.
33- #[ arg( short = 'x' , long, default_value = "0" ) ]
34+ #[ arg( short = 'x' , long, default_value = "0" , env = "LIMBO_SPAWN_X" ) ]
3435 pub spawn_x : f64 ,
3536 /// The y coordinate of the spawnpoint.
36- #[ arg( short = 'y' , long, default_value = "100" ) ]
37+ #[ arg( short = 'y' , long, default_value = "100" , env = "LIMBO_SPAWN_Y" ) ]
3738 pub spawn_y : f64 ,
3839 /// The z coordinate of the spawnpoint.
39- #[ arg( short = 'z' , long, default_value = "0" ) ]
40+ #[ arg( short = 'z' , long, default_value = "0" , env = "LIMBO_SPAWN_Z" ) ]
4041 pub spawn_z : f64 ,
4142 /// The border radius, centered around the spawnpoint. Defaults to 10 chunks. One
4243 /// chunk past the border will be loaded.
43- #[ arg( short = 'b' , long, default_value = "160" ) ]
44+ #[ arg( short = 'b' , long, default_value = "160" , env = "LIMBO_BORDER_RADIUS" ) ]
4445 pub border_radius : i32 ,
4546 #[ arg( short, long, default_value = "Limbo" ) ]
4647 pub motd : String ,
47- #[ arg( long, default_value = "500" ) ]
48+ #[ arg( long, default_value = "500" , env = "LIMBO_MAX_PLAYERS" ) ]
4849 pub max_players : usize ,
4950}
0 commit comments