mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Init BA base crystal order on startup if possible, change it occasionally
This commit is contained in:
1 parent
08d7f86dcb
commit
93beb1b4e7
5 files changed
+204
-9
No files matched your search
@@ -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};
|
||||
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};
|
||||
|
||||
mod validation;
|
||||
pub use validation::{SelfValidator, ValidationInfo, ValidationMessage};
|
||||
|
||||
@@ -412,6 +412,28 @@ impl BattleArenaResolver {
|
||||
],
|
||||
}))
|
||||
}
|
||||
|
||||
pub fn resolve_base_machine_immediate_early(&self) -> Option<Vec<u8>> {
|
||||
match &self.data.base.id {
|
||||
crate::persist::PrefabId::Raw { cube_data, .. } => {
|
||||
Some(cube_data.to_owned())
|
||||
},
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn crystal_sort_params(&self) -> BattleArenaCrystalParams {
|
||||
BattleArenaCrystalParams {
|
||||
max_iterations: self.data.max_base_iterations as usize,
|
||||
max_random_iterations: self.data.max_base_random_iterations as usize,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct BattleArenaCrystalParams {
|
||||
pub max_iterations: usize,
|
||||
pub max_random_iterations: usize,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in new issue
Block a user