Partial: Dedicated Peer distribution system
All checks were successful
CI / Formatting (push) Successful in 1m7s
All checks were successful
CI / Formatting (push) Successful in 1m7s
This is an uncompleted commit to move the work over to my other machine. Should compile though.
This commit is contained in:
parent
4db82f328b
commit
1a5a628000
6 changed files with 161 additions and 53 deletions
|
|
@ -4,14 +4,14 @@ use crate::net::prelude::*;
|
|||
|
||||
pub fn handle_new_peer(new_peers: Query<&Peer, Added<Peer>>) {
|
||||
for peer in new_peers {
|
||||
info!("Peer {} was added", peer.uuid);
|
||||
info!("Peer {} was added", peer.id);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn handle_deleted_peer(mut old_peers: RemovedComponents<Peer>, peers: Query<&Peer>) -> Result {
|
||||
for entity in old_peers.read() {
|
||||
if let Ok(peer) = peers.get(entity) {
|
||||
info!("Peer {} was removed", peer.uuid);
|
||||
info!("Peer {} was removed", peer.id);
|
||||
} else {
|
||||
info!("Peer {} was removed", entity);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue