Files
ojrc/rc_services_room/src/data/player_robopass_season.rs
T

25 lines
877 B
Rust
Raw Normal View History

2025-03-01 16:22:57 -05:00
use polariton::operation::{Typed, Dict};
pub struct PlayerRoboPassSeasonInfo {
pub delta_xp_to_show: i32,
pub grade: i32,
pub has_deluxe: bool,
pub progress_in_grade: f32,
pub xp_from_start: i32,
}
impl PlayerRoboPassSeasonInfo {
pub fn as_transmissible(&self) -> Typed {
Typed::Dict(Dict {
key_ty: 115, // str
val_ty: 42, // obj
items: vec![
(Typed::Str("deltaXpToShow".into()), Typed::Int(self.delta_xp_to_show)),
(Typed::Str("grade".into()), Typed::Int(self.grade)),
(Typed::Str("hasDeluxe".into()), Typed::Bool(self.has_deluxe.into())),
(Typed::Str("progressInGrade".into()), Typed::Float(self.progress_in_grade)),
(Typed::Str("xpFromSeasonStart".into()), Typed::Int(self.xp_from_start)),
],
})
}
}