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/customisation_info.rs
2025-09-03 22:33:32 -04:00

24 lines
933 B
Rust

use polariton::operation::Typed;
pub struct CustomisationData {
pub id: String,
pub localised_name: String,
pub skin_scene_name: String,
pub simulation_prefab: String,
pub preview_image_name: String,
pub is_default: bool,
}
impl CustomisationData {
pub fn as_transmissible(&self) -> Typed {
Typed::HashMap(vec![
(Typed::Str("id".into()), Typed::Str(self.id.clone().into())),
(Typed::Str("localisedName".into()), Typed::Str(self.localised_name.clone().into())),
(Typed::Str("skinsceneName".into()), Typed::Str(self.skin_scene_name.clone().into())),
(Typed::Str("simulationPrefab".into()), Typed::Str(self.simulation_prefab.clone().into())),
(Typed::Str("previewImageName".into()), Typed::Str(self.preview_image_name.clone().into())),
(Typed::Str("isDefault".into()), Typed::Bool(self.is_default)),
].into())
}
}