1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Add intercom functionality for setting factory thumbnails

This commit is contained in:
NG (Graham)
2025-12-13 16:10:45 -05:00
parent aedec62b8d
commit f6f6e1f127
17 changed files with 96 additions and 36 deletions

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,
}