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

Fix auto-selecting chat channel, add some more config options

This commit is contained in:
NG (Graham)
2025-08-13 22:17:24 -04:00
parent a8692b2839
commit 624fee6d72
20 changed files with 316 additions and 55 deletions

View File

@@ -32,6 +32,7 @@ pub trait ConfigProvider<C: Clone> {
// FIXME don't use serializable types in traits
fn network_config(&self) -> crate::persist::NetworkConf;
fn maps(&self) -> std::collections::HashMap<GameMap, MapConfig>;
fn url_links(&self) -> LinksConfig;
}
pub struct CompleteCampaignProvider {
@@ -153,6 +154,8 @@ impl GarageUpgrades {
pub struct ChatSystemConfig {
pub command_channel: String,
pub commands: Vec<crate::persist::ChatCommand>,
pub default_channel: String,
pub can_create_channels: bool,
}
#[derive(Clone, Debug)]
@@ -355,3 +358,10 @@ pub struct MapConfig {
pub spawns: std::collections::HashMap<u8, Vec<Point>>, // team -> points
pub bases: std::collections::HashMap<u8, (Sphere, f32)>, // team -> base
}
#[derive(Clone, Debug)]
pub struct LinksConfig {
pub feedback_url: String,
pub support_url: String,
pub wiki_url: String,
}