Complete factory rating support

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

No files matched your search

+16
View File
@@ -33,6 +33,22 @@ impl oj_rc_factory::VehicleFactoryAdapter for Factory {
}),
}
}
async fn rate_vehicle(&self, id: i32, combat: i32, cosmetic: i32) -> Result<(), Box<dyn std::error::Error>> {
match self {
Self::Arc(x) => x.rate_vehicle(id, combat, cosmetic).await,
Self::Custom(x) => x.rate_vehicle(id, combat, cosmetic).await,
Self::None => Ok(()),
}
}
async fn purchase(&self, id: i32) -> Result<(), Box<dyn std::error::Error>> {
match self {
Self::Arc(x) => x.purchase(id).await,
Self::Custom(x) => x.purchase(id).await,
Self::None => Ok(()),
}
}
}
impl Factory {