mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Add support for matchmaker sending clients off to game server
This commit is contained in:
@@ -353,4 +353,16 @@ impl <C: Clone + Send> super::ConfigProvider<C> for CubeConfig {
|
||||
items: id_map,
|
||||
})
|
||||
}*/
|
||||
|
||||
fn players_per_game(&self) -> usize {
|
||||
self.battle.multiplayer.players_per_game
|
||||
}
|
||||
|
||||
fn is_multiplayer_enabled(&self) -> bool {
|
||||
self.battle.multiplayer.enabled
|
||||
}
|
||||
|
||||
fn network_config(&self) -> crate::persist::NetworkConf {
|
||||
self.battle.multiplayer.network.clone()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,11 @@ pub trait ConfigProvider<C: Clone> {
|
||||
fn cubes(&self) -> &'_ std::collections::HashMap<String, crate::persist::Cube>;
|
||||
fn chat_system_config(&self) -> ChatSystemConfig;
|
||||
fn gamemode_events(&self) -> GameEventSequence;
|
||||
// FIXME don't use serializable types in traits
|
||||
fn singleplayer_details(&self) -> SingleplayerConfig;
|
||||
fn players_per_game(&self) -> usize;
|
||||
fn is_multiplayer_enabled(&self) -> bool;
|
||||
// FIXME don't use serializable types in traits
|
||||
fn network_config(&self) -> crate::persist::NetworkConf;
|
||||
}
|
||||
|
||||
pub struct CompleteCampaignProvider {
|
||||
|
||||
Reference in New Issue
Block a user