mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Implement basic battle arena functionality #32
This commit is contained in:
1 parent
1403a6e3d0
commit
7f9ed8bf35
41 files changed
+1836
-327
No files matched your search
@@ -12,7 +12,7 @@ mod vehicle_motion;
|
||||
pub struct InitConfig {
|
||||
pub config: oj_rc_core::persist::config::ConfigImpl,
|
||||
pub users: std::sync::Arc<oj_rc_core::persist::user::UserImpl>,
|
||||
pub parsers: oj_rc_core::cubes::CubeParsers,
|
||||
pub parsers: std::sync::Arc<oj_rc_core::cubes::CubeParsers>,
|
||||
pub matches_chann: tokio::sync::mpsc::Sender<matches::GameMessage>,
|
||||
}
|
||||
|
||||
@@ -25,8 +25,9 @@ async fn main() -> std::io::Result<()> {
|
||||
let config = oj_rc_core::persist::config::ConfigImpl::load(&args.assets).expect("Bad config data");
|
||||
let users = std::sync::Arc::new(oj_rc_core::persist::user::UserImpl::load(&args.data, &config).await.expect("Bad user data"));
|
||||
users.multiplayer_init().await.expect("Multiplayer init task failed");
|
||||
let parsers = oj_rc_core::cubes::CubeParsers::new(&config);
|
||||
let matches = matches::GameMatches::new(&config);
|
||||
let factory = std::sync::Arc::new(<oj_rc_core::persist::config::ConfigImpl as oj_rc_core::ConfigProvider<()>>::factory::<'_, '_>(&config).await.expect("Bad vehicle factory (CRF) config"));
|
||||
let parsers = std::sync::Arc::new(oj_rc_core::cubes::CubeParsers::new(&config));
|
||||
let matches = matches::GameMatches::new(&config, parsers.clone(), factory.clone());
|
||||
let matches_chann = matches.spawn();
|
||||
|
||||
let init_ctx = InitConfig {
|
||||
|
||||
Reference in new issue
Block a user