mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix swarm binary to use clap
This commit is contained in:
parent
94aa4ce8b1
commit
c7dc51d52b
@ -1,3 +1,4 @@
|
||||
use clap::Parser;
|
||||
use common::{
|
||||
comp,
|
||||
terrain::{CoordinateConversions, TerrainChunkSize},
|
||||
@ -12,29 +13,30 @@ use std::{
|
||||
thread,
|
||||
time::{Duration, SystemTime},
|
||||
};
|
||||
use structopt::StructOpt;
|
||||
use tokio::runtime::Runtime;
|
||||
use vek::*;
|
||||
use veloren_client::{addr::ConnectionArgs, Client};
|
||||
|
||||
const CHUNK_SIZE: f32 = TerrainChunkSize::RECT_SIZE.x as f32;
|
||||
|
||||
#[derive(Clone, Copy, StructOpt)]
|
||||
#[derive(Clone, Copy, Parser)]
|
||||
struct Opt {
|
||||
/// Number of clients to spin up
|
||||
#[arg(value_name = "CLIENT_COUNT")]
|
||||
size: u32,
|
||||
/// View distance of each client
|
||||
#[arg(value_name = "VIEW_DISTANCE")]
|
||||
vd: u32,
|
||||
/// Distribution of the clients, if not clustered they are dispersed
|
||||
#[structopt(short, long)]
|
||||
#[arg(short, long)]
|
||||
clustered: bool,
|
||||
/// Whether the clients should move
|
||||
#[structopt(short, long)]
|
||||
#[arg(short, long)]
|
||||
movement: bool,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let opt = Opt::from_args();
|
||||
let opt = Opt::parse();
|
||||
// Start logging
|
||||
let _guards = common_frontend::init_stdout(None);
|
||||
// Run clients and stuff
|
||||
|
Loading…
Reference in New Issue
Block a user