Add intercom functionality for setting factory thumbnails

This commit is contained in:
NG (Graham) committed 2025-12-13 16:23:18 -05:00
1 parent aedec62b8d
commit f6f6e1f127
17 files changed
+96 -36

No files matched your search

+8 -1
View File
@@ -2,7 +2,7 @@
pub trait VehicleFactoryAdapter: Send + Sync + 'static {
async fn vehicle(&self, id: u32) -> Result<Option<(VehicleInfo, VehicleQueryInfo)>, Box<dyn std::error::Error>>;
async fn list(&self, query: libfj::robocraft::ListQuery) -> Result<Vec<VehicleQueryInfo>, Box<dyn std::error::Error>>;
async fn upload(&self, vehicle: VehicleUploadInfo) -> Result<bool, Box<dyn std::error::Error>>;
async fn upload(&self, vehicle: VehicleUploadInfo) -> Result<VehicleThumbnailInfo, Box<dyn std::error::Error>>;
}
#[derive(Debug, Clone)]
@@ -65,3 +65,10 @@ pub struct VehicleUploadInfo {
pub colour_data: Vec<u8>,
pub build_version: String,
}
#[derive(Debug)]
pub struct VehicleThumbnailInfo {
pub id: i32,
pub thumbnail: Vec<u8>,
pub needs_upload: bool,
}