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

Guess weapon order for factory downloads (since they have no weapon order) #6

This commit is contained in:
NG (Graham)
2025-05-18 20:33:29 -04:00
parent 49781d35b2
commit fd75dba80e
10 changed files with 164 additions and 6 deletions

View File

@@ -17,6 +17,7 @@ pub struct InitConfig {
pub cubes: rc_core::persist::config::ConfigImpl,
pub users: std::sync::Arc<rc_core::persist::user::UserImpl>,
pub factory: std::sync::Arc<rc_core::factory::Factory>,
pub parsers: rc_core::cubes::CubeParsers,
}
#[tokio::main]
@@ -28,10 +29,12 @@ async fn main() -> std::io::Result<()> {
let cubes = rc_core::persist::config::ConfigImpl::load(&args.assets).expect("Bad config data");
let users = std::sync::Arc::new(rc_core::persist::user::UserImpl::load(&args.data, &cubes).await.expect("Bad user data"));
let factory = std::sync::Arc::new(<rc_core::persist::config::ConfigImpl as rc_core::ConfigProvider<()>>::factory::<'_, '_>(&cubes).await.expect("Bad vehicle factory (CRF) config"));
let parsers = rc_core::cubes::CubeParsers::new(&cubes);
let init_ctx = std::sync::Arc::new(InitConfig {
cubes,
users,
factory,
parsers,
});
let server = std::sync::Arc::new(polariton_server::Server::new(operations::handler(&init_ctx), polariton_server::events::EventsHandler::new()));