use std::collections::HashMap; use serde::Serialize; #[derive(Debug, Serialize)] pub struct SpawnPlayer { pub id: u32, pub username: String, pub position: (f32, f32), } #[derive(Debug, Serialize)] pub struct PacketPlanet { pub planet_type: u8, pub position: (f32, f32), } #[derive(Debug, Serialize)] pub struct PlanetPositionPacket { pub planets: HashMap // id, (Type, x, y) } #[derive(Debug, Serialize)] pub struct PartPositionPacket { pub parts: HashMap // id, (Type, x, y) }