Skip to content

Commit

Permalink
add some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgazelka committed Nov 17, 2024
1 parent dd17c56 commit ff3f798
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 7 deletions.
105 changes: 105 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,25 @@ panic = 'abort'
members = [
'crates/bvh-region',
'crates/hyperion',
'crates/hyperion-bot',
'crates/hyperion-clap',
'crates/hyperion-command',
'crates/hyperion-crafting',
'crates/hyperion-event-macros',
'crates/hyperion-inventory',
'crates/hyperion-item',
'crates/hyperion-minecraft-proto',
'crates/hyperion-nerd-font',
'crates/hyperion-palette',
'crates/hyperion-permission',
'crates/hyperion-proto',
'crates/hyperion-proxy',
'crates/hyperion-rank-tree',
'crates/hyperion-scheduled',
'crates/hyperion-stats',
'crates/hyperion-text',
'crates/hyperion-utils',
'events/proof-of-concept',
'crates/hyperion-permission',
'crates/hyperion-clap',
'crates/hyperion-command',
'crates/hyperion-rank-tree',
'crates/hyperion-item',
]
resolver = '2'

Expand Down
5 changes: 4 additions & 1 deletion crates/hyperion-bot/src/bot.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use tokio::net::{TcpStream, ToSocketAddrs};
use tracing::info;
use uuid::Uuid;

mod handshake;
Expand All @@ -11,7 +12,9 @@ pub struct Bot {
}

impl Bot {
pub async fn new(name: String, uuid: Uuid, addr: impl ToSocketAddrs) -> Self {
#[tracing::instrument(skip_all, fields(name))]
pub async fn new(name: String, uuid: Uuid, addr: impl ToSocketAddrs + std::fmt::Display) -> Self {
info!("connecting to {addr}");
let addr = TcpStream::connect(addr).await.unwrap();

Self {
Expand Down
2 changes: 1 addition & 1 deletion crates/hyperion-bot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn bootstrap(config: &Config) {
// todo: use life cycle

let mut rng = AntithesisRng;

let first_name = generate::name();
assert_sometimes!(first_name.is_valid, "First name is never invalid");
assert_sometimes!(!first_name.is_valid, "First name is always valid");
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ services:
environment:
- RUST_LOG=info
- HOST=hyperion-proxy:25565
- MAX_NUMBER_OF_BOTS=10
networks:
- proxy-network

Expand Down

0 comments on commit ff3f798

Please sign in to comment.