mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Make rest of client platform flags configurage; fix speedometer confusing Americans
This commit is contained in:
1 parent
e09aeceed3
commit
1d55e534c1
7 files changed
+72
-9
No files matched your search
@@ -277,6 +277,19 @@ impl <C: Clone + Send> super::ConfigProvider<C> for CubeConfig {
|
||||
})
|
||||
}
|
||||
|
||||
fn platform(&self) -> super::PlatformConfig {
|
||||
super::PlatformConfig {
|
||||
enable_buy_premium: self.settings.gameplay.platform.can_buy_premium,
|
||||
enable_shop: self.settings.gameplay.platform.can_shop,
|
||||
enable_robopass: self.settings.gameplay.platform.can_pass,
|
||||
enable_select_language: self.settings.gameplay.platform.can_select_language,
|
||||
enable_voice: self.settings.gameplay.platform.can_voice,
|
||||
enable_analytics: self.settings.gameplay.platform.can_analytics,
|
||||
enable_standard_units: self.settings.gameplay.platform.can_si,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn login_messages(&self) -> super::DevMessageProvider<C> {
|
||||
super::DevMessageProvider::new(self.settings.banners.iter().map(|msg| (msg.message.clone(), msg.duration as i32)).collect())
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ mod cubes_json;
|
||||
pub use cubes_json::CubeConfig;
|
||||
|
||||
mod traits;
|
||||
pub use traits::{ConfigProvider, DevMessageProvider, ServerConfig, GarageUpgrades, GarageUpgradeIncrement, ChatSystemConfig, GameEventSequence, GameEvents, GameRotationStrategy, GameEvent, GameMap, GameVisibility, GameType, SingleplayerConfig, VehicleInfo, VehicleDescriptor, QueueChangeMode, Point, Sphere, MapConfig, LinksConfig, FakePlayer, ClientEmulator, EnergyConfig, BattleArenaResolver, PitSettings, PitWinCondition, TeamDeathMatchSettings, ShopEntriesResolver, ShopAction, ShopGain, PromoCode, MultiplayerSettings, BattleArenaCrystalParams, VehicleValidators, TeamChoosers, FactoryConfig};
|
||||
pub use traits::{ConfigProvider, DevMessageProvider, ServerConfig, GarageUpgrades, GarageUpgradeIncrement, ChatSystemConfig, GameEventSequence, GameEvents, GameRotationStrategy, GameEvent, GameMap, GameVisibility, GameType, SingleplayerConfig, VehicleInfo, VehicleDescriptor, QueueChangeMode, Point, Sphere, MapConfig, LinksConfig, FakePlayer, ClientEmulator, EnergyConfig, BattleArenaResolver, PitSettings, PitWinCondition, TeamDeathMatchSettings, ShopEntriesResolver, ShopAction, ShopGain, PromoCode, MultiplayerSettings, BattleArenaCrystalParams, VehicleValidators, TeamChoosers, FactoryConfig, PlatformConfig};
|
||||
|
||||
mod validation;
|
||||
pub use validation::{SelfValidator, ValidationInfo, ValidationMessage};
|
||||
|
||||
@@ -16,6 +16,7 @@ pub trait ConfigProvider<C: Clone> {
|
||||
fn campaign_details(&self) -> super::CompleteCampaignProvider;
|
||||
fn campaigns(&self) -> super::CampaignResolver;
|
||||
fn client_config(&self) -> Typed<C>;
|
||||
fn platform(&self) -> PlatformConfig;
|
||||
fn login_messages(&self) -> DevMessageProvider<C>;
|
||||
fn public_channels(&self) -> Typed<C>;
|
||||
fn server_config(&self) -> ServerConfig;
|
||||
@@ -561,3 +562,13 @@ pub struct TeamChoosers {
|
||||
pub pit: crate::persist::TeamChooser,
|
||||
pub team_deathmatch: crate::persist::TeamChooser,
|
||||
}
|
||||
|
||||
pub struct PlatformConfig {
|
||||
pub enable_buy_premium: bool,
|
||||
pub enable_shop: bool,
|
||||
pub enable_robopass: bool,
|
||||
pub enable_select_language: bool,
|
||||
pub enable_voice: bool,
|
||||
pub enable_analytics: bool,
|
||||
pub enable_standard_units: bool,
|
||||
}
|
||||
Reference in new issue
Block a user