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

Complete factory rating support

This commit is contained in:
NG (Graham)
2026-01-04 16:43:36 -05:00
parent 50eb3f471e
commit 3015572170
6 changed files with 106 additions and 1 deletions

View File

@@ -3,6 +3,9 @@ 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<VehicleThumbnailInfo, Box<dyn std::error::Error>>;
async fn rate_vehicle(&self, id: i32, combat: i32, cosmetic: i32) -> Result<(), Box<dyn std::error::Error>>;
/// Just update any purchase trackers
async fn purchase(&self, id: i32) -> Result<(), Box<dyn std::error::Error>>;
}
#[derive(Debug, Clone)]