1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00
Files
ojrc/rc_services_room/src/data/special_item.rs
2025-02-12 18:46:27 -05:00

18 lines
494 B
Rust

use polariton::operation::Typed;
pub struct SpecialItem {
pub name: String,
pub sprite: String,
pub size: u32,
}
impl SpecialItem {
pub fn as_transmissible(&self) -> Typed {
Typed::HashMap(vec![
(Typed::Str("name".into()), Typed::Str(self.name.clone().into())),
(Typed::Str("spriteName".into()), Typed::Str(self.sprite.clone().into())),
(Typed::Str("mothershipSize".into()), Typed::Int(self.size as i32)),
].into())
}
}