Make enemy and teammate count customizable

This commit is contained in:
NG (Graham) committed 2025-06-02 20:08:50 -04:00
1 parent 36a58eaed1
commit d0c2b1ec03
11 files changed
+98 -40

No files matched your search

+30 -1
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
}