Add factory upload support to trait, make client handle rejections gracefully #6

This commit is contained in:
NG (Graham) committed 2025-05-18 21:52:03 -04:00
1 parent fd75dba80e
commit a0dba39475
12 files changed
+196 -12

No files matched your search

+9
View File
@@ -71,6 +71,7 @@ pub trait User<C> {
async fn upgrade_slot(&self, increments: i32) -> Result<polariton::operation::Typed<C>, i16>;
fn signup_date(&self) -> i64;
async fn singleplayer_robots(&self) -> Result<polariton::operation::Typed<C>, i16>;
async fn prepare_factory_upload(&self, vehicle: VehicleUploadData) -> Result<rc_factory::VehicleUploadInfo, i16>;
}
pub struct UserSlots<C> {
@@ -111,3 +112,11 @@ pub struct VehicleData {
pub weapon_order: Vec<i32>,
pub crf_id: Option<i32>,
}
pub struct VehicleUploadData {
pub version: String,
pub slot: i32,
pub name: String,
pub description: String,
pub thumbnail: Vec<u8>,
}