mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Add team death match support #33
This commit is contained in:
@@ -476,4 +476,8 @@ impl <C: Clone + Send> super::ConfigProvider<C> for CubeConfig {
|
||||
fn pit_settings(&self) -> super::PitSettings {
|
||||
self.battle.multiplayer.pit_config.clone().into()
|
||||
}
|
||||
|
||||
fn tdm_settings(&self) -> super::TeamDeathMatchSettings {
|
||||
self.battle.multiplayer.team_death_match.clone().into()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ mod cubes_json;
|
||||
pub use cubes_json::CubeConfig;
|
||||
|
||||
mod traits;
|
||||
pub use traits::{ConfigProvider, CompleteCampaignProvider, 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};
|
||||
pub use traits::{ConfigProvider, CompleteCampaignProvider, 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};
|
||||
|
||||
pub type ConfigImpl = CubeConfig;
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ pub trait ConfigProvider<C: Clone> {
|
||||
fn energy(&self) -> EnergyConfig;
|
||||
fn ba_settings(&self) -> BattleArenaResolver;
|
||||
fn pit_settings(&self) -> PitSettings;
|
||||
fn tdm_settings(&self) -> TeamDeathMatchSettings;
|
||||
}
|
||||
|
||||
pub struct CompleteCampaignProvider {
|
||||
@@ -445,3 +446,9 @@ pub enum PitWinCondition {
|
||||
Damage(u32),
|
||||
Time,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct TeamDeathMatchSettings {
|
||||
pub respawn_time_seconds: u64,
|
||||
pub self_destruct_is_kill: bool,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user