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

Make enemy and teammate count customizable

This commit is contained in:
NG (Graham)
2025-06-02 20:08:25 -04:00
parent 36a58eaed1
commit d0c2b1ec03
11 changed files with 98 additions and 40 deletions

View File

@@ -26,7 +26,7 @@ pub trait ConfigProvider<C: Clone> {
fn chat_system_config(&self) -> ChatSystemConfig;
fn gamemode_events(&self) -> GameEventSequence;
// FIXME don't use serializable types in traits
fn singleplayer_vehicles(&self) -> Vec<crate::persist::garage::PrefabVehicle>;
fn singleplayer_details(&self) -> SingleplayerConfig;
}
pub struct CompleteCampaignProvider {
@@ -259,3 +259,32 @@ pub enum GameType {
TeamDeathmatch,
Campaign,
}
#[derive(Clone, Debug)]
pub struct SingleplayerConfig {
pub max_teammates: u32,
pub max_enemies: u32,
pub vehicles: Vec<VehicleInfo>,
}
#[derive(Clone, Debug)]
pub struct VehicleInfo {
pub name: Option<String>,
pub username: String,
pub id: VehicleDescriptor,
}
#[derive(Clone, Debug)]
pub enum VehicleDescriptor {
Factory {
factory: u32,
},
Database {
garage: u32,
},
Raw {
cube_data: Vec<u8>,
colour_data: Vec<u8>,
}
// TODO File
}